browser_dbg-source-pragma.js (867B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */ 4 5 "use strict"; 6 7 add_task(async function () { 8 // Disable handling of //# source(Mapping)URL= comments. 9 await SpecialPowers.pushPrefEnv({ 10 set: [["javascript.options.source_pragmas", false]], 11 }); 12 13 const dbg = await initDebugger("doc-source-pragma.html"); 14 15 // The sourceURL pragma didn't rename the source 16 const source = await waitForSource(dbg, "source-pragma.js"); 17 const actors = dbg.selectors.getSourceActorsForSource(source.id); 18 19 is(actors.length, 1, "have a single actor"); 20 ok( 21 actors[0].url.endsWith("/source-pragma.js"), 22 "source url was not rewritten" 23 ); 24 is(actors[0].sourceMapURL, null, "source map was not exposed"); 25 });