blob: 6500942d0ab420eeec94302ef563a819af3f0a63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
// Test switching for the top-level target.
"use strict";
const PARENT_PROCESS_URI = "about:robots";
add_task(async function () {
// Start the debugger on a parent process URL
const dbg = await initDebuggerWithAbsoluteURL(
PARENT_PROCESS_URI,
"aboutRobots.js"
);
// Navigate to a content process URL and check that the sources tree updates
await navigate(dbg, "doc-scripts.html", "simple1.js");
info("Wait for all sources to be in the store");
await waitFor(() => dbg.selectors.getSourceCount() == 5);
is(dbg.selectors.getSourceCount(), 5, "5 sources are loaded.");
// Check that you can still break after target switching.
await selectSource(dbg, "simple1.js");
await addBreakpoint(dbg, "simple1.js", 4);
invokeInTab("main");
await waitForPaused(dbg);
await waitForLoadedSource(dbg, "simple1.js");
await dbg.toolbox.closeToolbox();
});
|