browser_webconsole_worklet_error.js (732B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 // Tests that syntax errors in worklet scripts show in the console and that 5 // throwing uncaught errors and primitive values in worklets shows a stack. 6 7 "use strict"; 8 9 const TEST_URI = 10 "https://example.com/browser/devtools/client/webconsole/" + 11 "test/browser/test-error-worklet.html"; 12 13 add_task(async function () { 14 const hud = await openNewTabAndConsole(TEST_URI); 15 16 await waitFor(() => 17 findErrorMessage(hud, "SyntaxError: duplicate formal argument") 18 ); 19 ok(true, "Received expected SyntaxError"); 20 await checkMessageStack(hud, "addModule", [18, 21]); 21 await checkMessageStack(hud, "process", [7, 12]); 22 });