Bug 1412456 - Test changes to no longer use interposition (r=felipe,bgrins,mrbkap)

MozReview-Commit-ID: 2nQPOSGTr1s
This commit is contained in:
Bill McCloskey
2017-12-04 16:48:32 -08:00
parent 3709e9e8af
commit 427710d960
170 changed files with 658 additions and 666 deletions

View File

@@ -4,8 +4,6 @@ let NS_MAC_USER_LIB_DIR = "ULibDir";
function onPageLoad() {
gBrowser.selectedBrowser.removeEventListener("load", onPageLoad, true);
let dirSvc = Cc["@mozilla.org/file/directory_service;1"].
getService(Ci.nsIDirectoryServiceProvider);
@@ -34,7 +32,8 @@ function onPageLoad() {
let shell = Cc["@mozilla.org/browser/shell-service;1"].
getService(Ci.nsIShellService);
let image = content.document.images[0];
// eslint-disable-next-line mozilla/no-cpows-in-tests
let image = gBrowser.contentDocumentAsCPOW.images[0];
shell.setDesktopBackground(image, 0, "logo.png");
setTimeout(function() {
@@ -59,8 +58,8 @@ function onPageLoad() {
function test() {
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
gBrowser.selectedBrowser.addEventListener("load", onPageLoad, true);
content.location = "about:logo";
BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(onPageLoad, false, "about:logo");
gBrowser.loadURI("about:logo");
waitForExplicitFinish();
}