Bug 1030318 - Enable devtools/framework tests with e10s - part 4;r=me

This commit is contained in:
Brian Grinstead 2016-01-20 11:52:02 -08:00
parent 4d40d63ff3
commit 83ec87cb90
3 changed files with 17 additions and 29 deletions

View File

@ -29,7 +29,7 @@ support-files =
[browser_target_remote.js]
[browser_target_support.js]
[browser_two_tabs.js]
skip-if = e10s && debug && os == 'win'
skip-if = e10s && debug && os == 'win' # Bug 1231869
[browser_toolbox_dynamic_registration.js]
[browser_toolbox_getpanelwhenready.js]
[browser_toolbox_highlight.js]
@ -40,11 +40,8 @@ skip-if = true # Bug 1177463 - Temporarily hide the minimize button
[browser_toolbox_options.js]
[browser_toolbox_options_disable_buttons.js]
[browser_toolbox_options_disable_cache-01.js]
skip-if = e10s # Bug 1030318
[browser_toolbox_options_disable_cache-02.js]
skip-if = e10s # Bug 1030318
[browser_toolbox_options_disable_js.js]
skip-if = e10s # Bug 1030318
# [browser_toolbox_raise.js] # Bug 962258
# skip-if = os == "win"
[browser_toolbox_ready.js]

View File

@ -57,29 +57,21 @@ function testJSEnabledIframe(secondPass) {
}
}
function toggleJS() {
let deferred = promise.defer();
let toggleJS = Task.async(function*() {
let panel = toolbox.getCurrentPanel();
let cbx = panel.panelDoc.getElementById("devtools-disable-javascript");
cbx.scrollIntoView();
if (cbx.checked) {
info("Clearing checkbox to re-enable JS");
} else {
info("Checking checkbox to disable JS");
}
gBrowser.selectedBrowser.addEventListener("load", function onLoad(evt) {
gBrowser.selectedBrowser.removeEventListener(evt.type, onLoad, true);
doc = content.document;
deferred.resolve();
}, true);
let browserLoaded = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
cbx.click();
return deferred.promise;
}
yield browserLoaded;
doc = content.document;
});
function testJSDisabled() {
info("Testing that JS is disabled");

View File

@ -48,15 +48,19 @@ function* checkCacheEnabled(tabX, expected) {
yield reloadTab(tabX);
let oldGuid = yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
let doc = content.document;
let h1 = doc.querySelector("h1");
let oldGuid = h1.textContent;
return h1.textContent;
});
yield reloadTab(tabX);
doc = content.document;
h1 = doc.querySelector("h1");
let guid = h1.textContent;
let guid = yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
let doc = content.document;
let h1 = doc.querySelector("h1");
return h1.textContent;
});
if (expected) {
is(guid, oldGuid, tabX.title + " cache is enabled");
@ -71,14 +75,9 @@ function* setDisableCacheCheckboxChecked(tabX, state) {
let panel = tabX.toolbox.getCurrentPanel();
let cbx = panel.panelDoc.getElementById("devtools-disable-cache");
cbx.scrollIntoView();
// After uising scrollIntoView() we need to wait for the browser to scroll.
yield waitForTick();
if (cbx.checked !== state) {
info("Setting disable cache checkbox to " + state + " for " + tabX.title);
EventUtils.synthesizeMouseAtCenter(cbx, {}, panel.panelWin);
cbx.click();
// We need to wait for all checkboxes to be updated and the docshells to
// apply the new cache settings.