Bug 583041 - Style Editor integration; testfix; r=rcampbell
authorCedric Vivier <cedricv@neonux.com>
Mon, 07 Nov 2011 13:23:29 +0800
changeset 79890 fd725b4b78b34d984b9b011667b9d20b65c05087
parent 79889 43eb4cd0c2750191e1d01791794d541df53c0cd6
child 79891 fc249ee8d92178cc85f45f8eae6be0f35570de66
push id305
push userrcampbell@mozilla.com
push dateMon, 07 Nov 2011 14:51:56 +0000
treeherderfx-team@fd725b4b78b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrcampbell
bugs583041
milestone10.0a1
Bug 583041 - Style Editor integration; testfix; r=rcampbell
browser/devtools/scratchpad/test/browser_scratchpad_bug_660560_tab.js
--- a/browser/devtools/scratchpad/test/browser_scratchpad_bug_660560_tab.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_bug_660560_tab.js
@@ -13,17 +13,17 @@ function test()
   gBrowser.selectedBrowser.addEventListener("load", function() {
     gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
 
     ok(window.Scratchpad, "Scratchpad variable exists");
 
     Services.prefs.setIntPref("devtools.editor.tabsize", 5);
 
     gScratchpadWindow = Scratchpad.openScratchpad();
-    gScratchpadWindow.addEventListener("load", runTests, false);
+    waitForFocus(runTests, gScratchpadWindow);
   }, true);
 
   content.location = "data:text/html,Scratchpad test for the Tab key, bug 660560";
 }
 
 function runTests()
 {
   gScratchpadWindow.removeEventListener("load", arguments.callee, false);
@@ -59,17 +59,17 @@ function runTests()
 
   is(sp.editor.getCaretOffset(), 13, "caret location is correct after update");
 
   gScratchpadWindow.close();
 
   Services.prefs.setIntPref("devtools.editor.tabsize", 6);
   Services.prefs.setBoolPref("devtools.editor.expandtab", false);
   gScratchpadWindow = Scratchpad.openScratchpad();
-  gScratchpadWindow.addEventListener("load", runTests2, false);
+  waitForFocus(runTests2, gScratchpadWindow);
 }
 
 function runTests2()
 {
   gScratchpadWindow.removeEventListener("load", arguments.callee, false);
 
   let sp = gScratchpadWindow.Scratchpad;