Bug 1090929 - Enable the variables-view-filter tests;r=mratcliffe
authorEddy Bruël <ejpbruel@gmail.com>
Mon, 10 Nov 2014 10:39:26 +0100
changeset 226183 223e9af774c6e30a9a9b6e53ea3402a49406a599
parent 226182 e4e2ccb1f24717efb04f253b3c97a1b963f71432
child 226184 c129289d32d617cb8fa4f188215a414029fb7f9b
push id36
push userdburns@mozilla.com
push dateMon, 10 Nov 2014 15:14:02 +0000
reviewersmratcliffe
bugs1090929
milestone36.0a1
Bug 1090929 - Enable the variables-view-filter tests;r=mratcliffe
browser/devtools/debugger/test/browser.ini
browser/devtools/debugger/test/browser_dbg_variables-view-filter-01.js
browser/devtools/debugger/test/browser_dbg_variables-view-filter-02.js
browser/devtools/debugger/test/browser_dbg_variables-view-filter-03.js
browser/devtools/debugger/test/browser_dbg_variables-view-filter-04.js
browser/devtools/debugger/test/browser_dbg_variables-view-filter-05.js
--- a/browser/devtools/debugger/test/browser.ini
+++ b/browser/devtools/debugger/test/browser.ini
@@ -469,25 +469,25 @@ skip-if = e10s || (os == 'mac' || os == 
 skip-if = e10s
 [browser_dbg_variables-view-edit-getset-02.js]
 skip-if = e10s
 [browser_dbg_variables-view-edit-value.js]
 skip-if = e10s
 [browser_dbg_variables-view-edit-watch.js]
 skip-if = e10s
 [browser_dbg_variables-view-filter-01.js]
-skip-if = e10s
+skip-if = e10s && debug
 [browser_dbg_variables-view-filter-02.js]
-skip-if = e10s
+skip-if = e10s && debug
 [browser_dbg_variables-view-filter-03.js]
-skip-if = e10s
+skip-if = e10s && debug
 [browser_dbg_variables-view-filter-04.js]
-skip-if = e10s
+skip-if = e10s && debug
 [browser_dbg_variables-view-filter-05.js]
-skip-if = e10s
+skip-if = e10s && debug
 [browser_dbg_variables-view-filter-pref.js]
 skip-if = e10s
 [browser_dbg_variables-view-filter-searchbox.js]
 skip-if = e10s
 [browser_dbg_variables-view-frame-parameters-01.js]
 skip-if = e10s
 [browser_dbg_variables-view-frame-parameters-02.js]
 skip-if = e10s
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-filter-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-filter-01.js
@@ -2,26 +2,25 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Make sure that the variables view correctly filters nodes by name.
  */
 
 const TAB_URL = EXAMPLE_URL + "doc_with-frame.html";
 
-let gTab, gDebuggee, gPanel, gDebugger;
+let gTab, gPanel, gDebugger;
 let gVariables, gSearchBox;
 
 function test() {
   // Debug test slaves are quite slow at this test.
   requestLongerTimeout(4);
 
-  initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
+  initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
     gTab = aTab;
-    gDebuggee = aDebuggee;
     gPanel = aPanel;
     gDebugger = gPanel.panelWin;
     gVariables = gDebugger.DebuggerView.Variables;
 
     gVariables._enableSearch();
     gSearchBox = gVariables._searchboxNode;
 
     // The first 'with' scope should be expanded by default, but the
@@ -32,19 +31,17 @@ function test() {
       waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_VARIABLES)
     ]).then(prepareVariablesAndProperties)
       .then(testVariablesAndPropertiesFiltering)
       .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
       });
 
-    EventUtils.sendMouseEvent({ type: "click" },
-      gDebuggee.document.querySelector("button"),
-      gDebuggee);
+    sendMouseClickToTab(gTab, content.document.querySelector("button"));
   });
 }
 
 function testVariablesAndPropertiesFiltering() {
   let localScope = gVariables.getScopeAtIndex(0);
   let withScope = gVariables.getScopeAtIndex(1);
   let functionScope = gVariables.getScopeAtIndex(2);
   let globalScope = gVariables.getScopeAtIndex(3);
@@ -209,14 +206,13 @@ function prepareVariablesAndProperties()
   functionScope.expand();
   globalScope.expand();
 
   return deferred.promise;
 }
 
 registerCleanupFunction(function() {
   gTab = null;
-  gDebuggee = null;
   gPanel = null;
   gDebugger = null;
   gVariables = null;
   gSearchBox = null;
 });
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-filter-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-filter-02.js
@@ -2,26 +2,25 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Make sure that the variables view correctly filters nodes by value.
  */
 
 const TAB_URL = EXAMPLE_URL + "doc_with-frame.html";
 
-let gTab, gDebuggee, gPanel, gDebugger;
+let gTab, gPanel, gDebugger;
 let gVariables, gSearchBox;
 
 function test() {
   // Debug test slaves are quite slow at this test.
   requestLongerTimeout(4);
 
-  initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
+  initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
     gTab = aTab;
-    gDebuggee = aDebuggee;
     gPanel = aPanel;
     gDebugger = gPanel.panelWin;
     gVariables = gDebugger.DebuggerView.Variables;
 
     gVariables._enableSearch();
     gSearchBox = gVariables._searchboxNode;
 
     // The first 'with' scope should be expanded by default, but the
@@ -32,19 +31,17 @@ function test() {
       waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_VARIABLES)
     ]).then(prepareVariablesAndProperties)
       .then(testVariablesAndPropertiesFiltering)
       .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
       });
 
-    EventUtils.sendMouseEvent({ type: "click" },
-      gDebuggee.document.querySelector("button"),
-      gDebuggee);
+    sendMouseClickToTab(gTab,  content.document.querySelector("button"));
   });
 }
 
 function testVariablesAndPropertiesFiltering() {
   let localScope = gVariables.getScopeAtIndex(0);
   let withScope = gVariables.getScopeAtIndex(1);
   let functionScope = gVariables.getScopeAtIndex(2);
   let globalScope = gVariables.getScopeAtIndex(3);
@@ -216,14 +213,13 @@ function prepareVariablesAndProperties()
   functionScope.expand();
   globalScope.expand();
 
   return deferred.promise;
 }
 
 registerCleanupFunction(function() {
   gTab = null;
-  gDebuggee = null;
   gPanel = null;
   gDebugger = null;
   gVariables = null;
   gSearchBox = null;
 });
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-filter-03.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-filter-03.js
@@ -3,26 +3,25 @@
 
 /**
  * Make sure that the variables view correctly filters nodes when triggered
  * from the debugger's searchbox via an operator.
  */
 
 const TAB_URL = EXAMPLE_URL + "doc_with-frame.html";
 
-let gTab, gDebuggee, gPanel, gDebugger;
+let gTab, gPanel, gDebugger;
 let gVariables, gSearchBox;
 
 function test() {
   // Debug test slaves are a bit slow at this test.
   requestLongerTimeout(2);
 
-  initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
+  initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
     gTab = aTab;
-    gDebuggee = aDebuggee;
     gPanel = aPanel;
     gDebugger = gPanel.panelWin;
     gVariables = gDebugger.DebuggerView.Variables;
     gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
 
     // The first 'with' scope should be expanded by default, but the
     // variables haven't been fetched yet. This is how 'with' scopes work.
     promise.all([
@@ -31,19 +30,17 @@ function test() {
       waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_VARIABLES)
     ]).then(prepareVariablesAndProperties)
       .then(testVariablesAndPropertiesFiltering)
       .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
       });
 
-    EventUtils.sendMouseEvent({ type: "click" },
-      gDebuggee.document.querySelector("button"),
-      gDebuggee);
+    sendMouseClickToTab(gTab, content.document.querySelector("button"));
   });
 }
 
 function testVariablesAndPropertiesFiltering() {
   let localScope = gVariables.getScopeAtIndex(0);
   let withScope = gVariables.getScopeAtIndex(1);
   let functionScope = gVariables.getScopeAtIndex(2);
   let globalScope = gVariables.getScopeAtIndex(3);
@@ -148,14 +145,13 @@ function prepareVariablesAndProperties()
   functionScope.expand();
   globalScope.expand();
 
   return deferred.promise;
 }
 
 registerCleanupFunction(function() {
   gTab = null;
-  gDebuggee = null;
   gPanel = null;
   gDebugger = null;
   gVariables = null;
   gSearchBox = null;
 });
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-filter-04.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-filter-04.js
@@ -3,26 +3,25 @@
 
 /**
  * Make sure that the variables view correctly shows/hides nodes when various
  * keyboard shortcuts are pressed in the debugger's searchbox.
  */
 
 const TAB_URL = EXAMPLE_URL + "doc_with-frame.html";
 
-let gTab, gDebuggee, gPanel, gDebugger;
+let gTab, gPanel, gDebugger;
 let gEditor, gVariables, gSearchBox;
 
 function test() {
   // Debug test slaves are a bit slow at this test.
   requestLongerTimeout(2);
 
-  initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
+  initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
     gTab = aTab;
-    gDebuggee = aDebuggee;
     gPanel = aPanel;
     gDebugger = gPanel.panelWin;
     gEditor = gDebugger.DebuggerView.editor;
     gVariables = gDebugger.DebuggerView.Variables;
     gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
 
     // The first 'with' scope should be expanded by default, but the
     // variables haven't been fetched yet. This is how 'with' scopes work.
@@ -32,19 +31,17 @@ function test() {
       waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_VARIABLES)
     ]).then(prepareVariablesAndProperties)
       .then(testVariablesAndPropertiesFiltering)
       .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
       });
 
-    EventUtils.sendMouseEvent({ type: "click" },
-      gDebuggee.document.querySelector("button"),
-      gDebuggee);
+    sendMouseClickToTab(gTab, content.document.querySelector("button"));
   });
 }
 
 function testVariablesAndPropertiesFiltering() {
   let localScope = gVariables.getScopeAtIndex(0);
   let withScope = gVariables.getScopeAtIndex(1);
   let functionScope = gVariables.getScopeAtIndex(2);
   let globalScope = gVariables.getScopeAtIndex(3);
@@ -215,15 +212,14 @@ function prepareVariablesAndProperties()
   functionScope.expand();
   globalScope.expand();
 
   return deferred.promise;
 }
 
 registerCleanupFunction(function() {
   gTab = null;
-  gDebuggee = null;
   gPanel = null;
   gDebugger = null;
   gEditor = null;
   gVariables = null;
   gSearchBox = null;
 });
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-filter-05.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-filter-05.js
@@ -3,26 +3,25 @@
 
 /**
  * Make sure that the variables view correctly shows/hides nodes when various
  * keyboard shortcuts are pressed in the debugger's searchbox.
  */
 
 const TAB_URL = EXAMPLE_URL + "doc_with-frame.html";
 
-let gTab, gDebuggee, gPanel, gDebugger;
+let gTab, gPanel, gDebugger;
 let gVariables, gSearchBox;
 
 function test() {
   // Debug test slaves are a bit slow at this test.
   requestLongerTimeout(2);
 
-  initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
+  initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
     gTab = aTab;
-    gDebuggee = aDebuggee;
     gPanel = aPanel;
     gDebugger = gPanel.panelWin;
     gVariables = gDebugger.DebuggerView.Variables;
     gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
 
     // The first 'with' scope should be expanded by default, but the
     // variables haven't been fetched yet. This is how 'with' scopes work.
     promise.all([
@@ -31,19 +30,17 @@ function test() {
       waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_VARIABLES)
     ]).then(prepareVariablesAndProperties)
       .then(testVariablesAndPropertiesFiltering)
       .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
       });
 
-    EventUtils.sendMouseEvent({ type: "click" },
-      gDebuggee.document.querySelector("button"),
-      gDebuggee);
+    sendMouseClickToTab(gTab, content.document.querySelector("button"));
   });
 }
 
 function testVariablesAndPropertiesFiltering() {
   let localScope = gVariables.getScopeAtIndex(0);
   let withScope = gVariables.getScopeAtIndex(1);
   let functionScope = gVariables.getScopeAtIndex(2);
   let globalScope = gVariables.getScopeAtIndex(3);
@@ -224,14 +221,13 @@ function prepareVariablesAndProperties()
   functionScope.expand();
   globalScope.expand();
 
   return deferred.promise;
 }
 
 registerCleanupFunction(function() {
   gTab = null;
-  gDebuggee = null;
   gPanel = null;
   gDebugger = null;
   gVariables = null;
   gSearchBox = null;
 });