Bug 678763 - Intermittent browser_sourceeditor_initialization.js | application timed out after 330 seconds with no output; r=rcampbell
authorMihai Sucan <mihai.sucan@gmail.com>
Wed, 17 Aug 2011 15:35:35 +0300
changeset 76782 75eeb6cb7050af0c027302d7d76f228a888aa1bf
parent 76781 a2cc2d7fa5473f42c92ec2b8d99ccb90b92c5647
child 76783 c458adeca5b560d8f9ea9608f329e8f29e884e1e
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrcampbell
bugs678763
milestone9.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
Bug 678763 - Intermittent browser_sourceeditor_initialization.js | application timed out after 330 seconds with no output; r=rcampbell
browser/devtools/sourceeditor/test/Makefile.in
browser/devtools/sourceeditor/test/browser_sourceeditor_initialization.js
--- a/browser/devtools/sourceeditor/test/Makefile.in
+++ b/browser/devtools/sourceeditor/test/Makefile.in
@@ -43,9 +43,9 @@ relativesrcdir = browser/devtools/source
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_TEST_FILES = \
 		browser_sourceeditor_initialization.js \
 
 libs:: $(_BROWSER_TEST_FILES)
-#	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/devtools/sourceeditor/test/browser_sourceeditor_initialization.js
+++ b/browser/devtools/sourceeditor/test/browser_sourceeditor_initialization.js
@@ -14,31 +14,25 @@ function test()
 {
   waitForExplicitFinish();
 
   const windowUrl = "data:text/xml,<?xml version='1.0'?>" +
     "<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'" +
     " title='test for bug 660784' width='600' height='500'><hbox flex='1'/></window>";
   const windowFeatures = "chrome,titlebar,toolbar,centerscreen,resizable,dialog=no";
 
-  gBrowser.selectedTab = gBrowser.addTab();
-  gBrowser.selectedBrowser.addEventListener("load", function onTabLoad() {
-    gBrowser.selectedBrowser.removeEventListener("load", onTabLoad, true);
-
-    testWin = Services.ww.openWindow(null, windowUrl, "_blank", windowFeatures, null);
-    testWin.addEventListener("load", initEditor, false);
-  }, true);
-
-  content.location = "data:text/html,<p>bug 660784 - test the SourceEditor";
-
+  testWin = Services.ww.openWindow(null, windowUrl, "_blank", windowFeatures, null);
+  testWin.addEventListener("load", function onWindowLoad() {
+    testWin.removeEventListener("load", onWindowLoad, false);
+    waitForFocus(initEditor, testWin);
+  }, false);
 }
 
 function initEditor()
 {
-  testWin.removeEventListener("load", initEditor, false);
   testDoc = testWin.document;
 
   let hbox = testDoc.querySelector("hbox");
 
   editor = new SourceEditor();
   let config = {
     showLineNumbers: true,
     placeholderText: "foobarbaz",
@@ -322,20 +316,17 @@ function editorLoaded()
 
   editor.destroy();
   ok(!editor.parentElement && !editor.editorElement, "destroy() works");
 
   testWin.close();
 
   testWin = testDoc = editor = null;
 
-  waitForFocus(function() {
-    gBrowser.removeCurrentTab();
-    finish();
-  }, content);
+  waitForFocus(finish, window);
 }
 
 function testBackspaceKey()
 {
   editor.setText("       a\n  b\n c");
   editor.setCaretOffset(7);
   EventUtils.synthesizeKey("VK_BACK_SPACE", {}, testWin);
   is(editor.getText(), "a\n  b\n c", "line outdented (Backspace)");