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
36
37
38
39
40
41
42
43
44
45
46
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Test keyboard shortcuts.
*/
function pressResume(dbg) {
pressKey(dbg, "resumeKey");
return waitForPaused(dbg);
}
function pressStepOver(dbg) {
pressKey(dbg, "stepOverKey");
return waitForPaused(dbg);
}
function pressStepIn(dbg) {
pressKey(dbg, "stepInKey");
return waitForPaused(dbg);
}
function pressStepOut(dbg) {
pressKey(dbg, "stepOutKey");
return waitForPaused(dbg);
}
add_task(function*() {
const dbg = yield initDebugger("doc-debugger-statements.html");
yield reload(dbg);
yield waitForPaused(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 8);
yield pressResume(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 12);
yield pressStepIn(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 13);
yield pressStepOut(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 14);
yield pressStepOver(dbg);
assertPausedLocation(dbg, "debugger-statements.html", 9);
});
|