Bug 972684 - Don't use about:home in browser_findbar.js since it leads to intermittent failures and isn't necessary for the test. r=mikedeboer, a=test-only
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Tue, 08 Apr 2014 18:30:59 -0700
changeset 192647 97465c41accf7ab63bf3ecf36ecabfc842d8f1e3
parent 192646 14610637f19bb32d8a566450555c716d2ddcb314
child 192648 8ea30a5b565c85f16f3ec7c482b9be31642c1e21
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer, test-only
bugs972684
milestone30.0a2
Bug 972684 - Don't use about:home in browser_findbar.js since it leads to intermittent failures and isn't necessary for the test. r=mikedeboer, a=test-only
toolkit/content/tests/browser/browser_findbar.js
--- a/toolkit/content/tests/browser/browser_findbar.js
+++ b/toolkit/content/tests/browser/browser_findbar.js
@@ -16,40 +16,40 @@ registerCleanupFunction(function() {
 
 function test() {
   waitForExplicitFinish();
 
   Task.spawn(function() {
     info("Check correct 'Phrase not found' on new tab");
 
     // Create a tab to run the test.
-    yield promiseAboutHomeLoad();
+    yield promiseTestPageLoad();
 
     // Search for the first word.
     yield promiseFindFinished("--- THIS SHOULD NEVER MATCH ---", false);
     let findbar = gBrowser.getFindBar();
     is(findbar._findStatusDesc.textContent, findbar._notFoundStr,
        "Findbar status text should be 'Phrase not found'");
 
     // Create second tab.
-    yield promiseAboutHomeLoad();
+    yield promiseTestPageLoad();
 
     // Search for a string that WILL be found, with 'Highlight All' on
     yield promiseFindFinished("s", true);
     ok(!gBrowser.getFindBar()._findStatusDesc.textContent,
        "Findbar status should be empty");
 
     finish();
   });
 }
 
-function promiseAboutHomeLoad() {
+function promiseTestPageLoad() {
   let deferred = Promise.defer();
 
-  let tab = gBrowser.selectedTab = gBrowser.addTab("about:home");
+  let tab = gBrowser.selectedTab = gBrowser.addTab("data:text/html;charset=utf-8,The letter s.");
   gTabs.push(tab);
   let browser = gBrowser.selectedBrowser;
   browser.addEventListener("load", function listener() {
     if (browser.currentURI.spec == "about:blank")
       return;
     info("Page loaded: " + browser.currentURI.spec);
     browser.removeEventListener("load", listener, true);