Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

/* Any copyright is dedicated to the Public Domain.
// Tests that exceptions thrown by content don't show up twice in the Web
// Console. See Bug 582201.
"use strict";
const TEST_URI =
"test/browser/test-duplicate-error.html";
add_task(async function () {
// On e10s, the exception is triggered in child process
// and is ignored by test harness
if (!Services.appinfo.browserTabsRemoteAutostart) {
expectUncaughtException();
}
const hud = await openNewTabAndConsole(TEST_URI);
await waitFor(() => findErrorMessage(hud, "fooDuplicateError1"));
const errorMessages = hud.ui.outputNode.querySelectorAll(".message.error");
is(
errorMessages.length,
1,
"There's only one error message for fooDuplicateError1"
);
is(
errorMessages[0].querySelector(".message-repeats"),
null,
"There is no repeat bubble on the error message"
);
});