Bug 1260199 - Remove yet another use of CPOWs in this test. r=mconley
MozReview-Commit-ID: RxKqmcl0aC
--- 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) {