Bug 1030318 - Enable devtools/framework tests with e10s - part 4;r=me
☠☠ backed out by b2e729decd54 ☠ ☠
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 20 Jan 2016 11:52:02 -0800
changeset 323643 91ba81f7207e597a5fca3b7550cdebf852e3e9a1
parent 323642 63eb0ddd1cdbe82b4fdfd1c7bf9be38a95bc5234
child 323644 8fc9a5eeede3b4551dbcbf0a77fe40349914c83e
push id9762
push usermozilla@noorenberghe.ca
push dateWed, 20 Jan 2016 21:31:00 +0000
reviewersme
bugs1030318
milestone46.0a1
Bug 1030318 - Enable devtools/framework tests with e10s - part 4;r=me
devtools/client/framework/test/browser.ini
devtools/client/framework/test/browser_toolbox_options_disable_js.js
devtools/client/framework/test/helper_disable_cache.js
--- a/devtools/client/framework/test/browser.ini
+++ b/devtools/client/framework/test/browser.ini
@@ -23,32 +23,29 @@ support-files =
 [browser_keybindings_01.js]
 [browser_keybindings_02.js]
 [browser_keybindings_03.js]
 [browser_new_activation_workflow.js]
 [browser_target_events.js]
 [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]
 [browser_toolbox_hosts.js]
 [browser_toolbox_hosts_size.js]
 [browser_toolbox_minimize.js]
 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]
 [browser_toolbox_select_event.js]
 skip-if = e10s # Bug 1069044 - destroyInspector may hang during shutdown
 [browser_toolbox_sidebar.js]
 [browser_toolbox_sidebar_events.js]
 [browser_toolbox_sidebar_existing_tabs.js]
--- a/devtools/client/framework/test/browser_toolbox_options_disable_js.js
+++ b/devtools/client/framework/test/browser_toolbox_options_disable_js.js
@@ -52,39 +52,31 @@ function testJSEnabledIframe(secondPass)
                           'Output is "JavaScript Enabled" in iframe');
   if (secondPass) {
     finishUp();
   } else {
     toggleJS().then(testJSDisabled);
   }
 }
 
-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");
 
   let output = doc.getElementById("output");
   doc.querySelector("#logJSDisabled").click();
 
   ok(output.textContent !== "JavaScript Disabled",
--- a/devtools/client/framework/test/helper_disable_cache.js
+++ b/devtools/client/framework/test/helper_disable_cache.js
@@ -66,24 +66,19 @@ function* checkCacheEnabled(tabX, expect
 }
 
 function* setDisableCacheCheckboxChecked(tabX, state) {
   gBrowser.selectedTab = tabX.tab;
 
   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.
     yield waitForTick();
   }
 }
 
 function reloadTab(tabX) {