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 183687 b39c5ca49785
parent 183686 47c8852fde22
child 183688 14b8222e1a24
push id3447
push userryanvm@gmail.com
push date2014-04-09 18:07 +0000
treeherdermozilla-beta@44a94313968a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer, test-only
bugs972684
milestone29.0
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);