Merge m-c to fx-team
authorPanos Astithas <past@mozilla.com>
Mon, 07 Jan 2013 11:57:57 +0200
changeset 126968 ba8d801db3b283c47139cfaa89ca2fd2ae4b2e82
parent 126962 66d5958145545423548919ed605e5f997013c5e0 (current diff)
parent 126967 eddf3a4a9d49141941bc27e43ada9a87b79a3143 (diff)
child 126969 b9634bb5b16f95647a402bd5520bfaeb2c1d6f6a
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge m-c to fx-team
--- a/browser/devtools/debugger/test/browser_dbg_aaa_run_first_leaktest.js
+++ b/browser/devtools/debugger/test/browser_dbg_aaa_run_first_leaktest.js
@@ -26,38 +26,38 @@ function test()
 
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     resumed = true;
 
+    gDebugger.addEventListener("Debugger:SourceShown", onScriptShown);
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       executeSoon(startTest);
     });
 
     executeSoon(function() {
       gDebuggee.firstCall();
     });
   });
 
   function onScriptShown(aEvent)
   {
     scriptShown = aEvent.detail.url.indexOf("-02.js") != -1;
     executeSoon(startTest);
   }
 
-  window.addEventListener("Debugger:SourceShown", onScriptShown);
-
   function startTest()
   {
     if (scriptShown && framesAdded && resumed && !testStarted) {
-      window.removeEventListener("Debugger:SourceShown", onScriptShown);
+      gDebugger.removeEventListener("Debugger:SourceShown", onScriptShown);
       testStarted = true;
       Services.tm.currentThread.dispatch({ run: performTest }, 0);
     }
   }
 
   function performTest()
   {
     closeDebuggerAndFinish();
--- a/browser/devtools/debugger/test/browser_dbg_bug727429_watch-expressions-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_bug727429_watch-expressions-01.js
@@ -111,17 +111,17 @@ function test()
 
     closeDebuggerAndFinish();
   }
 
   function addAndCheckCustomExpression(total, index, string, noBlur) {
     addAndCheckExpressions(total, index, "", true);
 
     for (let i = 0; i < string.length; i++) {
-      EventUtils.sendChar(string[i]);
+      EventUtils.sendChar(string[i], gDebugger);
     }
 
     gDebugger.editor.focus();
 
     let id = gWatch.getItemAtIndex(index).attachment.id;
     let element = gDebugger.document.getElementById("expression-" + id);
 
     is(gWatch.getItemAtIndex(index).attachment.initialExpression, "",
--- a/browser/devtools/debugger/test/browser_dbg_bug727429_watch-expressions-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_bug727429_watch-expressions-02.js
@@ -121,65 +121,65 @@ function test()
   function test4(callback) {
     waitForWatchExpressions(function() {
       info("Performing test4");
       checkWatchExpressions(5, "sensational", 13);
       callback();
     });
     executeSoon(function() {
       gWatch.addExpression("a = 5");
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     });
   }
 
   function test5(callback) {
     waitForWatchExpressions(function() {
       info("Performing test5");
       checkWatchExpressions(5, "sensational", 13);
       callback();
     });
     executeSoon(function() {
       gWatch.addExpression("encodeURI(\"\\\")");
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     });
   }
 
   function test6(callback) {
     waitForWatchExpressions(function() {
       info("Performing test6");
       checkWatchExpressions(5, "sensational", 13);
       callback();
     })
     executeSoon(function() {
       gWatch.addExpression("decodeURI(\"\\\")");
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     });
   }
 
   function test7(callback) {
     waitForWatchExpressions(function() {
       info("Performing test7");
       checkWatchExpressions(5, "sensational", 13);
       callback();
     });
     executeSoon(function() {
       gWatch.addExpression("?");
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     });
   }
 
   function test8(callback) {
     waitForWatchExpressions(function() {
       info("Performing test8");
       checkWatchExpressions(5, "sensational", 13);
       callback();
     });
     executeSoon(function() {
       gWatch.addExpression("a");
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     });
   }
 
   function test9(callback) {
     waitForAfterFramesCleared(function() {
       info("Performing test9");
       callback();
     });
--- a/browser/devtools/debugger/test/browser_dbg_bug731394_editor-contextmenu.js
+++ b/browser/devtools/debugger/test/browser_dbg_bug731394_editor-contextmenu.js
@@ -26,38 +26,38 @@ function test()
 
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     resumed = true;
 
+    gDebugger.addEventListener("Debugger:SourceShown", onScriptShown);
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       executeSoon(startTest);
     });
 
     executeSoon(function() {
       gDebuggee.firstCall();
     });
   });
 
   function onScriptShown(aEvent) {
     scriptShown = aEvent.detail.url.indexOf("-02.js") != -1;
     executeSoon(startTest);
   }
 
-  window.addEventListener("Debugger:SourceShown", onScriptShown);
-
   function startTest()
   {
     if (scriptShown && framesAdded && resumed && !testStarted) {
       testStarted = true;
-      window.removeEventListener("Debugger:SourceShown", onScriptShown);
+      gDebugger.removeEventListener("Debugger:SourceShown", onScriptShown);
       Services.tm.currentThread.dispatch({ run: performTest }, 0);
     }
   }
 
   function performTest()
   {
     let scripts = gDebugger.DebuggerView.Sources._container;
 
--- a/browser/devtools/debugger/test/browser_dbg_bug740825_conditional-breakpoints-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_bug740825_conditional-breakpoints-01.js
@@ -31,38 +31,38 @@ function test()
     gPane = aPane;
     gDebugger = gPane.panelWin;
     gBreakpoints = gDebugger.DebuggerController.Breakpoints;
     gBreakpointsPane = gDebugger.DebuggerView.Breakpoints;
 
     gDebugger.DebuggerView.togglePanes({ visible: true, animated: false });
     resumed = true;
 
+    gDebugger.addEventListener("Debugger:SourceShown", onScriptShown);
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       executeSoon(startTest);
     });
 
     executeSoon(function() {
       gDebuggee.ermahgerd(); // ermahgerd!!
     });
   });
 
   function onScriptShown(aEvent)
   {
     scriptShown = aEvent.detail.url.indexOf("conditional-breakpoints") != -1;
     executeSoon(startTest);
   }
 
-  window.addEventListener("Debugger:SourceShown", onScriptShown);
-
   function startTest()
   {
     if (scriptShown && framesAdded && resumed && !testStarted) {
-      window.removeEventListener("Debugger:SourceShown", onScriptShown);
+      gDebugger.removeEventListener("Debugger:SourceShown", onScriptShown);
       testStarted = true;
       Services.tm.currentThread.dispatch({ run: addBreakpoints }, 0);
     }
   }
 
   function performTest()
   {
     gScripts = gDebugger.DebuggerView.Sources;
--- a/browser/devtools/debugger/test/browser_dbg_bug740825_conditional-breakpoints-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_bug740825_conditional-breakpoints-02.js
@@ -32,16 +32,18 @@ function test()
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     gBreakpoints = gDebugger.DebuggerController.Breakpoints;
     gBreakpointsPane = gDebugger.DebuggerView.Breakpoints;
 
+    gDebugger.addEventListener("Debugger:SourceShown", onScriptShown);
+
     gDebugger.DebuggerView.togglePanes({ visible: true, animated: false });
     resumed = true;
 
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       executeSoon(startTest);
     });
 
@@ -51,22 +53,20 @@ function test()
   });
 
   function onScriptShown(aEvent)
   {
     scriptShown = aEvent.detail.url.indexOf("conditional-breakpoints") != -1;
     executeSoon(startTest);
   }
 
-  window.addEventListener("Debugger:SourceShown", onScriptShown);
-
   function startTest()
   {
     if (scriptShown && framesAdded && resumed && !testStarted) {
-      window.removeEventListener("Debugger:SourceShown", onScriptShown);
+      gDebugger.removeEventListener("Debugger:SourceShown", onScriptShown);
       testStarted = true;
       Services.tm.currentThread.dispatch({ run: performTest }, 0);
     }
   }
 
   function performTest()
   {
     gScripts = gDebugger.DebuggerView.Sources;
@@ -161,17 +161,17 @@ function test()
         });
       });
     });
   }
 
   function modBreakpoint3()
   {
     write("bamboocha");
-    EventUtils.sendKey("RETURN");
+    EventUtils.sendKey("RETURN", gDebugger);
 
     waitForBreakpoint(14, function() {
       waitForCaretPos(13, function() {
         waitForPopup(false, function() {
           is(gBreakpointsPane.selectedClient.conditionalExpression, "bamboocha",
             "The bamboocha expression wasn't fonud on the conditional breakpoint");
 
           executeSoon(setContextMenu);
@@ -563,17 +563,17 @@ function test()
     clear();
     append(text);
   }
 
   function append(text) {
     gBreakpointsPane._cbTextbox.focus();
 
     for (let i = 0; i < text.length; i++) {
-      EventUtils.sendChar(text[i]);
+      EventUtils.sendChar(text[i], gDebugger);
     }
   }
 
   registerCleanupFunction(function() {
     removeTab(gTab);
     gPane = null;
     gTab = null;
     gDebuggee = null;
--- a/browser/devtools/debugger/test/browser_dbg_location-changes-blank.js
+++ b/browser/devtools/debugger/test/browser_dbg_location-changes-blank.js
@@ -17,33 +17,33 @@ function test()
   let framesAdded = false;
 
   debug_tab_pane(STACK_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
 
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+      let url = aEvent.detail.url;
+      if (url.indexOf("browser_dbg_stack") != -1) {
+        scriptShown = true;
+        gDebugger.removeEventListener(aEvent.type, _onEvent);
+        runTest();
+      }
+    });
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       runTest();
     });
 
     gDebuggee.simpleCall();
   });
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    let url = aEvent.detail.url;
-    if (url.indexOf("browser_dbg_stack") != -1) {
-      scriptShown = true;
-      window.removeEventListener(aEvent.type, _onEvent);
-      runTest();
-    }
-  });
-
   function runTest()
   {
     if (scriptShown && framesAdded) {
       Services.tm.currentThread.dispatch({ run: testSimpleCall }, 0);
     }
   }
 }
 
--- a/browser/devtools/debugger/test/browser_dbg_location-changes-new.js
+++ b/browser/devtools/debugger/test/browser_dbg_location-changes-new.js
@@ -17,33 +17,33 @@ function test()
   let framesAdded = false;
 
   debug_tab_pane(STACK_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
 
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+      let url = aEvent.detail.url;
+      if (url.indexOf("browser_dbg_stack") != -1) {
+        scriptShown = true;
+        gDebugger.removeEventListener(aEvent.type, _onEvent);
+        runTest();
+      }
+    });
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       runTest();
     });
 
     gDebuggee.simpleCall();
   });
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    let url = aEvent.detail.url;
-    if (url.indexOf("browser_dbg_stack") != -1) {
-      scriptShown = true;
-      window.removeEventListener(aEvent.type, _onEvent);
-      runTest();
-    }
-  });
-
   function runTest()
   {
     if (scriptShown && framesAdded) {
       Services.tm.currentThread.dispatch({ run: testSimpleCall }, 0);
     }
   }
 }
 
--- a/browser/devtools/debugger/test/browser_dbg_propertyview-edit-watch.js
+++ b/browser/devtools/debugger/test/browser_dbg_propertyview-edit-watch.js
@@ -149,18 +149,18 @@ function testFrameEval() {
     gDebuggee.ermahgerd(); // ermahgerd!!
   });
 }
 
 function testModification(aVar, aTest, aCallback, aNewValue, aNewResult, aArgResult,
                           aLocalScopeIndex = 1, aDeletionFlag = null)
 {
   function makeChangesAndExitInputMode() {
-    EventUtils.sendString(aNewValue);
-    EventUtils.sendKey("RETURN");
+    EventUtils.sendString(aNewValue, gDebugger);
+    EventUtils.sendKey("RETURN", gDebugger);
   }
 
   EventUtils.sendMouseEvent({ type: "dblclick" },
     aVar.querySelector(".name"),
     gDebugger);
 
   executeSoon(function() {
     ok(aVar.querySelector(".element-name-input"),
--- a/browser/devtools/debugger/test/browser_dbg_propertyview-edit.js
+++ b/browser/devtools/debugger/test/browser_dbg_propertyview-edit.js
@@ -60,18 +60,18 @@ function testFrameEval() {
 
   EventUtils.sendMouseEvent({ type: "click" },
     content.document.querySelector("button"),
     content.window);
 }
 
 function testModification(aVar, aCallback, aNewValue, aNewResult) {
   function makeChangesAndExitInputMode() {
-    EventUtils.sendString(aNewValue);
-    EventUtils.sendKey("RETURN");
+    EventUtils.sendString(aNewValue, gDebugger);
+    EventUtils.sendKey("RETURN", gDebugger);
   }
 
   EventUtils.sendMouseEvent({ type: "click" },
     aVar.querySelector(".value"),
     gDebugger);
 
   executeSoon(function() {
     ok(aVar.querySelector(".element-value-input"),
--- a/browser/devtools/debugger/test/browser_dbg_propertyview-filter-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_propertyview-filter-01.js
@@ -497,17 +497,17 @@ function write(text) {
   clear();
   append(text);
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
   gDebugger = null;
--- a/browser/devtools/debugger/test/browser_dbg_propertyview-filter-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_propertyview-filter-02.js
@@ -439,17 +439,17 @@ function write(text) {
   clear();
   append(text);
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
   gDebugger = null;
--- a/browser/devtools/debugger/test/browser_dbg_propertyview-filter-05.js
+++ b/browser/devtools/debugger/test/browser_dbg_propertyview-filter-05.js
@@ -64,17 +64,17 @@ function testVariablesFiltering()
 
     is(loadScope.querySelectorAll(".variable:not([non-match]) > .title > .name")[0].getAttribute("value"),
       "button", "The only load variable displayed should be 'button'");
 
     let oneItem = innerScopeItem.get("one");
     is(oneItem.expanded, false,
       "The one item in the inner scope should not be expanded");
 
-    EventUtils.sendKey("RETURN");
+    EventUtils.sendKey("RETURN", gDebugger);
     is(oneItem.expanded, true,
       "The one item in the inner scope should now be expanded");
   }
 
   function test2()
   {
     write("*two");
     ignoreExtraMatchedProperties();
@@ -103,17 +103,17 @@ function testVariablesFiltering()
 
     is(innerScope.querySelectorAll(".variable:not([non-match]) > .title > .name")[0].getAttribute("value"),
       "two", "The only inner variable displayed should be 'two'");
 
     let twoItem = innerScopeItem.get("two");
     is(twoItem.expanded, false,
       "The two item in the inner scope should not be expanded");
 
-    EventUtils.sendKey("RETURN");
+    EventUtils.sendKey("RETURN", gDebugger);
     is(twoItem.expanded, true,
       "The two item in the inner scope should now be expanded");
   }
 
   function test3()
   {
     backspace(3);
     ignoreExtraMatchedProperties();
@@ -280,25 +280,25 @@ function clear() {
 
 function write(text) {
   clear();
   append(text);
 }
 
 function backspace(times) {
   for (let i = 0; i < times; i++) {
-    EventUtils.sendKey("BACK_SPACE")
+    EventUtils.sendKey("BACK_SPACE", gDebugger)
   }
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
   gDebugger = null;
--- a/browser/devtools/debugger/test/browser_dbg_propertyview-filter-06.js
+++ b/browser/devtools/debugger/test/browser_dbg_propertyview-filter-06.js
@@ -36,43 +36,43 @@ function testVariablesFiltering()
     test1: function()
     {
       assertExpansion(1, [true, false, false, false, false]);
       clear();
     },
     test2: function()
     {
       assertExpansion(2, [true, false, false, false, false]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     },
     test3: function()
     {
       assertExpansion(3, [true, false, false, false, false]);
       gDebugger.editor.focus();
     },
     test4: function()
     {
       assertExpansion(4, [true, false, false, false, false]);
       write("*");
     },
     test5: function() {
       assertExpansion(5, [true, true, true, true, true]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     },
     test6: function() {
       assertExpansion(6, [true, true, true, true, true]);
       gDebugger.editor.focus();
     },
     test7: function() {
       assertExpansion(7, [true, true, true, true, true]);
       backspace(1);
     },
     test8: function() {
       assertExpansion(8, [true, true, true, true, true]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     },
     test9: function() {
       assertExpansion(9, [true, true, true, true, true]);
       gDebugger.editor.focus();
     },
     test10: function() {
       assertExpansion(10, [true, true, true, true, true]);
       innerScopeItem.collapse();
@@ -82,41 +82,41 @@ function testVariablesFiltering()
       globalScopeItem.collapse();
     },
     test11: function() {
       assertExpansion(11, [false, false, false, false, false]);
       clear();
     },
     test12: function() {
       assertExpansion(12, [false, false, false, false, false]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     },
     test13: function() {
       assertExpansion(13, [false, false, false, false, false]);
       gDebugger.editor.focus();
     },
     test14: function() {
       assertExpansion(14, [false, false, false, false, false]);
       write("*");
     },
     test15: function() {
       assertExpansion(15, [true, true, true, true, true]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     },
     test16: function() {
       assertExpansion(16, [true, true, true, true, true]);
       gDebugger.editor.focus();
     },
     test17: function() {
       assertExpansion(17, [true, true, true, true, true]);
       backspace(1);
     },
     test18: function() {
       assertExpansion(18, [true, true, true, true, true]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     },
     test19: function() {
       assertExpansion(19, [true, true, true, true, true]);
       gDebugger.editor.focus();
     },
     test20: function() {
       assertExpansion(20, [true, true, true, true, true]);
     }
@@ -222,25 +222,25 @@ function clear() {
 
 function write(text) {
   clear();
   append(text);
 }
 
 function backspace(times) {
   for (let i = 0; i < times; i++) {
-    EventUtils.sendKey("BACK_SPACE")
+    EventUtils.sendKey("BACK_SPACE", gDebugger)
   }
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
   gDebugger = null;
--- a/browser/devtools/debugger/test/browser_dbg_propertyview-filter-07.js
+++ b/browser/devtools/debugger/test/browser_dbg_propertyview-filter-07.js
@@ -36,43 +36,43 @@ function testVariablesFiltering()
     test1: function()
     {
       assertExpansion(1, [true, false, false, false, false]);
       clear();
     },
     test2: function()
     {
       assertExpansion(2, [true, false, false, false, false]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     },
     test3: function()
     {
       assertExpansion(3, [true, false, false, false, false]);
       gDebugger.editor.focus();
     },
     test4: function()
     {
       assertExpansion(4, [true, false, false, false, false]);
       write("*");
     },
     test5: function() {
       assertExpansion(5, [true, true, true, true, true]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     },
     test6: function() {
       assertExpansion(6, [true, true, true, true, true]);
       gDebugger.editor.focus();
     },
     test7: function() {
       assertExpansion(7, [true, true, true, true, true]);
       backspace(1);
     },
     test8: function() {
       assertExpansion(8, [true, true, true, true, true]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     },
     test9: function() {
       assertExpansion(9, [true, true, true, true, true]);
       gDebugger.editor.focus();
     },
     test10: function() {
       assertExpansion(10, [true, true, true, true, true]);
       innerScopeItem.collapse();
@@ -82,41 +82,41 @@ function testVariablesFiltering()
       globalScopeItem.collapse();
     },
     test11: function() {
       assertExpansion(11, [false, false, false, false, false]);
       clear();
     },
     test12: function() {
       assertExpansion(12, [false, false, false, false, false]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     },
     test13: function() {
       assertExpansion(13, [false, false, false, false, false]);
       gDebugger.editor.focus();
     },
     test14: function() {
       assertExpansion(14, [false, false, false, false, false]);
       write("*");
     },
     test15: function() {
       assertExpansion(15, [true, true, true, true, true]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     },
     test16: function() {
       assertExpansion(16, [true, true, true, true, true]);
       gDebugger.editor.focus();
     },
     test17: function() {
       assertExpansion(17, [true, true, true, true, true]);
       backspace(1);
     },
     test18: function() {
       assertExpansion(18, [true, true, true, true, true]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
     },
     test19: function() {
       assertExpansion(19, [true, true, true, true, true]);
       gDebugger.editor.focus();
     },
     test20: function() {
       assertExpansion(20, [true, true, true, true, true]);
     }
@@ -227,25 +227,25 @@ function clear() {
 
 function write(text) {
   clear();
   append(text);
 }
 
 function backspace(times) {
   for (let i = 0; i < times; i++) {
-    EventUtils.sendKey("BACK_SPACE")
+    EventUtils.sendKey("BACK_SPACE", gDebugger);
   }
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
   gDebugger = null;
--- a/browser/devtools/debugger/test/browser_dbg_propertyview-filter-08.js
+++ b/browser/devtools/debugger/test/browser_dbg_propertyview-filter-08.js
@@ -42,17 +42,17 @@ function testVariablesFiltering()
     test2: function(aCallback)
     {
       is(testScopeItem.get("arguments").expanded, false,
         "The arguments pseudoarray in the testScope should not be expanded");
       is(loadScopeItem.get("arguments").expanded, false,
         "The arguments pseudoarray in the testScope should not be expanded");
 
       assertExpansion(1, [true, true, true, true, true]);
-      EventUtils.sendKey("RETURN");
+      EventUtils.sendKey("RETURN", gDebugger);
       aCallback();
     },
     test3: function(aCallback)
     {
       is(testScopeItem.get("arguments").expanded, true,
         "The arguments pseudoarray in the testScope should now be expanded");
       is(loadScopeItem.get("arguments").expanded, true,
         "The arguments pseudoarray in the testScope should now be expanded");
@@ -297,25 +297,25 @@ function clear() {
 
 function write(text) {
   clear();
   append(text);
 }
 
 function backspace(times) {
   for (let i = 0; i < times; i++) {
-    EventUtils.sendKey("BACK_SPACE")
+    EventUtils.sendKey("BACK_SPACE", gDebugger);
   }
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
   gDebugger = null;
--- a/browser/devtools/debugger/test/browser_dbg_reload-preferred-script.js
+++ b/browser/devtools/debugger/test/browser_dbg_reload-preferred-script.js
@@ -26,33 +26,33 @@ function test()
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     gView = gDebugger.DebuggerView;
     resumed = true;
 
+    gDebugger.addEventListener("Debugger:SourceShown", onScriptShown);
+
     gView.Sources.preferredSource = EXAMPLE_URL + expectedScript;
     startTest();
   });
 
   function onScriptShown(aEvent)
   {
     expectedScriptShown = aEvent.detail.url.indexOf(expectedScript) != -1;
     scriptShownUrl = aEvent.detail.url;
     startTest();
   }
 
-  window.addEventListener("Debugger:SourceShown", onScriptShown);
-
   function startTest()
   {
     if (expectedScriptShown && resumed && !testStarted) {
-      window.removeEventListener("Debugger:SourceShown", onScriptShown);
+      gDebugger.removeEventListener("Debugger:SourceShown", onScriptShown);
       testStarted = true;
       Services.tm.currentThread.dispatch({ run: performTest }, 0);
     }
   }
 
   function performTest()
   {
     info("Currently preferred script: " + gView.Sources.preferredValue);
--- a/browser/devtools/debugger/test/browser_dbg_reload-same-script.js
+++ b/browser/devtools/debugger/test/browser_dbg_reload-same-script.js
@@ -27,16 +27,18 @@ function test()
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     gView = gDebugger.DebuggerView;
     resumed = true;
 
+    gDebugger.addEventListener("Debugger:SourceShown", onScriptShown);
+
     startTest();
   });
 
   function onScriptShown(aEvent)
   {
     expectedScriptShown = aEvent.detail.url.indexOf("-01.js") != -1;
     scriptShownUrl = aEvent.detail.url;
     startTest();
@@ -50,32 +52,30 @@ function test()
     info("The expected script for this ScriptShown event is: " + expectedScript);
     info("The current script for this ScriptShown event is: " + aEvent.detail.url);
 
     expectedScriptShown = aEvent.detail.url.indexOf(expectedScript) != -1;
     scriptShownUrl = aEvent.detail.url;
     testScriptShown();
   }
 
-  window.addEventListener("Debugger:SourceShown", onScriptShown);
-
   function startTest()
   {
     if (expectedScriptShown && resumed && !testStarted) {
-      window.removeEventListener("Debugger:SourceShown", onScriptShown);
-      window.addEventListener("Debugger:SourceShown", onUlteriorScriptShown);
+      gDebugger.removeEventListener("Debugger:SourceShown", onScriptShown);
+      gDebugger.addEventListener("Debugger:SourceShown", onUlteriorScriptShown);
       testStarted = true;
       Services.tm.currentThread.dispatch({ run: performTest }, 0);
     }
   }
 
   function finishTest()
   {
     if (expectedScriptShown && resumed && testStarted) {
-      window.removeEventListener("Debugger:SourceShown", onUlteriorScriptShown);
+      gDebugger.removeEventListener("Debugger:SourceShown", onUlteriorScriptShown);
       closeDebuggerAndFinish();
     }
   }
 
   function performTest()
   {
     testCurrentScript("-01.js", step);
     expectedScript = "-01.js";
--- a/browser/devtools/debugger/test/browser_dbg_script-switching.js
+++ b/browser/devtools/debugger/test/browser_dbg_script-switching.js
@@ -23,38 +23,38 @@ function test()
 
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     resumed = true;
 
+    gDebugger.addEventListener("Debugger:SourceShown", onScriptShown);
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       executeSoon(startTest);
     });
 
     executeSoon(function() {
       gDebuggee.firstCall();
     });
   });
 
   function onScriptShown(aEvent)
   {
     scriptShown = aEvent.detail.url.indexOf("-02.js") != -1;
     executeSoon(startTest);
   }
 
-  window.addEventListener("Debugger:SourceShown", onScriptShown);
-
   function startTest()
   {
     if (scriptShown && framesAdded && resumed && !testStarted) {
-      window.removeEventListener("Debugger:SourceShown", onScriptShown);
+      gDebugger.removeEventListener("Debugger:SourceShown", onScriptShown);
       testStarted = true;
       Services.tm.currentThread.dispatch({ run: testScriptsDisplay }, 0);
     }
   }
 }
 
 function testScriptsDisplay() {
   gScripts = gDebugger.DebuggerView.Sources._container;
@@ -82,20 +82,20 @@ function testScriptsDisplay() {
     label2), "Second script label is incorrect.");
 
   ok(gDebugger.editor.getText().search(/debugger/) != -1,
     "The correct script was loaded initially.");
 
   is(gDebugger.editor.getDebugLocation(), 5,
      "editor debugger location is correct.");
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     let url = aEvent.detail.url;
     if (url.indexOf("-01.js") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
       testSwitchPaused();
     }
   });
 
   gDebugger.DebuggerView.Sources.selectedValue = EXAMPLE_URL + label1;
 }
 
 function testSwitchPaused()
@@ -105,20 +105,20 @@ function testSwitchPaused()
 
   ok(gDebugger.editor.getText().search(/firstCall/) != -1,
     "The first script is displayed.");
 
   is(gDebugger.editor.getDebugLocation(), -1,
      "editor debugger location has been cleared.");
 
   gDebugger.DebuggerController.activeThread.resume(function() {
-    window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
       let url = aEvent.detail.url;
       if (url.indexOf("-02.js") != -1) {
-        window.removeEventListener(aEvent.type, _onEvent);
+        gDebugger.removeEventListener(aEvent.type, _onEvent);
         testSwitchRunning();
       }
     });
 
     gDebugger.DebuggerView.Sources.selectedValue = EXAMPLE_URL +
                                                    "test-script-switching-02.js";
   });
 }
--- a/browser/devtools/debugger/test/browser_dbg_scripts-searching-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_scripts-searching-01.js
@@ -21,30 +21,30 @@ function test()
   let framesAdded = false;
 
   debug_tab_pane(STACK_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
 
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
+      scriptShown = true;
+      runTest();
+    });
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       runTest();
     });
 
     gDebuggee.simpleCall();
   });
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
-    scriptShown = true;
-    runTest();
-  });
-
   function runTest()
   {
     if (scriptShown && framesAdded) {
       Services.tm.currentThread.dispatch({ run: testScriptSearching }, 0);
     }
   }
 }
 
@@ -58,78 +58,78 @@ function testScriptSearching() {
     gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
     gMenulist = gScripts._container;
 
     write(":12");
     ok(gEditor.getCaretPosition().line == 11 &&
        gEditor.getCaretPosition().col == 0,
       "The editor didn't jump to the correct line.");
 
-    EventUtils.synthesizeKey("g", { metaKey: true });
+    EventUtils.synthesizeKey("g", { metaKey: true }, gDebugger);
     ok(gEditor.getCaretPosition().line == 12 &&
        gEditor.getCaretPosition().col == 0,
       "The editor didn't jump to the correct line after Meta+G");
 
-    EventUtils.synthesizeKey("n", { ctrlKey: true });
+    EventUtils.synthesizeKey("n", { ctrlKey: true }, gDebugger);
     ok(gEditor.getCaretPosition().line == 13 &&
        gEditor.getCaretPosition().col == 0,
       "The editor didn't jump to the correct line after Ctrl+N");
 
-    EventUtils.synthesizeKey("G", { metaKey: true, shiftKey: true });
+    EventUtils.synthesizeKey("G", { metaKey: true, shiftKey: true }, gDebugger);
     ok(gEditor.getCaretPosition().line == 12 &&
        gEditor.getCaretPosition().col == 0,
       "The editor didn't jump to the correct line after Meta+Shift+G");
 
-    EventUtils.synthesizeKey("p", { ctrlKey: true });
+    EventUtils.synthesizeKey("p", { ctrlKey: true }, gDebugger);
     ok(gEditor.getCaretPosition().line == 11 &&
        gEditor.getCaretPosition().col == 0,
       "The editor didn't jump to the correct line after Ctrl+P");
 
     for (let i = 0; i < 100; i++) {
-      EventUtils.sendKey("DOWN");
+      EventUtils.sendKey("DOWN", gDebugger);
     }
     ok(gEditor.getCaretPosition().line == 32 &&
        gEditor.getCaretPosition().col == 0,
       "The editor didn't jump to the correct line after multiple DOWN keys");
 
     for (let i = 0; i < 100; i++) {
-      EventUtils.sendKey("UP");
+      EventUtils.sendKey("UP", gDebugger);
     }
     ok(gEditor.getCaretPosition().line == 0 &&
        gEditor.getCaretPosition().col == 0,
       "The editor didn't jump to the correct line after multiple UP keys");
 
 
     token = "debugger";
     write("#" + token);
     ok(gEditor.getCaretPosition().line == 2 &&
        gEditor.getCaretPosition().col == 44 + token.length,
       "The editor didn't jump to the correct token. (1)");
 
-    EventUtils.sendKey("DOWN");
+    EventUtils.sendKey("DOWN", gDebugger);
     ok(gEditor.getCaretPosition().line == 8 &&
        gEditor.getCaretPosition().col == 2 + token.length,
       "The editor didn't jump to the correct token. (2)");
 
-    EventUtils.sendKey("DOWN");
+    EventUtils.sendKey("DOWN", gDebugger);
     ok(gEditor.getCaretPosition().line == 12 &&
        gEditor.getCaretPosition().col == 8 + token.length,
       "The editor didn't jump to the correct token. (3)");
 
-    EventUtils.sendKey("RETURN");
+    EventUtils.sendKey("RETURN", gDebugger);
     ok(gEditor.getCaretPosition().line == 19 &&
        gEditor.getCaretPosition().col == 4 + token.length,
       "The editor didn't jump to the correct token. (4)");
 
-    EventUtils.sendKey("ENTER");
+    EventUtils.sendKey("ENTER", gDebugger);
     ok(gEditor.getCaretPosition().line == 2 &&
        gEditor.getCaretPosition().col == 44 + token.length,
       "The editor didn't jump to the correct token. (5)");
 
-    EventUtils.sendKey("UP");
+    EventUtils.sendKey("UP", gDebugger);
     ok(gEditor.getCaretPosition().line == 19 &&
        gEditor.getCaretPosition().col == 4 + token.length,
       "The editor didn't jump to the correct token. (5.1)");
 
 
     token = "debugger;";
     write(":bogus#" + token);
     ok(gEditor.getCaretPosition().line == 8 &&
@@ -222,24 +222,24 @@ function testScriptSearching() {
     write("#" + token);
     ok(gEditor.getCaretPosition().line == 2 &&
        gEditor.getCaretPosition().col == 44 + token.length,
       "The editor didn't jump to the correct token. (12.1)");
     isnot(gMenulist.getAttribute("label"), noMatchingScripts,
       "The menulist should not display a notice that matches are found.");
 
     clear();
-    EventUtils.sendKey("RETURN");
+    EventUtils.sendKey("RETURN", gDebugger);
     ok(gEditor.getCaretPosition().line == 2 &&
        gEditor.getCaretPosition().col == 44 + token.length,
       "The editor shouldn't jump to another token. (12.2)");
     isnot(gMenulist.getAttribute("label"), noMatchingScripts,
       "The menulist should not display a notice that matches are found.");
 
-    EventUtils.sendKey("ENTER");
+    EventUtils.sendKey("ENTER", gDebugger);
     ok(gEditor.getCaretPosition().line == 2 &&
        gEditor.getCaretPosition().col == 44 + token.length,
       "The editor shouldn't jump to another token. (12.3)");
     isnot(gMenulist.getAttribute("label"), noMatchingScripts,
       "The menulist should not display a notice that matches are found.");
 
 
     write(":1:2:3:a:b:c:::12");
@@ -247,37 +247,37 @@ function testScriptSearching() {
        gEditor.getCaretPosition().col == 0,
       "The editor didn't jump to the correct line. (13)");
 
     write("#don't#find#me#instead#find#" + token);
     ok(gEditor.getCaretPosition().line == 2 &&
        gEditor.getCaretPosition().col == 44 + token.length,
       "The editor didn't jump to the correct token. (14)");
 
-    EventUtils.sendKey("DOWN");
+    EventUtils.sendKey("DOWN", gDebugger);
     ok(gEditor.getCaretPosition().line == 8 &&
        gEditor.getCaretPosition().col == 2 + token.length,
       "The editor didn't jump to the correct token. (15)");
 
-    EventUtils.sendKey("DOWN");
+    EventUtils.sendKey("DOWN", gDebugger);
     ok(gEditor.getCaretPosition().line == 12 &&
        gEditor.getCaretPosition().col == 8 + token.length,
       "The editor didn't jump to the correct token. (16)");
 
-    EventUtils.sendKey("RETURN");
+    EventUtils.sendKey("RETURN", gDebugger);
     ok(gEditor.getCaretPosition().line == 19 &&
        gEditor.getCaretPosition().col == 4 + token.length,
       "The editor didn't jump to the correct token. (17)");
 
-    EventUtils.sendKey("ENTER");
+    EventUtils.sendKey("ENTER", gDebugger);
     ok(gEditor.getCaretPosition().line == 2 &&
        gEditor.getCaretPosition().col == 44 + token.length,
       "The editor didn't jump to the correct token. (18)");
 
-    EventUtils.sendKey("UP");
+    EventUtils.sendKey("UP", gDebugger);
     ok(gEditor.getCaretPosition().line == 19 &&
        gEditor.getCaretPosition().col == 4 + token.length,
       "The editor didn't jump to the correct token. (18.1)");
 
 
     clear();
     ok(gEditor.getCaretPosition().line == 19 &&
        gEditor.getCaretPosition().col == 4 + token.length,
@@ -300,17 +300,17 @@ function write(text) {
   clear();
   append(text);
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
   info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
--- a/browser/devtools/debugger/test/browser_dbg_scripts-searching-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_scripts-searching-02.js
@@ -23,33 +23,33 @@ function test()
   let framesAdded = false;
 
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
 
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+      let url = aEvent.detail.url;
+      if (url.indexOf("-02.js") != -1) {
+        scriptShown = true;
+        gDebugger.removeEventListener(aEvent.type, _onEvent);
+        runTest();
+      }
+    });
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       runTest();
     });
 
     gDebuggee.firstCall();
   });
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    let url = aEvent.detail.url;
-    if (url.indexOf("-02.js") != -1) {
-      scriptShown = true;
-      window.removeEventListener(aEvent.type, _onEvent);
-      runTest();
-    }
-  });
-
   function runTest()
   {
     if (scriptShown && framesAdded) {
       Services.tm.currentThread.dispatch({ run: testScriptSearching }, 0);
     }
   }
 }
 
@@ -60,23 +60,23 @@ function testScriptSearching() {
     gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
     gMenulist = gScripts._container;
 
     firstSearch();
   });
 }
 
 function firstSearch() {
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     info("Current script url:\n" + aEvent.detail.url + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = aEvent.detail.url;
     if (url.indexOf("-01.js") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
 
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 4 &&
            gEditor.getCaretPosition().col == 0,
           "The editor didn't jump to the correct line. (1)");
         is(gScripts.visibleItems.length, 1,
           "Not all the correct scripts are shown after the search. (1)");
@@ -86,23 +86,23 @@ function firstSearch() {
     }
   });
   write(".*-01\.js:5");
 }
 
 function secondSearch() {
   let token = "deb";
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     info("Current script url:\n" + aEvent.detail.url + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = aEvent.detail.url;
     if (url.indexOf("-02.js") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
 
       executeSoon(function() {
         append("#" + token);
 
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 5 &&
            gEditor.getCaretPosition().col == 8 + token.length,
           "The editor didn't jump to the correct line. (2)");
@@ -112,42 +112,42 @@ function secondSearch() {
         waitForFirstScript();
       });
     }
   });
   gScripts.selectedIndex = 1;
 }
 
 function waitForFirstScript() {
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     info("Current script url:\n" + aEvent.detail.url + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = aEvent.detail.url;
     if (url.indexOf("-01.js") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
 
       executeSoon(function() {
         thirdSearch();
       });
     }
   });
   gScripts.selectedIndex = 0;
 }
 
 function thirdSearch() {
   let token = "deb";
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     info("Current script url:\n" + aEvent.detail.url + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = aEvent.detail.url;
     if (url.indexOf("-02.js") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
 
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 5 &&
            gEditor.getCaretPosition().col == 8 + token.length,
           "The editor didn't jump to the correct line. (3)");
         is(gScripts.visibleItems.length, 1,
           "Not all the correct scripts are shown after the search. (3)");
@@ -162,17 +162,17 @@ function thirdSearch() {
 function fourthSearch(i, string, token) {
   info("Searchbox value: " + gSearchBox.value);
 
   ok(gEditor.getCaretPosition().line == 5 &&
      gEditor.getCaretPosition().col == 8 + token.length + i,
     "The editor didn't remain at the correct token. (4)");
 
   if (string[i]) {
-    EventUtils.sendChar(string[i]);
+    EventUtils.sendChar(string[i], gDebugger);
     fourthSearch(i + 1, string, token);
     return;
   }
 
   clear();
   ok(gEditor.getCaretPosition().line == 5 &&
      gEditor.getCaretPosition().col == 8 + token.length + i,
     "The editor didn't remain at the correct token. (5)");
@@ -240,17 +240,17 @@ function write(text) {
   clear();
   append(text);
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
   info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
--- a/browser/devtools/debugger/test/browser_dbg_scripts-searching-03.js
+++ b/browser/devtools/debugger/test/browser_dbg_scripts-searching-03.js
@@ -25,33 +25,33 @@ function test()
 
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     gDebugger.SourceResults.prototype.alwaysExpand = false;
 
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+      let url = aEvent.detail.url;
+      if (url.indexOf("-02.js") != -1) {
+        scriptShown = true;
+        gDebugger.removeEventListener(aEvent.type, _onEvent);
+        runTest();
+      }
+    });
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       runTest();
     });
 
     gDebuggee.firstCall();
   });
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    let url = aEvent.detail.url;
-    if (url.indexOf("-02.js") != -1) {
-      scriptShown = true;
-      window.removeEventListener(aEvent.type, _onEvent);
-      runTest();
-    }
-  });
-
   function runTest()
   {
     if (scriptShown && framesAdded) {
       Services.tm.currentThread.dispatch({ run: testScriptSearching }, 0);
     }
   }
 }
 
@@ -69,18 +69,18 @@ function testScriptSearching() {
 function firstSearch() {
   is(gSearchView._container._list.childNodes.length, 0,
     "The global search pane shouldn't have any child nodes yet.");
   is(gSearchView._container._parent.hidden, true,
     "The global search pane shouldn't be visible yet.");
   is(gSearchView._splitter.hidden, true,
     "The global search pane splitter shouldn't be visible yet.");
 
-  window.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 5 &&
@@ -185,18 +185,18 @@ function firstSearch() {
 function secondSearch() {
   isnot(gSearchView._container._list.childNodes.length, 0,
     "The global search pane should have some child nodes from the previous search.");
   is(gSearchView._container._parent.hidden, false,
     "The global search pane should be visible from the previous search.");
   is(gSearchView._splitter.hidden, false,
     "The global search pane splitter should be visible from the previous search.");
 
-  window.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 5 &&
@@ -306,25 +306,25 @@ function clear() {
 
 function write(text) {
   clear();
   append(text);
 }
 
 function backspace(times) {
   for (let i = 0; i < times; i++) {
-    EventUtils.sendKey("BACK_SPACE")
+    EventUtils.sendKey("BACK_SPACE", gDebugger);
   }
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
   info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
--- a/browser/devtools/debugger/test/browser_dbg_scripts-searching-04.js
+++ b/browser/devtools/debugger/test/browser_dbg_scripts-searching-04.js
@@ -25,33 +25,33 @@ function test()
 
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     gDebugger.SourceResults.prototype.alwaysExpand = false;
 
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+      let url = aEvent.detail.url;
+      if (url.indexOf("-02.js") != -1) {
+        scriptShown = true;
+        gDebugger.removeEventListener(aEvent.type, _onEvent);
+        runTest();
+      }
+    });
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       runTest();
     });
 
     gDebuggee.firstCall();
   });
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    let url = aEvent.detail.url;
-    if (url.indexOf("-02.js") != -1) {
-      scriptShown = true;
-      window.removeEventListener(aEvent.type, _onEvent);
-      runTest();
-    }
-  });
-
   function runTest()
   {
     if (scriptShown && framesAdded) {
       Services.tm.currentThread.dispatch({ run: testScriptSearching }, 0);
     }
   }
 }
 
@@ -69,18 +69,18 @@ function testScriptSearching() {
 function doSearch() {
   is(gSearchView._container._list.childNodes.length, 0,
     "The global search pane shouldn't have any child nodes yet.");
   is(gSearchView._container._parent.hidden, true,
     "The global search pane shouldn't be visible yet.");
   is(gSearchView._splitter.hidden, true,
     "The global search pane splitter shouldn't be visible yet.");
 
-  window.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 5 &&
@@ -103,18 +103,18 @@ function doSearch() {
     }
   });
   executeSoon(function() {
     write("!eval");
   });
 }
 
 function doFirstJump() {
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + aEvent.detail.url + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = aEvent.detail.url;
     if (url.indexOf("-01.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 4 &&
@@ -125,23 +125,23 @@ function doFirstJump() {
 
         doSecondJump();
       });
     } else {
       ok(false, "We jumped in a bowl of hot lava (aka WRONG MATCH). That was bad for us.");
     }
   });
   executeSoon(function() {
-    EventUtils.sendKey("DOWN");
+    EventUtils.sendKey("DOWN", gDebugger);
   });
 }
 
 function doSecondJump() {
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + aEvent.detail.url + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = aEvent.detail.url;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 5 &&
@@ -152,23 +152,23 @@ function doSecondJump() {
 
         doWrapAroundJump();
       });
     } else {
       ok(false, "We jumped in a bowl of hot lava (aka WRONG MATCH). That was bad for us.");
     }
   });
   executeSoon(function() {
-    EventUtils.sendKey("RETURN");
+    EventUtils.sendKey("RETURN", gDebugger);
   });
 }
 
 function doWrapAroundJump() {
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + aEvent.detail.url + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = aEvent.detail.url;
     if (url.indexOf("-01.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 4 &&
@@ -179,23 +179,23 @@ function doWrapAroundJump() {
 
         doBackwardsWrapAroundJump();
       });
     } else {
       ok(false, "We jumped in a bowl of hot lava (aka WRONG MATCH). That was bad for us.");
     }
   });
   executeSoon(function() {
-    EventUtils.sendKey("ENTER");
+    EventUtils.sendKey("ENTER", gDebugger);
   });
 }
 
 function doBackwardsWrapAroundJump() {
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + aEvent.detail.url + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = aEvent.detail.url;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 5 &&
@@ -206,23 +206,23 @@ function doBackwardsWrapAroundJump() {
 
         testSearchTokenEmpty();
       });
     } else {
       ok(false, "We jumped in a bowl of hot lava (aka WRONG MATCH). That was bad for us.");
     }
   });
   executeSoon(function() {
-    EventUtils.sendKey("UP");
+    EventUtils.sendKey("UP", gDebugger);
   });
 }
 
 function testSearchTokenEmpty() {
-  window.addEventListener("Debugger:GlobalSearch:TokenEmpty", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:GlobalSearch:TokenEmpty", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 5 &&
@@ -254,25 +254,25 @@ function clear() {
 
 function write(text) {
   clear();
   append(text);
 }
 
 function backspace(times) {
   for (let i = 0; i < times; i++) {
-    EventUtils.sendKey("BACK_SPACE")
+    EventUtils.sendKey("BACK_SPACE", gDebugger);
   }
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
   info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
--- a/browser/devtools/debugger/test/browser_dbg_scripts-searching-05.js
+++ b/browser/devtools/debugger/test/browser_dbg_scripts-searching-05.js
@@ -25,33 +25,33 @@ function test()
 
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     gDebugger.SourceResults.prototype.alwaysExpand = false;
 
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+      let url = aEvent.detail.url;
+      if (url.indexOf("-02.js") != -1) {
+        scriptShown = true;
+        gDebugger.removeEventListener(aEvent.type, _onEvent);
+        runTest();
+      }
+    });
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       runTest();
     });
 
     gDebuggee.firstCall();
   });
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    let url = aEvent.detail.url;
-    if (url.indexOf("-02.js") != -1) {
-      scriptShown = true;
-      window.removeEventListener(aEvent.type, _onEvent);
-      runTest();
-    }
-  });
-
   function runTest()
   {
     if (scriptShown && framesAdded) {
       Services.tm.currentThread.dispatch({ run: testScriptSearching }, 0);
     }
   }
 }
 
@@ -69,18 +69,18 @@ function testScriptSearching() {
 function doSearch() {
   is(gSearchView._container._list.childNodes.length, 0,
     "The global search pane shouldn't have any child nodes yet.");
   is(gSearchView._container._parent.hidden, true,
     "The global search pane shouldn't be visible yet.");
   is(gSearchView._splitter.hidden, true,
     "The global search pane splitter shouldn't be visible yet.");
 
-  window.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 5 &&
@@ -113,32 +113,32 @@ function testLocationChange()
   let cacheCleared = false;
 
   function _maybeFinish() {
     if (viewCleared && cacheCleared) {
       closeDebuggerAndFinish();
     }
   }
 
-  window.addEventListener("Debugger:GlobalSearch:ViewCleared", function _onViewCleared(aEvent) {
-    window.removeEventListener(aEvent.type, _onViewCleared);
+  gDebugger.addEventListener("Debugger:GlobalSearch:ViewCleared", function _onViewCleared(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onViewCleared);
 
     is(gSearchView._container._list.childNodes.length, 0,
       "The global search pane shouldn't have any child nodes after a page navigation.");
     is(gSearchView._container._parent.hidden, true,
       "The global search pane shouldn't be visible after a page navigation.");
     is(gSearchView._splitter.hidden, true,
       "The global search pane splitter shouldn't be visible after a page navigation.");
 
     viewCleared = true;
     _maybeFinish();
   });
 
-  window.addEventListener("Debugger:GlobalSearch:CacheCleared", function _onCacheCleared(aEvent) {
-    window.removeEventListener(aEvent.type, _onCacheCleared);
+  gDebugger.addEventListener("Debugger:GlobalSearch:CacheCleared", function _onCacheCleared(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onCacheCleared);
 
     is(gSearchView._cache.size, 0,
       "The scripts sources cache for global searching should be cleared after a page navigation.")
 
     cacheCleared = true;
     _maybeFinish();
   });
 
@@ -154,17 +154,17 @@ function write(text) {
   clear();
   append(text);
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
   info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
--- a/browser/devtools/debugger/test/browser_dbg_scripts-searching-06.js
+++ b/browser/devtools/debugger/test/browser_dbg_scripts-searching-06.js
@@ -25,33 +25,33 @@ function test()
 
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     gDebugger.SourceResults.prototype.alwaysExpand = false;
 
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+      let url = aEvent.detail.url;
+      if (url.indexOf("-02.js") != -1) {
+        scriptShown = true;
+        gDebugger.removeEventListener(aEvent.type, _onEvent);
+        runTest();
+      }
+    });
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       runTest();
     });
 
     gDebuggee.firstCall();
   });
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    let url = aEvent.detail.url;
-    if (url.indexOf("-02.js") != -1) {
-      scriptShown = true;
-      window.removeEventListener(aEvent.type, _onEvent);
-      runTest();
-    }
-  });
-
   function runTest()
   {
     if (scriptShown && framesAdded) {
       Services.tm.currentThread.dispatch({ run: testScriptSearching }, 0);
     }
   }
 }
 
@@ -62,18 +62,18 @@ function testScriptSearching() {
     gSearchView = gDebugger.DebuggerView.GlobalSearch;
     gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
 
     doSearch();
   });
 }
 
 function doSearch() {
-  window.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 5 &&
@@ -89,18 +89,18 @@ function doSearch() {
     }
   });
   executeSoon(function() {
     write("!eval");
   });
 }
 
 function testSearchMatchNotFound() {
-  window.addEventListener("Debugger:GlobalSearch:MatchNotFound", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:GlobalSearch:MatchNotFound", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 5 &&
@@ -127,17 +127,17 @@ function write(text) {
   clear();
   append(text);
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
   info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
--- a/browser/devtools/debugger/test/browser_dbg_scripts-searching-07.js
+++ b/browser/devtools/debugger/test/browser_dbg_scripts-searching-07.js
@@ -26,33 +26,33 @@ function test()
 
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     gDebugger.SourceResults.prototype.alwaysExpand = false;
 
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+      let url = aEvent.detail.url;
+      if (url.indexOf("-02.js") != -1) {
+        scriptShown = true;
+        gDebugger.removeEventListener(aEvent.type, _onEvent);
+        runTest();
+      }
+    });
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       runTest();
     });
 
     gDebuggee.firstCall();
   });
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    let url = aEvent.detail.url;
-    if (url.indexOf("-02.js") != -1) {
-      scriptShown = true;
-      window.removeEventListener(aEvent.type, _onEvent);
-      runTest();
-    }
-  });
-
   function runTest()
   {
     if (scriptShown && framesAdded) {
       Services.tm.currentThread.dispatch({ run: testScriptSearching }, 0);
     }
   }
 }
 
@@ -63,18 +63,18 @@ function testScriptSearching() {
     gSearchView = gDebugger.DebuggerView.GlobalSearch;
     gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
 
     doSearch();
   });
 }
 
 function doSearch() {
-  window.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         continueTest();
       });
@@ -165,18 +165,18 @@ function testClickLineToJump(scriptResul
   let targetResults = scriptResults[0];
   let firstHeader = targetResults.querySelector(".dbg-results-header");
   let firstHeaderItem = gDebugger.SourceResults.getItemForElement(firstHeader);
   firstHeaderItem.instance.expand()
 
   is(firstHeaderItem.instance.expanded, true,
     "The first script results should be expanded after direct function call.");
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + aEvent.detail.url + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = aEvent.detail.url;
     if (url.indexOf("-01.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 0 &&
@@ -200,18 +200,18 @@ function testClickMatchToJump(scriptResu
   let targetResults = scriptResults[1];
   let secondHeader = targetResults.querySelector(".dbg-results-header");
   let secondHeaderItem = gDebugger.SourceResults.getItemForElement(secondHeader);
   secondHeaderItem.instance.expand()
 
   is(secondHeaderItem.instance.expanded, true,
     "The second script results should be expanded after direct function call.");
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + aEvent.detail.url + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = aEvent.detail.url;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 5 &&
@@ -241,17 +241,17 @@ function write(text) {
   clear();
   append(text);
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
   info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
--- a/browser/devtools/debugger/test/browser_dbg_scripts-searching-08.js
+++ b/browser/devtools/debugger/test/browser_dbg_scripts-searching-08.js
@@ -25,33 +25,33 @@ function test()
 
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     gDebugger.SourceResults.prototype.alwaysExpand = false;
 
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+      let url = aEvent.detail.url;
+      if (url.indexOf("-02.js") != -1) {
+        scriptShown = true;
+        gDebugger.removeEventListener(aEvent.type, _onEvent);
+        runTest();
+      }
+    });
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       runTest();
     });
 
     gDebuggee.firstCall();
   });
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    let url = aEvent.detail.url;
-    if (url.indexOf("-02.js") != -1) {
-      scriptShown = true;
-      window.removeEventListener(aEvent.type, _onEvent);
-      runTest();
-    }
-  });
-
   function runTest()
   {
     if (scriptShown && framesAdded) {
       Services.tm.currentThread.dispatch({ run: testScriptSearching }, 0);
     }
   }
 }
 
@@ -65,18 +65,18 @@ function testScriptSearching() {
     doSearch();
   });
 }
 
 function doSearch() {
   is(gSearchView._container._parent.hidden, true,
     "The global search pane shouldn't be visible yet.");
 
-  window.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         testFocusLost();
       });
@@ -89,18 +89,18 @@ function doSearch() {
   });
 }
 
 function testFocusLost()
 {
   is(gSearchView._container._parent.hidden, false,
     "The global search pane should be visible after a search.");
 
-  window.addEventListener("Debugger:GlobalSearch:ViewCleared", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:GlobalSearch:ViewCleared", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         reshowSearch();
       });
@@ -112,18 +112,18 @@ function testFocusLost()
     gDebugger.DebuggerView.editor.focus();
   });
 }
 
 function reshowSearch() {
   is(gSearchView._container._parent.hidden, true,
     "The global search pane shouldn't be visible after the search was stopped.");
 
-  window.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:GlobalSearch:MatchFound", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         testEscape();
       });
@@ -136,18 +136,18 @@ function reshowSearch() {
   });
 }
 
 function testEscape()
 {
   is(gSearchView._container._parent.hidden, false,
     "The global search pane should be visible after a re-search.");
 
-  window.addEventListener("Debugger:GlobalSearch:ViewCleared", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("Debugger:GlobalSearch:ViewCleared", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("-02.js") != -1) {
       executeSoon(function() {
         finalCheck();
       });
@@ -175,29 +175,29 @@ function clear() {
 
 function write(text) {
   clear();
   append(text);
 }
 
 function sendEnter() {
   gSearchBox.focus();
-  EventUtils.sendKey("ENTER");
+  EventUtils.sendKey("ENTER", gDebugger);
 }
 
 function sendEscape() {
   gSearchBox.focus();
-  EventUtils.sendKey("ESCAPE");
+  EventUtils.sendKey("ESCAPE", gDebugger);
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
   info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
--- a/browser/devtools/debugger/test/browser_dbg_scripts-searching-files_ui.js
+++ b/browser/devtools/debugger/test/browser_dbg_scripts-searching-files_ui.js
@@ -20,37 +20,38 @@ var gMenulist = null;
 
 function test()
 {
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
+
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
+      Services.tm.currentThread.dispatch({ run: testScriptSearching }, 0);
+    });
   });
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
-    Services.tm.currentThread.dispatch({ run: testScriptSearching }, 0);
-  });
 }
 
 function testScriptSearching() {
   gEditor = gDebugger.DebuggerView.editor;
   gScripts = gDebugger.DebuggerView.Sources;
   gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
   gFilteredSources = gDebugger.DebuggerView.FilteredSources;
   gMenulist = gScripts._container;
 
   firstSearch();
 }
 
 function firstSearch() {
-  window.addEventListener("popupshown", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("popupshown", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     is(gFilteredSources.totalItems, 3,
       "The filtered sources view should have 3 items available.");
     is(gFilteredSources.visibleItems.length, 3,
       "The filtered sources view should have 3 items visible.");
 
@@ -102,23 +103,23 @@ function firstSearch() {
   write(".");
 }
 
 function secondSearch() {
   let sourceshown = false;
   let popupshown = false;
   let proceeded = false;
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent1(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent1);
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent1(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent1);
     sourceshown = true;
     executeSoon(proceed);
   });
-  window.addEventListener("popupshown", function _onEvent2(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent2);
+  gDebugger.addEventListener("popupshown", function _onEvent2(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent2);
     popupshown = true;
     executeSoon(proceed);
   });
 
   function proceed() {
     if (!sourceshown || !popupshown || proceeded) {
       return;
     }
@@ -179,23 +180,23 @@ function secondSearch() {
   append("-0")
 }
 
 function thirdSearch() {
   let sourceshown = false;
   let popupshown = false;
   let proceeded = false;
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent1(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent1);
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent1(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent1);
     sourceshown = true;
     executeSoon(proceed);
   });
-  window.addEventListener("popupshown", function _onEvent2(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent2);
+  gDebugger.addEventListener("popupshown", function _onEvent2(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent2);
     popupshown = true;
     executeSoon(proceed);
   });
 
   function proceed() {
     if (!sourceshown || !popupshown || proceeded) {
       return;
     }
@@ -252,17 +253,17 @@ function thirdSearch() {
     } else {
       ok(false, "How did you get here?");
     }
   }
   backspace(1)
 }
 
 function goDown() {
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     is(gFilteredSources.totalItems, 3,
       "The filtered sources view should have 3 items available.");
     is(gFilteredSources.visibleItems.length, 3,
       "The filtered sources view should have 3 items visible.");
 
@@ -270,37 +271,37 @@ function goDown() {
        gDebugger.SourceUtils.trimUrlLength(gScripts.selectedValue),
       "The correct item should be selected in the filtered sources view");
     is(gFilteredSources.selectedLabel,
        gDebugger.SourceUtils.trimUrlLength(gScripts.selectedLabel),
       "The correct item should be selected in the filtered sources view");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("test-editor-mode") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
 
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 0 &&
            gEditor.getCaretPosition().col == 0,
           "The editor didn't jump to the correct line.");
         is(gScripts.visibleItems.length, 3,
           "Not all the correct scripts are shown after the search.");
 
         goDownAgain();
       });
     } else {
       ok(false, "How did you get here?");
     }
   });
-  EventUtils.sendKey("DOWN");
+  EventUtils.sendKey("DOWN", gDebugger);
 }
 
 function goDownAgain() {
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     is(gFilteredSources.totalItems, 3,
       "The filtered sources view should have 3 items available.");
     is(gFilteredSources.visibleItems.length, 3,
       "The filtered sources view should have 3 items visible.");
 
@@ -308,37 +309,37 @@ function goDownAgain() {
        gDebugger.SourceUtils.trimUrlLength(gScripts.selectedValue),
       "The correct item should be selected in the filtered sources view");
     is(gFilteredSources.selectedLabel,
        gDebugger.SourceUtils.trimUrlLength(gScripts.selectedLabel),
       "The correct item should be selected in the filtered sources view");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("test-script-switching-01.js") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
 
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 0 &&
            gEditor.getCaretPosition().col == 0,
           "The editor didn't jump to the correct line.");
         is(gScripts.visibleItems.length, 3,
           "Not all the correct scripts are shown after the search.");
 
         goDownAndWrap();
       });
     } else {
       ok(false, "How did you get here?");
     }
   });
-  EventUtils.synthesizeKey("g", { metaKey: true });
+  EventUtils.synthesizeKey("g", { metaKey: true }, gDebugger);
 }
 
 function goDownAndWrap() {
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     is(gFilteredSources.totalItems, 3,
       "The filtered sources view should have 3 items available.");
     is(gFilteredSources.visibleItems.length, 3,
       "The filtered sources view should have 3 items visible.");
 
@@ -346,37 +347,37 @@ function goDownAndWrap() {
        gDebugger.SourceUtils.trimUrlLength(gScripts.selectedValue),
       "The correct item should be selected in the filtered sources view");
     is(gFilteredSources.selectedLabel,
        gDebugger.SourceUtils.trimUrlLength(gScripts.selectedLabel),
       "The correct item should be selected in the filtered sources view");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("update-editor-mode.html") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
 
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 0 &&
            gEditor.getCaretPosition().col == 0,
           "The editor didn't jump to the correct line.");
         is(gScripts.visibleItems.length, 3,
           "Not all the correct scripts are shown after the search.");
 
         goUpAndWrap();
       });
     } else {
       ok(false, "How did you get here?");
     }
   });
-  EventUtils.synthesizeKey("n", { ctrlKey: true });
+  EventUtils.synthesizeKey("n", { ctrlKey: true }, gDebugger);
 }
 
 function goUpAndWrap() {
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     is(gFilteredSources.totalItems, 3,
       "The filtered sources view should have 3 items available.");
     is(gFilteredSources.visibleItems.length, 3,
       "The filtered sources view should have 3 items visible.");
 
@@ -384,37 +385,37 @@ function goUpAndWrap() {
        gDebugger.SourceUtils.trimUrlLength(gScripts.selectedValue),
       "The correct item should be selected in the filtered sources view");
     is(gFilteredSources.selectedLabel,
        gDebugger.SourceUtils.trimUrlLength(gScripts.selectedLabel),
       "The correct item should be selected in the filtered sources view");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("test-script-switching-01.js") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
 
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 0 &&
            gEditor.getCaretPosition().col == 0,
           "The editor didn't jump to the correct line.");
         is(gScripts.visibleItems.length, 3,
           "Not all the correct scripts are shown after the search.");
 
         clickAndSwitch();
       });
     } else {
       ok(false, "How did you get here?");
     }
   });
-  EventUtils.sendKey("UP");
+  EventUtils.sendKey("UP", gDebugger);
 }
 
 function clickAndSwitch() {
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     is(gFilteredSources.totalItems, 3,
       "The filtered sources view should have 3 items available.");
     is(gFilteredSources.visibleItems.length, 3,
       "The filtered sources view should have 3 items visible.");
 
@@ -422,17 +423,17 @@ function clickAndSwitch() {
        gDebugger.SourceUtils.trimUrlLength(gScripts.selectedValue),
       "The correct item should be selected in the filtered sources view");
     is(gFilteredSources.selectedLabel,
        gDebugger.SourceUtils.trimUrlLength(gScripts.selectedLabel),
       "The correct item should be selected in the filtered sources view");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("update-editor-mode.html") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
 
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 0 &&
            gEditor.getCaretPosition().col == 0,
           "The editor didn't jump to the correct line.");
         is(gScripts.visibleItems.length, 3,
           "Not all the correct scripts are shown after the search.");
@@ -442,17 +443,17 @@ function clickAndSwitch() {
     } else {
       ok(false, "How did you get here?");
     }
   });
   EventUtils.sendMouseEvent({ type: "click" }, gFilteredSources.visibleItems[0].target);
 }
 
 function clickAndSwitchAgain() {
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     is(gFilteredSources.totalItems, 3,
       "The filtered sources view should have 3 items available.");
     is(gFilteredSources.visibleItems.length, 3,
       "The filtered sources view should have 3 items visible.");
 
@@ -460,17 +461,17 @@ function clickAndSwitchAgain() {
        gDebugger.SourceUtils.trimUrlLength(gScripts.selectedValue),
       "The correct item should be selected in the filtered sources view");
     is(gFilteredSources.selectedLabel,
        gDebugger.SourceUtils.trimUrlLength(gScripts.selectedLabel),
       "The correct item should be selected in the filtered sources view");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("test-script-switching-01.js") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
 
       executeSoon(function() {
         info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
         ok(gEditor.getCaretPosition().line == 0 &&
            gEditor.getCaretPosition().col == 0,
           "The editor didn't jump to the correct line.");
         is(gScripts.visibleItems.length, 3,
           "Not all the correct scripts are shown after the search.");
@@ -480,18 +481,18 @@ function clickAndSwitchAgain() {
     } else {
       ok(false, "How did you get here?");
     }
   });
   EventUtils.sendMouseEvent({ type: "click" }, gFilteredSources.visibleItems[2].target);
 }
 
 function switchFocusWithEscape() {
-  window.addEventListener("popuphidden", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("popuphidden", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
 
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("test-script-switching-01.js") != -1) {
 
       executeSoon(function() {
@@ -503,22 +504,22 @@ function switchFocusWithEscape() {
           "Not all the correct scripts are shown after the search.");
 
         focusAgainAfterEscape();
       });
     } else {
       ok(false, "How did you get here?");
     }
   });
-  EventUtils.sendKey("ESCAPE");
+  EventUtils.sendKey("ESCAPE", gDebugger);
 }
 
 function focusAgainAfterEscape() {
-  window.addEventListener("popupshown", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("popupshown", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
 
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("test-script-switching-01.js") != -1) {
 
       executeSoon(function() {
@@ -534,18 +535,18 @@ function focusAgainAfterEscape() {
     } else {
       ok(false, "How did you get here?");
     }
   });
   append("0");
 }
 
 function switchFocusWithReturn() {
-  window.addEventListener("popuphidden", function _onEvent(aEvent) {
-    window.removeEventListener(aEvent.type, _onEvent);
+  gDebugger.addEventListener("popuphidden", function _onEvent(aEvent) {
+    gDebugger.removeEventListener(aEvent.type, _onEvent);
 
     info("Current script url:\n" + gScripts.selectedValue + "\n");
     info("Debugger editor text:\n" + gEditor.getText() + "\n");
 
     let url = gScripts.selectedValue;
     if (url.indexOf("test-script-switching-01.js") != -1) {
 
       executeSoon(function() {
@@ -557,40 +558,40 @@ function switchFocusWithReturn() {
           "Not all the correct scripts are shown after the search.");
 
         closeDebuggerAndFinish();
       });
     } else {
       ok(false, "How did you get here?");
     }
   });
-  EventUtils.sendKey("RETURN");
+  EventUtils.sendKey("RETURN", gDebugger);
 }
 
 function clear() {
   gSearchBox.focus();
   gSearchBox.value = "";
 }
 
 function write(text) {
   clear();
   append(text);
 }
 
 function backspace(times) {
   for (let i = 0; i < times; i++) {
-    EventUtils.sendKey("BACK_SPACE")
+    EventUtils.sendKey("BACK_SPACE", gDebugger);
   }
 }
 
 function append(text) {
   gSearchBox.focus();
 
   for (let i = 0; i < text.length; i++) {
-    EventUtils.sendChar(text[i]);
+    EventUtils.sendChar(text[i], gDebugger);
   }
   info("Editor caret position: " + gEditor.getCaretPosition().toSource() + "\n");
 }
 
 registerCleanupFunction(function() {
   removeTab(gTab);
   gPane = null;
   gTab = null;
--- a/browser/devtools/debugger/test/browser_dbg_stack-05.js
+++ b/browser/devtools/debugger/test/browser_dbg_stack-05.js
@@ -19,33 +19,33 @@ function test() {
   let framesAdded = false;
 
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
 
+    gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+      let url = aEvent.detail.url;
+      if (url.indexOf("-02.js") != -1) {
+        scriptShown = true;
+        gDebugger.removeEventListener(aEvent.type, _onEvent);
+        runTest();
+      }
+    });
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       runTest();
     });
 
     gDebuggee.firstCall();
   });
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
-    let url = aEvent.detail.url;
-    if (url.indexOf("-02.js") != -1) {
-      scriptShown = true;
-      window.removeEventListener(aEvent.type, _onEvent);
-      runTest();
-    }
-  });
-
   function runTest()
   {
     if (scriptShown && framesAdded) {
       Services.tm.currentThread.dispatch({ run: testRecurse }, 0);
     }
   }
 }
 
--- a/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js
+++ b/browser/devtools/debugger/test/browser_dbg_update-editor-mode.js
@@ -28,37 +28,37 @@ function test()
   debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
     gTab = aTab;
     gDebuggee = aDebuggee;
     gPane = aPane;
     gDebugger = gPane.panelWin;
     gScripts = gDebugger.DebuggerView.Sources._container;
     resumed = true;
 
+    gDebugger.addEventListener("Debugger:SourceShown", onScriptShown);
+
     gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
       framesAdded = true;
       executeSoon(startTest);
     });
 
     executeSoon(function() {
       gDebuggee.firstCall();
     });
   });
 
   function onScriptShown(aEvent) {
     scriptShown = aEvent.detail.url.indexOf("test-editor-mode") != -1;
     executeSoon(startTest);
   }
 
-  window.addEventListener("Debugger:SourceShown", onScriptShown);
-
   function startTest()
   {
     if (scriptShown && framesAdded && resumed && !testStarted) {
-      window.removeEventListener("Debugger:SourceShown", onScriptShown);
+      gDebugger.removeEventListener("Debugger:SourceShown", onScriptShown);
       testStarted = true;
       Services.tm.currentThread.dispatch({ run: testScriptsDisplay }, 0);
     }
   }
 }
 
 function testScriptsDisplay() {
   is(gDebugger.DebuggerController.activeThread.state, "paused",
@@ -68,20 +68,20 @@ function testScriptsDisplay() {
     "Found the expected number of scripts.");
 
   is(gDebugger.editor.getMode(), SourceEditor.MODES.TEXT,
      "Found the expected editor mode.");
 
   ok(gDebugger.editor.getText().search(/debugger/) != -1,
     "The correct script was loaded initially.");
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     let url = aEvent.detail.url;
     if (url.indexOf("switching-01.js") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
       testSwitchPaused1();
     }
   });
 
   let url = gDebuggee.document.querySelector("script").src;
   gDebugger.DebuggerView.Sources.selectedValue = url;
 }
 
@@ -97,20 +97,20 @@ function testSwitchPaused1()
     "The second script is no longer displayed.");
 
   ok(gDebugger.editor.getText().search(/firstCall/) != -1,
     "The first script is displayed.");
 
   is(gDebugger.editor.getMode(), SourceEditor.MODES.JAVASCRIPT,
      "Found the expected editor mode.");
 
-  window.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
+  gDebugger.addEventListener("Debugger:SourceShown", function _onEvent(aEvent) {
     let url = aEvent.detail.url;
     if (url.indexOf("update-editor-mode") != -1) {
-      window.removeEventListener(aEvent.type, _onEvent);
+      gDebugger.removeEventListener(aEvent.type, _onEvent);
       testSwitchPaused2();
     }
   });
 
   let label = "browser_dbg_update-editor-mode.html";
   gDebugger.DebuggerView.Sources.selectedLabel = label;
 }
 
--- a/browser/devtools/framework/ToolDefinitions.jsm
+++ b/browser/devtools/framework/ToolDefinitions.jsm
@@ -144,16 +144,17 @@ let styleEditorDefinition = {
   }
 };
 
 let profilerDefinition = {
   id: "jsprofiler",
   killswitch: "devtools.profiler.enabled",
   url: "chrome://browser/content/profiler.xul",
   label: l10n("profiler.label", profilerStrings),
+  icon: "chrome://browser/skin/devtools/tool-profiler.png",
   tooltip: l10n("profiler.tooltip", profilerStrings),
 
   isTargetSupported: function (target) {
     return !target.isRemote;
   },
 
   build: function (frame, target) {
     let panel = new ProfilerPanel(frame, target);
--- a/browser/devtools/styleeditor/StyleEditorChrome.jsm
+++ b/browser/devtools/styleeditor/StyleEditorChrome.jsm
@@ -378,18 +378,20 @@ StyleEditorChrome.prototype = {
               if (newSheet != sheet) {
                 self._window.setTimeout(self.selectStyleSheet.bind(self, newSheet, newLine, newCol), 0);
               }
             }
           });
         } else {
           // If a line or column was specified we move the caret appropriately.
           aEditor.sourceEditor.setCaretPosition(line - 1, col - 1);
-          self._styleSheetToSelect = null;
+          this._styleSheetToSelect = null;
         }
+      } else {
+        this._styleSheetToSelect = null;
       }
 
       this._view.activeSummary = summary;
       this.selectedStyleSheetIndex = aEditor.styleSheetIndex;
     }.bind(this);
 
     if (!this.editors.length) {
       // We are in the main initialization phase so we wait for the editor
index 83842f236ef5ede55a268e67077532fc1764746f..8fa9c932bd9f26288f736f5d9820d8ff76f88569
GIT binary patch
literal 1383
zc$@)e1(^DYP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV000CeX+uL$Nkc;*
zP;zf(X>4Tx05}naRo`#hR1`jmZ&IWdKOk5~hl<6oRa0BJ8yc;~21%2p?MfD<>DVeH
z<T^KrsT&8|>9(p*dx19w`~g7O0}n_%Aq@s%d)fBDv`JHkDym6Hd+5XuAtvnwRpGmK
zVkc9?T=n|PIo~<wJLg{8L_J?=wVD}Kh?c9aozEndlcyGxo=u9<v(!ri)T`-EEs@L3
z5-!0N_s;9#9f}Cc?UC;OPWB_edW+oAi6T$HZWSGU8TbrQ%+zbPOBBBc`}k?M2Hf);
z@Y6N~0;>X-eVh__(Z?q}P9Z-Dj?gOW6|D%o20XmjW-qs4UjrD(li^iv8@eK9k+ZFm
zVRFymFOPAzG5-%Pn|1W;U4vNroTa&AxDScmEA~{ri9gr1^c?U@uwSpaNnw8l_>cP1
zd;)kMQS_;jeRSUEM_*s96y65j1$)tOrwdK{YIQMt92l|D^(E_=$Rjw{b!QT@q!)ni
zR`|5oW9X5n$Wv+HVc@|^eX5yXnsHX<gx$-tTA9oOBadXir_JPm2Y^4ct-PoO&C)tI
zGolvqOIK@duBk!Vu9{g<3;i;gJ6?~-DQ&xz!jvD&4!U-s8Os(*#?k2}f30SEXA#=i
z1-qUX+K`{!((H5w7<t$~ygD!D1{~X6)KX%$qrgY#L_{M_7A<1csY*MfP@XcB#Jxr~
zJS8&7goVS)VKE|4(h_Xlc{z{c$ApZs7riZ_QKdV_uW-M~u~<J-*#Z0?VzcZp8)p-w
zus7J7><CN2I>8PF3UX~a6)MwxDE0HaPjyrlI!;jX{6Kvuh*8ej?;85ekN$?5uuCiS
zBTvvVG+XTxAO{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dIzo7YfS
z>jPfmeNNHuFQn3EF7)-$bFaRV6IaT>QNxF>g9+W}ceBj}i7ny3L{Bl6vVog8j4~;W
YU#@V)?0xW-3IG5A07*qoM6N<$g6IHrzW@LL
--- a/browser/themes/gnomestripe/devtools/toolbox.css
+++ b/browser/themes/gnomestripe/devtools/toolbox.css
@@ -62,17 +62,17 @@
   padding: 0 8px;
   margin: 0;
   width: 16px;
 }
 
 .command-button:hover {
   background-color: hsla(206,37%,4%,.2);
 }
-.command-button:hover:active {
+.command-button:hover:active, .command-button[checked=true]:not(:hover) {
   background-color: hsla(206,37%,4%,.4);
 }
 
 #command-button-responsive {
   list-style-image: url("chrome://browser/skin/devtools/command-responsivemode.png");
   -moz-image-region: rect(0px, 16px, 16px, 0px);
 }
 #command-button-responsive:hover {
--- a/browser/themes/gnomestripe/jar.mn
+++ b/browser/themes/gnomestripe/jar.mn
@@ -177,16 +177,17 @@ browser.jar:
   skin/classic/browser/devtools/dock-side.png             (devtools/dock-side.png)
   skin/classic/browser/devtools/floating-scrollbars.css   (devtools/floating-scrollbars.css)
   skin/classic/browser/devtools/inspector.css             (devtools/inspector.css)
   skin/classic/browser/devtools/toolbox.css               (devtools/toolbox.css)
   skin/classic/browser/devtools/tool-webconsole.png       (devtools/tool-webconsole.png)
   skin/classic/browser/devtools/tool-debugger.png         (devtools/tool-debugger.png)
   skin/classic/browser/devtools/tool-inspector.png        (devtools/tool-inspector.png)
   skin/classic/browser/devtools/tool-styleeditor.png      (devtools/tool-styleeditor.png)
+  skin/classic/browser/devtools/tool-profiler.png         (devtools/tool-profiler.png)
   skin/classic/browser/devtools/close.png                 (devtools/close.png)
   skin/classic/browser/devtools/undock.png                (devtools/undock.png)
 #ifdef MOZ_SERVICES_SYNC
   skin/classic/browser/sync-16-throbber.png
   skin/classic/browser/sync-16.png
   skin/classic/browser/sync-24-throbber.png
   skin/classic/browser/sync-32.png
   skin/classic/browser/sync-bg.png
index 83842f236ef5ede55a268e67077532fc1764746f..8fa9c932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- a/browser/themes/pinstripe/devtools/toolbox.css
+++ b/browser/themes/pinstripe/devtools/toolbox.css
@@ -49,17 +49,17 @@
   padding: 0 8px;
   margin: 0;
   width: 16px;
 }
 
 .command-button:hover {
   background-color: hsla(206,37%,4%,.2);
 }
-.command-button:hover:active {
+.command-button:hover:active, .command-button[checked=true]:not(:hover) {
   background-color: hsla(206,37%,4%,.4);
 }
 
 #command-button-responsive {
   list-style-image: url("chrome://browser/skin/devtools/command-responsivemode.png");
   -moz-image-region: rect(0px, 16px, 16px, 0px);
 }
 #command-button-responsive:hover {
--- a/browser/themes/pinstripe/jar.mn
+++ b/browser/themes/pinstripe/jar.mn
@@ -248,16 +248,17 @@ browser.jar:
   skin/classic/browser/devtools/dock-side.png               (devtools/dock-side.png)
   skin/classic/browser/devtools/floating-scrollbars.css     (devtools/floating-scrollbars.css)
 * skin/classic/browser/devtools/inspector.css               (devtools/inspector.css)
   skin/classic/browser/devtools/toolbox.css                 (devtools/toolbox.css)
   skin/classic/browser/devtools/tool-webconsole.png         (devtools/tool-webconsole.png)
   skin/classic/browser/devtools/tool-debugger.png           (devtools/tool-debugger.png)
   skin/classic/browser/devtools/tool-inspector.png          (devtools/tool-inspector.png)
   skin/classic/browser/devtools/tool-styleeditor.png        (devtools/tool-styleeditor.png)
+  skin/classic/browser/devtools/tool-profiler.png           (devtools/tool-profiler.png)
   skin/classic/browser/devtools/close.png                   (devtools/close.png)
   skin/classic/browser/devtools/undock.png                  (devtools/undock.png)
 #ifdef MOZ_SERVICES_SYNC
   skin/classic/browser/sync-throbber.png
   skin/classic/browser/sync-16.png
   skin/classic/browser/sync-32.png
   skin/classic/browser/sync-bg.png
   skin/classic/browser/sync-128.png
index 83842f236ef5ede55a268e67077532fc1764746f..8fa9c932bd9f26288f736f5d9820d8ff76f88569
GIT binary patch
literal 1383
zc$@)e1(^DYP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV000CeX+uL$Nkc;*
zP;zf(X>4Tx05}naRo`#hR1`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Q%h)5K@^>N`81{eYe^ScQ%c)_i!NNb5K_An!G&E^QAAt_6$QaA+(=h-VRh455fL;B
zrhcJ*T8pTl_<=OoLZo7=lKzsWO-)|j|0UzOPaA_<2kx7hbI(0<=gxgx2*Lhmxc?1a
zVQjtEv^%+Adl=)*j0*{zY1oLc+*hiqSh75ZmuH~pb{psX8iF>JlS*sBHO|@TO0O%j
zij@TNy4@;qeiy+m-Oyhoe$3pseEsSe5l<XDzN0R%^{B7H*G7B6_^B$d>o%<!WsnwP
zt!h}4ieW9yCKu0!!{NH*%E~^tIaxZB+dDiw+`N!p?j{a0o!2z2-pQUmvZ8kaOf6?+
zO3e$Cz9te4@JTTKQ&!vay4f2D1bmrn{tj_-s@eNjK(`)}YJ75PH-U}=BAD0U#2)w(
zA7il=!ihs%2#(R7DvUfuJto`lui2uRg?6mHa7wCaKWBm;lJmLn=WO;1`G`YY&ZHX5
zmCk8Ui$eALz`(#pfF4qYxn<3KlU1~LJ^lUFgprRp#D#r}Mx!1_AS34o6~ms&<<y;j
zf*m{*3T+@mpz~VfBMxyP{Fe4kBdN0T(pO#4!adTF3}f*MtFWIJi@v8Lqjah>6sw>c
z9@hgeIJmNHS>|iTe7|cj^6c@wLQyP9l53Y&H4ctG85+`ca~cO|WV9xXe8j<JwD|a^
zo22ZdhVJ8I<MGyDu;~&o7Yg?(olHd{ky~*hb#xrwUQ_Eo0CoslF*iGVzNw*p5LYOc
zIuRP~*u+Gru`zf~lK46hsfo%5RneG9%wG&PZhM4a%W+a6Rt<o=tE;<qF1dIzo7YfS
z>jPfmeNNHuFQn3EF7)-$bFaRV6IaT>QNxF>g9+W}ceBj}i7ny3L{Bl6vVog8j4~;W
YU#@V)?0xW-3IG5A07*qoM6N<$g6IHrzW@LL
--- a/browser/themes/winstripe/devtools/toolbox.css
+++ b/browser/themes/winstripe/devtools/toolbox.css
@@ -65,17 +65,17 @@
   margin: 0;
   padding: 0 8px;
   width: 16px;
 }
 
 .command-button:hover {
   background-color: hsla(206,37%,4%,.2);
 }
-.command-button:hover:active {
+.command-button:hover:active, .command-button[checked=true]:not(:hover) {
   background-color: hsla(206,37%,4%,.4);
 }
 
 #command-button-responsive {
   list-style-image: url("chrome://browser/skin/devtools/command-responsivemode.png");
   -moz-image-region: rect(0px, 16px, 16px, 0px);
 }
 #command-button-responsive:hover {
--- a/browser/themes/winstripe/jar.mn
+++ b/browser/themes/winstripe/jar.mn
@@ -203,16 +203,17 @@ browser.jar:
         skin/classic/browser/devtools/dock-side.png                 (devtools/dock-side.png)
         skin/classic/browser/devtools/floating-scrollbars.css       (devtools/floating-scrollbars.css)
         skin/classic/browser/devtools/inspector.css                 (devtools/inspector.css)
         skin/classic/browser/devtools/toolbox.css                   (devtools/toolbox.css)
         skin/classic/browser/devtools/tool-webconsole.png           (devtools/tool-webconsole.png)
         skin/classic/browser/devtools/tool-debugger.png             (devtools/tool-debugger.png)
         skin/classic/browser/devtools/tool-inspector.png            (devtools/tool-inspector.png)
         skin/classic/browser/devtools/tool-styleeditor.png          (devtools/tool-styleeditor.png)
+        skin/classic/browser/devtools/tool-profiler.png             (devtools/tool-profiler.png)
         skin/classic/browser/devtools/close.png                     (devtools/close.png)
         skin/classic/browser/devtools/undock.png                    (devtools/undock.png)
 #ifdef MOZ_SERVICES_SYNC
         skin/classic/browser/sync-throbber.png
         skin/classic/browser/sync-16.png
         skin/classic/browser/sync-32.png
         skin/classic/browser/sync-128.png
         skin/classic/browser/sync-bg.png
@@ -424,16 +425,17 @@ browser.jar:
         skin/classic/aero/browser/devtools/dock-side.png             (devtools/dock-side.png)
         skin/classic/aero/browser/devtools/floating-scrollbars.css   (devtools/floating-scrollbars.css)
         skin/classic/aero/browser/devtools/inspector.css             (devtools/inspector.css)
         skin/classic/aero/browser/devtools/toolbox.css               (devtools/toolbox.css)
         skin/classic/aero/browser/devtools/tool-webconsole.png       (devtools/tool-webconsole.png)
         skin/classic/aero/browser/devtools/tool-debugger.png         (devtools/tool-debugger.png)
         skin/classic/aero/browser/devtools/tool-inspector.png        (devtools/tool-inspector.png)
         skin/classic/aero/browser/devtools/tool-styleeditor.png      (devtools/tool-styleeditor.png)
+        skin/classic/aero/browser/devtools/tool-profiler.png         (devtools/tool-profiler.png)
         skin/classic/aero/browser/devtools/close.png                 (devtools/close.png)
         skin/classic/aero/browser/devtools/undock.png                (devtools/undock.png)
 #ifdef MOZ_SERVICES_SYNC
         skin/classic/aero/browser/sync-throbber.png
         skin/classic/aero/browser/sync-16.png
         skin/classic/aero/browser/sync-32.png
         skin/classic/aero/browser/sync-128.png
         skin/classic/aero/browser/sync-bg.png