mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1231879 - Fix tests: getElementById returns null on failure, not undefined, r=mrbkap
This commit is contained in:
parent
66c10aa734
commit
c50e99c5d9
@ -325,7 +325,7 @@ add_task(function* testDefaultDetails() {
|
||||
yield extension.unload();
|
||||
|
||||
let node = document.getElementById(pageActionId);
|
||||
is(node, undefined, "pageAction image removed from document");
|
||||
is(node, null, "pageAction image removed from document");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -129,7 +129,7 @@ add_task(function* testPageActionPopup() {
|
||||
panel.hidePopup();
|
||||
|
||||
panel = document.getElementById(panelId);
|
||||
is(panel, undefined, "panel successfully removed from document after hiding");
|
||||
is(panel, null, "panel successfully removed from document after hiding");
|
||||
}
|
||||
|
||||
extension.sendMessage("next-test");
|
||||
@ -141,5 +141,5 @@ add_task(function* testPageActionPopup() {
|
||||
yield extension.unload();
|
||||
|
||||
let panel = document.getElementById(panelId);
|
||||
is(panel, undefined, "browserAction panel removed from document");
|
||||
is(panel, null, "browserAction panel removed from document");
|
||||
});
|
||||
|
@ -226,12 +226,12 @@ add_task(function* testTabSwitchContext() {
|
||||
yield extension.unload();
|
||||
|
||||
let node = document.getElementById(pageActionId);
|
||||
is(node, undefined, "pageAction image removed from document");
|
||||
is(node, null, "pageAction image removed from document");
|
||||
|
||||
currentWindow = null;
|
||||
for (let win of windows.splice(0)) {
|
||||
node = win.document.getElementById(pageActionId);
|
||||
is(node, undefined, "pageAction image removed from second document");
|
||||
is(node, null, "pageAction image removed from second document");
|
||||
|
||||
yield BrowserTestUtils.closeWindow(win);
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ add_task(function* testPageActionPopup() {
|
||||
panel.hidePopup();
|
||||
|
||||
panel = document.getElementById(panelId);
|
||||
is(panel, undefined, "panel successfully removed from document after hiding");
|
||||
is(panel, null, "panel successfully removed from document after hiding");
|
||||
}
|
||||
|
||||
extension.sendMessage("next-test");
|
||||
@ -150,10 +150,10 @@ add_task(function* testPageActionPopup() {
|
||||
yield extension.unload();
|
||||
|
||||
let node = document.getElementById(pageActionId);
|
||||
is(node, undefined, "pageAction image removed from document");
|
||||
is(node, null, "pageAction image removed from document");
|
||||
|
||||
let panel = document.getElementById(panelId);
|
||||
is(panel, undefined, "pageAction panel removed from document");
|
||||
is(panel, null, "pageAction panel removed from document");
|
||||
});
|
||||
|
||||
|
||||
@ -197,7 +197,7 @@ add_task(function* testPageActionSecurity() {
|
||||
|
||||
let pageActionId = makeWidgetId(extension.id) + "-page-action";
|
||||
let node = document.getElementById(pageActionId);
|
||||
is(node, undefined, "pageAction image removed from document");
|
||||
is(node, null, "pageAction image removed from document");
|
||||
|
||||
SimpleTest.endMonitorConsole();
|
||||
yield waitForConsole;
|
||||
|
Loading…
Reference in New Issue
Block a user