browser_webconsole_duplicate_errors.js (1000B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 // Tests that exceptions thrown by content don't show up twice in the Web 5 // Console. See Bug 582201. 6 7 "use strict"; 8 9 const TEST_URI = 10 "http://example.com/browser/devtools/client/webconsole/" + 11 "test/browser/test-duplicate-error.html"; 12 13 add_task(async function () { 14 // On e10s, the exception is triggered in child process 15 // and is ignored by test harness 16 if (!Services.appinfo.browserTabsRemoteAutostart) { 17 expectUncaughtException(); 18 } 19 const hud = await openNewTabAndConsole(TEST_URI); 20 21 await waitFor(() => findErrorMessage(hud, "fooDuplicateError1")); 22 23 const errorMessages = hud.ui.outputNode.querySelectorAll(".message.error"); 24 is( 25 errorMessages.length, 26 1, 27 "There's only one error message for fooDuplicateError1" 28 ); 29 is( 30 errorMessages[0].querySelector(".message-repeats"), 31 null, 32 "There is no repeat bubble on the error message" 33 ); 34 });