Bug 1260199 - Remove yet another use of CPOWs in this test. r=mconley
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 13 Sep 2016 16:30:52 -0700
changeset 357415 3b3e87b91108ced2173ae34357cfed8db7cfe6c0
parent 357414 483725b39bb2639b164badc7ce5298ba2574f9b2
child 357423 dd3bc99fafd46295c50a87226c242cc60787b3b8
child 357484 8f7f5ce39b7d4e1dc2e12d9ac4f5fed945867a18
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1260199
milestone51.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 1260199 - Remove yet another use of CPOWs in this test. r=mconley MozReview-Commit-ID: RxKqmcl0aC
browser/base/content/test/general/browser_bookmark_titles.js
--- a/browser/base/content/test/general/browser_bookmark_titles.js
+++ b/browser/base/content/test/general/browser_bookmark_titles.js
@@ -24,17 +24,17 @@ add_task(function* () {
     let browser = gBrowser.selectedBrowser;
     browser.stop(); // stop the about:blank load.
 
     // Test that a bookmark of each URI gets the corresponding default title.
     for (let i = 0; i < tests.length; ++i) {
         let [uri, title] = tests[i];
 
         let promiseLoaded = promisePageLoaded(browser);
-        content.location = uri;
+        BrowserTestUtils.loadURI(browser, uri);
         yield promiseLoaded;
         yield checkBookmark(uri, title);
     }
 
     // Network failure test: now that dummy_page.html is in history, bookmarking
     // it should give the last known page title as the default bookmark title.
 
     // Simulate a network outage with offline mode. (Localhost is still
@@ -48,22 +48,24 @@ add_task(function* () {
     });
 
     // LOAD_FLAGS_BYPASS_CACHE isn't good enough. So clear the cache.
     Services.cache2.clear();
 
     let [uri, title] = tests[0];
 
     let promiseLoaded = promisePageLoaded(browser);
-    content.location = uri;
+    BrowserTestUtils.loadURI(browser, uri);
     yield promiseLoaded;
 
     // The offline mode test is only good if the page failed to load.
-    is(content.document.documentURI.substring(0, 14), 'about:neterror',
-        "Offline mode successfully simulated network outage.");
+    yield ContentTask.spawn(browser, null, function() {
+      is(content.document.documentURI.substring(0, 14), 'about:neterror',
+          "Offline mode successfully simulated network outage.");
+    });
     yield checkBookmark(uri, title);
 
     gBrowser.removeCurrentTab();
 });
 
 // Bookmark the current page and confirm that the new bookmark has the expected
 // title. (Then delete the bookmark.)
 function* checkBookmark(uri, expected_title) {