browser_dbg-toggling-tools.js (671B)
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 // Tests that you can switch tools, without losing your editor position 6 7 "use strict"; 8 9 add_task(async function () { 10 const dbg = await initDebugger("doc-scripts.html", "long.js"); 11 12 await selectSource(dbg, "long.js"); 13 14 await scrollEditorIntoView(dbg, 20, 0); 15 ok(isScrolledPositionVisible(dbg, 20), "Editor is scrolled"); 16 17 pressKey(dbg, "inspector"); 18 pressKey(dbg, "debugger"); 19 20 ok(isScrolledPositionVisible(dbg, 20), "Editor is still scrolled"); 21 });