browser_dbg-preview-module.js (965B)
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 hovering in a script that is paused on load 6 // and doesn't have functions. 7 8 "use strict"; 9 10 add_task(async function () { 11 const dbg = await initDebugger("doc-scripts.html"); 12 13 const onNavigated = navigate(dbg, "doc-on-load.html"); 14 15 // wait for `top-level.js` to load and to pause at a debugger statement 16 await waitForSelectedSource(dbg, "top-level.js"); 17 await waitForPaused(dbg); 18 19 await assertPreviews(dbg, [ 20 { 21 line: 1, 22 column: 6, 23 expression: "obj", 24 fields: [ 25 ["foo", "1"], 26 ["bar", "2"], 27 ], 28 }, 29 ]); 30 31 await assertPreviewTextValue(dbg, 2, 7, { result: "3", expression: "func" }); 32 33 info("Resume and wait for full navigation of the tab"); 34 await resume(dbg); 35 await onNavigated; 36 });