Bug 1493718 - Clean-up use of __force_skip__ in two tests and re-enable test_view_source_reload. r=aceman
authorJorg K <jorgk@jorgk.com>
Mon, 24 Sep 2018 11:40:00 +0200
changeset 33222 06e1ec5ea2586ef807f966e8450346603c37f4f8
parent 33221 32f0ea906e38c2916eb4f45f92babe129d71dc08
child 33223 ed39f537696876ed0a5a9304cf94d40621131e61
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersaceman
bugs1493718
Bug 1493718 - Clean-up use of __force_skip__ in two tests and re-enable test_view_source_reload. r=aceman
mail/test/mozmill/content-policy/test-view-source.js
mail/test/mozmill/folder-widget/test-message-filters.js
--- a/mail/test/mozmill/content-policy/test-view-source.js
+++ b/mail/test/mozmill/content-policy/test-view-source.js
@@ -23,24 +23,16 @@ ChromeUtils.import("resource://gre/modul
 var folder = null;
 
 function setupModule(module) {
   for (let dep of MODULE_REQUIRES) {
     collector.getModule(dep).installInto(module);
   }
 
   folder = create_folder("viewsource");
-
-  // Bug 805374 removed the charsetMenu from view source.
-  // Enable this test again when bug 940907 is fixed.
-  test_view_source_reload.__force_skip__ = true;
-
-  // Skip on mac, as we can't click the (native) menus to make it work.
-  if (mc.mozmillModule.isMac)
-    test_view_source_reload.__force_skip__ = true;
 }
 
 function addToFolder(aSubject, aBody, aFolder) {
   let msgId = Cc["@mozilla.org/uuid-generator;1"]
                           .getService(Ci.nsIUUIDGenerator)
                           .generateUUID() +"@invalid";
 
   let source = "From - Sat Nov  1 12:39:54 2008\n" +
@@ -85,23 +77,29 @@ function test_view_source_reload() {
 
   let source = vsc.e("content").contentDocument.querySelector("pre").textContent;
   if (!source.includes(contentLatin1))
     throw new Error("View source didn't contain the latin1 text;\n" +
                     contentLatin1 + "\n" + source);
 
   let doc = vsc.e("content").contentDocument; // keep a ref to the latin1 doc
 
+  // Click the new window to make it receive further events properly.
+  vsc.click(vsc.eid("content"));
+
+  vsc.click(vsc.eid("menu_view"));
   vsc.click_menus_in_sequence(vsc.e("viewmenu-popup"),
-    [{id: "charsetMenu"}, {label: "Unicode (UTF-8)"}]);
+    [{id: "charsetMenu"}, {label: "Unicode"}]);
 
   vsc.waitFor(() => vsc.e("content").contentDocument != doc &&
                     vsc.e("content").contentDocument.querySelector("pre") != null,
               "Timeout waiting utf-8 encoded view-source document to load.");
 
   source = vsc.e("content").contentDocument.querySelector("pre").textContent;
   if (!source.includes(contentUTF8))
     throw new Error("View source didn't contain the utf-8 text;\n" +
                     contentUTF8 + "\n" + source);
 
   close_window(vsc);
 }
+// Skip on Mac, as we can't click the (native) menus to make it work.
+test_view_source_reload.EXCLUDED_PLATFORMS = ["darwin"];
 
--- a/mail/test/mozmill/folder-widget/test-message-filters.js
+++ b/mail/test/mozmill/folder-widget/test-message-filters.js
@@ -31,20 +31,16 @@ function setupModule(module)
   // we need one message to select and open
   make_new_sets_in_folder(folderA, [{count: 1}]);
 
   setupLocalServer(NNTP_PORT);
 
   // Note, the uri is for hostname "invalid" which is the original uri. See
   // setupProtocolTest parameters.
   var prefix = "news://invalid:"+NNTP_PORT+"/";
-
-  if (mc.mozmillModule.isMac) {
-    test_customize_toolbar_doesnt_double_get_mail_menu.__force_skip__ = true;
-  }
 }
 
 /*
  * Test that the message filter list shows newsgroup servers.
  */
 function test_message_filter_shows_newsgroup_server()
 {
   be_in_folder(folderA);
@@ -119,16 +115,17 @@ function test_customize_toolbar_doesnt_d
   let customc = wait_for_new_window("mailnews:customizeToolbar");
   wait_for_window_focused(customc.window);
   plan_for_window_close(customc);
   customc.click(customc.eid("donebutton"));
   wait_for_window_close();
 
   check_getAllNewMsgMenu();
 }
+test_customize_toolbar_doesnt_double_get_mail_menu.EXCLUDED_PLATFORMS = ["darwin"];
 
 /* A helper function that opens up the new filter dialog (assuming that the
  * main filters dialog is already open), creates a simple filter, and then
  * closes the dialog.
  */
 function create_simple_filter() {
   // Open the "Tools » Message Filters…" window,
   // a.k.a. "tasksMenu » filtersCmd".