Bug 1231879 - Fix tests: getElementById returns null on failure, not undefined, r=mrbkap

This commit is contained in:
Steve Fink committed 2015-12-10 21:49:18 -08:00
1 parent 8e931c4d0e
commit 293080d49c
4 files changed
+9 -9

No files matched your search

@@ -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;