browser_webconsole_sourcemap_invalid.js (780B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 // Test that an invalid source map is reported. 7 8 const JS_URL = URL_ROOT + "code_bundle_invalidmap.js"; 9 10 const PAGE_URL = `data:text/html, 11 <!doctype html> 12 13 <html> 14 <head> 15 <meta charset="utf-8"/> 16 <title>Empty test page to test source map with invalid source map</title> 17 </head> 18 19 <body> 20 <script src="${JS_URL}"></script> 21 </body> 22 23 </html>`; 24 25 add_task(async function () { 26 await pushPref("devtools.source-map.client-service.enabled", true); 27 28 const hud = await openNewTabAndConsole(PAGE_URL); 29 30 const node = await waitFor(() => findWarningMessage(hud, "Source map error")); 31 ok(node, "source map error is displayed in web console"); 32 });