Bug 857356 - Make reftests/crashtest run without XBL scopes. r=bz
authorBobby Holley <bobbyholley@gmail.com>
Thu, 09 May 2013 09:16:02 -0700
changeset 138176 02c1a0223bc324e65169a64521c64d0602e93abd
parent 138175 80b26df1c79a3e382290f5c434d88c522de6e4fb
child 138177 8a44a72db55bd422467b2f57db24e7242cce444d
push id3752
push userlsblakk@mozilla.com
push dateMon, 13 May 2013 17:21:10 +0000
treeherdermozilla-aurora@1580544aef0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs857356
milestone23.0a1
Bug 857356 - Make reftests/crashtest run without XBL scopes. r=bz I talked about this with bz. The issue is that we have a lot of XUL reftests that end up getting run as remote XUL given that the reftest harness loads them with file:// URIs. But realistically most of them probably want to test the fully-featured XBL environment that we provide to frontend and extensions. So the compromise here is to do XBL scopes for content, and no XBL scopes for reftests/crashtests.
layout/reftests/bugs/reftest.list
layout/reftests/invalidation/reftest.list
layout/tools/reftest/b2g_start_script.js
layout/tools/reftest/reftest-cmdline.js
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1164,19 +1164,19 @@ skip-if(B2G) == 446100-1c.html about:bla
 == 446100-1e.html about:blank
 == 446100-1f.html about:blank
 skip-if(B2G) == 446100-1g.html about:blank
 == 446100-1h.html about:blank
 fuzzy(127,2) == 448193.html 448193-ref.html
 # == 448987.html 448987-ref.html  # Disabled for now - it needs privileges
 != 449149-1a.html about:blank
 != 449149-1b.html about:blank
-# Retry the above with our default remote XUL behavior
-test-pref(dom.use_xbl_scopes_for_remote_xul,false) != 449149-1a.html about:blank
-test-pref(dom.use_xbl_scopes_for_remote_xul,false) != 449149-1b.html about:blank
+# Retry the above with in-content XBL behavior
+test-pref(dom.use_xbl_scopes_for_remote_xul,true) != 449149-1a.html about:blank
+test-pref(dom.use_xbl_scopes_for_remote_xul,true) != 449149-1b.html about:blank
 == 449149-2.html 449149-2-ref.html
 == 449171-1.html 449171-ref.html
 == 449362-1.html 449362-1-ref.html
 == 449519-1.html 449519-1-ref.html
 # == 449653-1.html 449653-1-ref.html # Disabled for now - it needs privileges
 == 450670-1.html 450670-1-ref.html
 == 451168-1.html 451168-1-ref.html
 == 451876-1.html 451876-1-ref.html
--- a/layout/reftests/invalidation/reftest.list
+++ b/layout/reftests/invalidation/reftest.list
@@ -1,15 +1,7 @@
 == table-repaint-a.html table-repaint-a-ref.html
 == table-repaint-b.html table-repaint-b-ref.html
 == table-repaint-c.html table-repaint-c-ref.html
 == table-repaint-d.html table-repaint-d-ref.html
-# The below test involves XUL that expects to be able to use
-# Components.interfaces. This is kind of a tricky situation because reftests
-# actually run XUL with file:// URIs, and flip a pref that allows remote XUL
-# from the filesystem. And in fact, we have special behavior to allow access to
-# the Components object on remote XUL origins. However, we actually have an
-# override pref during automation that disables this behavior during automation.
-# Since reftests don't have SpecialPowers, our simplest path to victory here is
-# to override the override. Ugh.
-pref(dom.use_xbl_scopes_for_remote_xul,false) == 540247-1.xul 540247-1-ref.xul
+== 540247-1.xul 540247-1-ref.xul
 == 543681-1.html 543681-1-ref.html
 == test-image-layers.html test-image-layers-ref.html
--- a/layout/tools/reftest/b2g_start_script.js
+++ b/layout/tools/reftest/b2g_start_script.js
@@ -4,17 +4,17 @@ function setDefaultPrefs() {
     // This code sets the preferences for extension-based reftest; for
     // command-line based reftest they are set in function handler_handle in
     // reftest-cmdline.js.  These two locations should stay in sync.
     //
     // FIXME: These should be in only one place.
     var prefs = Components.classes["@mozilla.org/preferences-service;1"].
                 getService(Components.interfaces.nsIPrefService);
     var branch = prefs.getDefaultBranch("");
-    branch.setBoolPref("dom.use_xbl_scopes_for_remote_xul", true);
+    branch.setBoolPref("dom.use_xbl_scopes_for_remote_xul", false);
     branch.setBoolPref("gfx.color_management.force_srgb", true);
     branch.setBoolPref("browser.dom.window.dump.enabled", true);
     branch.setIntPref("ui.caretBlinkTime", -1);
     branch.setBoolPref("dom.send_after_paint_to_content", true);
     // no slow script dialogs
     branch.setIntPref("dom.max_script_run_time", 0);
     branch.setIntPref("dom.max_chrome_script_run_time", 0);
     branch.setIntPref("hangmonitor.timeout", 0);
--- a/layout/tools/reftest/reftest-cmdline.js
+++ b/layout/tools/reftest/reftest-cmdline.js
@@ -71,17 +71,21 @@ RefTestCmdLineHandler.prototype =
      * setDefaultPrefs().  These are duplicated there so we can have a 
      * restartless addon for reftest on native Android.
      *
      * FIXME: These should be in only one place. 
      */
     var prefs = Components.classes["@mozilla.org/preferences-service;1"].
                 getService(Components.interfaces.nsIPrefService);
     var branch = prefs.getDefaultBranch("");
-    branch.setBoolPref("dom.use_xbl_scopes_for_remote_xul", true);
+    // For mochitests, we're more interested in testing the behavior of in-
+    // content XBL bindings, so we set this pref to true. In reftests, we're
+    // more interested in testing the behavior of XBL as it works in chrome,
+    // so we want this pref to be false.
+    branch.setBoolPref("dom.use_xbl_scopes_for_remote_xul", false);
     branch.setBoolPref("gfx.color_management.force_srgb", true);
     branch.setBoolPref("browser.dom.window.dump.enabled", true);
     branch.setIntPref("ui.caretBlinkTime", -1);
     branch.setBoolPref("dom.send_after_paint_to_content", true);
     // no slow script dialogs
     branch.setIntPref("dom.max_script_run_time", 0);
     branch.setIntPref("dom.max_chrome_script_run_time", 0);
     branch.setIntPref("hangmonitor.timeout", 0);