browser_dbg-sourcemaps-reloading-quickly.js (789B)
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 /* 6 * Test reloading an original file while the sourcemap is loading. 7 * The test passes when the selected source is visible after two reloads. 8 */ 9 10 "use strict"; 11 12 add_task(async function () { 13 const dbg = await initDebugger("doc-sourcemaps.html"); 14 15 await waitForSources(dbg, "entry.js"); 16 await selectSource(dbg, "entry.js"); 17 18 await reload(dbg); 19 await waitForSources(dbg, "bundle.js"); 20 21 await reload(dbg); 22 await waitForLoadedSource(dbg, "entry.js"); 23 24 ok( 25 getEditorContent(dbg).includes("window.keepMeAlive"), 26 "Original source text loaded correctly" 27 ); 28 });