blob: 1f8bcc63d0203773a998ef5067c3ce6c87d4b182 (
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
33
34
35
|
/* 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/>. */
// Tests that the paused overlay isn't visible after resuming if the debugger paused
// while the DOM was still loading (Bug 1678636).
add_task(async function() {
const dbg = await initDebuggerWithAbsoluteURL(
"data:text/html,<meta charset=utf8><script>debugger;</script>"
);
info("Reload the page to hit the debugger statement while loading");
reload(dbg);
await waitForPaused(dbg);
// TODO: Check that the overlay is displayed (Bug 1580394), it's not at the moment.
ok(true, "We're paused");
// TODO: Resume with clicking on the overlay button, when Bug 1580394 is fixed.
info("Resume");
resume(dbg);
await waitFor(() => !isPaused(dbg), "Wait for the debugger to resume");
ok(true, "We're not paused anymore");
info("Wait for a bit, just to make sure the overlay isn't displayed");
await waitForTime(5000);
const testFront = await getTestActor(dbg.toolbox);
const isPausedOverlayVisible = await testFront.isPausedDebuggerOverlayVisible();
is(
isPausedOverlayVisible,
false,
"The pause overlay is not visible after resuming"
);
});
|