browser_webconsole_worker_error.js (727B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 // Tests that throwing uncaught errors and primitive values in workers shows a 5 // stack in the console. 6 7 "use strict"; 8 9 const TEST_URI = 10 "http://example.com/browser/devtools/client/webconsole/" + 11 "test/browser/test-error-worker.html"; 12 13 add_task(async function () { 14 await pushPref("javascript.options.asyncstack_capture_debuggee_only", false); 15 16 const hud = await openNewTabAndConsole(TEST_URI); 17 18 await checkMessageStack(hud, "hello", [13, 4, 3]); 19 await checkMessageStack(hud, "there", [16, 4, 3]); 20 await checkMessageStack(hud, "dom", [18, 4, 3]); 21 await checkMessageStack(hud, "worker2", [6, 3, 3]); 22 });