browser_dbg-tabs-without-urls-selected.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 // Test that URL-less sources have tabs and selecting that location does not 6 // create a new tab for the same URL-less source 7 8 "use strict"; 9 10 add_task(async function () { 11 const dbg = await initDebugger( 12 "doc-scripts.html", 13 "simple1.js", 14 "simple2.js" 15 ); 16 17 // Create a URL-less source 18 invokeInTab("doEval"); 19 await waitForPaused(dbg); 20 21 // Click a frame which shouldn't open a new source tab 22 await clickElement(dbg, "frame", 2); 23 24 // Click the frame to select the same location and ensure there's only 1 tab 25 is(countTabs(dbg), 1); 26 27 await resume(dbg); 28 });