browser_webconsole_external_script_errors.js (797B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 // See Bug 597136. 7 8 const TEST_URI = 9 "http://example.com/browser/devtools/client/webconsole/" + 10 "test/browser/" + 11 "test-external-script-errors.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 20 const hud = await openNewTabAndConsole(TEST_URI); 21 22 const onMessage = waitForMessageByType(hud, "bogus is not defined", ".error"); 23 BrowserTestUtils.synthesizeMouseAtCenter( 24 "button", 25 {}, 26 gBrowser.selectedBrowser 27 ); 28 await onMessage; 29 30 ok(true, "Received the expected message"); 31 });