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.
This commit is contained in:
Bobby Holley 2013-05-09 09:16:02 -07:00
Родитель 192d3e8924
Коммит b78b066ca2
4 изменённых файлов: 10 добавлений и 14 удалений

Просмотреть файл

@ -1169,9 +1169,9 @@ fuzzy(127,2) == 448193.html 448193-ref.html
# == 448987.html 448987-ref.html # Disabled for now - it needs privileges # == 448987.html 448987-ref.html # Disabled for now - it needs privileges
!= 449149-1a.html about:blank != 449149-1a.html about:blank
!= 449149-1b.html about:blank != 449149-1b.html about:blank
# Retry the above with our default remote XUL behavior # Retry the above with in-content XBL 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,true) != 449149-1a.html about:blank
test-pref(dom.use_xbl_scopes_for_remote_xul,false) != 449149-1b.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 == 449149-2.html 449149-2-ref.html
== 449171-1.html 449171-ref.html == 449171-1.html 449171-ref.html
== 449362-1.html 449362-1-ref.html == 449362-1.html 449362-1-ref.html

Просмотреть файл

@ -2,14 +2,6 @@
== table-repaint-b.html table-repaint-b-ref.html == table-repaint-b.html table-repaint-b-ref.html
== table-repaint-c.html table-repaint-c-ref.html == table-repaint-c.html table-repaint-c-ref.html
== table-repaint-d.html table-repaint-d-ref.html == table-repaint-d.html table-repaint-d-ref.html
# The below test involves XUL that expects to be able to use == 540247-1.xul 540247-1-ref.xul
# 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
== 543681-1.html 543681-1-ref.html == 543681-1.html 543681-1-ref.html
== test-image-layers.html test-image-layers-ref.html == test-image-layers.html test-image-layers-ref.html

Просмотреть файл

@ -9,7 +9,7 @@ function setDefaultPrefs() {
var prefs = Components.classes["@mozilla.org/preferences-service;1"]. var prefs = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefService); getService(Components.interfaces.nsIPrefService);
var branch = prefs.getDefaultBranch(""); 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("gfx.color_management.force_srgb", true);
branch.setBoolPref("browser.dom.window.dump.enabled", true); branch.setBoolPref("browser.dom.window.dump.enabled", true);
branch.setIntPref("ui.caretBlinkTime", -1); branch.setIntPref("ui.caretBlinkTime", -1);

Просмотреть файл

@ -76,7 +76,11 @@ RefTestCmdLineHandler.prototype =
var prefs = Components.classes["@mozilla.org/preferences-service;1"]. var prefs = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefService); getService(Components.interfaces.nsIPrefService);
var branch = prefs.getDefaultBranch(""); 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("gfx.color_management.force_srgb", true);
branch.setBoolPref("browser.dom.window.dump.enabled", true); branch.setBoolPref("browser.dom.window.dump.enabled", true);
branch.setIntPref("ui.caretBlinkTime", -1); branch.setIntPref("ui.caretBlinkTime", -1);