Bug 1547084 Part 7 - Test changes for new control logic, r=loganfsmyth.

--HG--
extra : rebase_source : f5ad9f30d803b76b7105b9b1ce75cac79e410bb8
This commit is contained in:
Brian Hackett 2019-05-12 13:20:40 -10:00
Родитель f8b3b7a4b3
Коммит a0dd622f44
6 изменённых файлов: 14 добавлений и 64 удалений

Просмотреть файл

@ -16,7 +16,6 @@ support-files =
examples/doc_rr_basic.html
examples/doc_rr_continuous.html
examples/doc_rr_logs.html
examples/doc_rr_recovery.html
examples/doc_rr_error.html
examples/doc_inspector_basic.html
examples/doc_inspector_styles.html
@ -32,8 +31,6 @@ support-files =
[browser_dbg_rr_stepping-02.js]
[browser_dbg_rr_stepping-03.js]
[browser_dbg_rr_stepping-04.js]
[browser_dbg_rr_recovery-01.js]
skip-if = true # See bug 1481009
[browser_dbg_rr_replay-01.js]
[browser_dbg_rr_replay-02.js]
[browser_dbg_rr_replay-03.js]

Просмотреть файл

@ -18,7 +18,7 @@ add_task(async function() {
const hud = console.hud;
let message = await warpToMessage(hud, dbg, "number: 1");
ok(!message.classList.contains("paused-before"), "paused before message is not shown");
ok(message.classList.contains("paused-before"), "paused before message is shown");
await stepOverToLine(threadClient, 18);
await reverseStepOverToLine(threadClient, 17);

Просмотреть файл

@ -1,31 +0,0 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-disable no-undef */
"use strict";
// Test basic recovery of crashed child processes in web replay.
add_task(async function() {
const tab = BrowserTestUtils.addTab(gBrowser, null, { recordExecution: "*" });
gBrowser.selectedTab = tab;
openTrustedLinkIn(EXAMPLE_URL + "doc_rr_recovery.html", "current");
await once(Services.ppmm, "RecordingFinished");
const { target, toolbox } = await attachDebugger(tab), client = toolbox.threadClient;
await client.interrupt();
await setBreakpoint(client, "doc_rr_recovery.html", 21);
await rewindToLine(client, 21);
await checkEvaluateInTopFrame(client,
"SpecialPowers.Cu.recordReplayDirective(/* CrashSoon */ 1)",
undefined);
await stepOverToLine(client, 22);
await stepOverToLine(client, 23);
await checkEvaluateInTopFrame(target,
"SpecialPowers.Cu.recordReplayDirective(/* CrashSoon */ 1); " +
"SpecialPowers.Cu.recordReplayDirective(/* MaybeCrash */ 2)",
undefined);
await toolbox.destroy();
await gBrowser.removeTab(tab);
});

Просмотреть файл

@ -45,9 +45,14 @@ add_task(async function() {
target = rplyTab.target;
client = toolbox.threadClient;
await client.interrupt();
// The recording does not actually end at the point where we saved it, but
// will do at the next checkpoint. Rewind to the point we are interested in.
bp = await setBreakpoint(client, "doc_rr_continuous.html", 14);
await rewindToLine(client, 14);
await checkEvaluateInTopFrame(target, "number", lastNumberValue);
await reverseStepOverToLine(client, 13);
bp = await setBreakpoint(client, "doc_rr_continuous.html", 14);
await rewindToLine(client, 14);
await checkEvaluateInTopFrame(target, "number", lastNumberValue - 1);
await resumeToLine(client, 14);

Просмотреть файл

@ -20,9 +20,14 @@ add_task(async function() {
await stepInToLine(client, 25);
await stepOverToLine(client, 26);
await stepOverToLine(client, 27);
await reverseStepInToLine(client, 33);
await reverseStepOverToLine(client, 26);
await stepInToLine(client, 30);
await stepOverToLine(client, 31);
await stepOverToLine(client, 32);
await stepOverToLine(client, 33);
await reverseStepOverToLine(client, 32);
await reverseStepOutToLine(client, 26);
await stepOutToLine(client, 27);
await reverseStepOverToLine(client, 26);
await reverseStepOverToLine(client, 25);
await client.removeBreakpoint(bp);

Просмотреть файл

@ -1,26 +0,0 @@
<html lang="en" dir="ltr">
<body>
<div id="maindiv">Hello World!</div>
</body>
<script>
// this line intentionally left blank
// this line intentionally left blank
// this line intentionally left blank
const cpmm = SpecialPowers.Services.cpmm;
var number = 0;
function f() {
updateNumber();
if (number >= 10) {
cpmm.sendAsyncMessage("RecordingFinished");
return;
}
window.setTimeout(f, 1);
}
function updateNumber() {
number++;
document.getElementById("maindiv").innerHTML = "Number: " + number;
SpecialPowers.Cu.recordReplayDirective(/* MaybeCrash */ 2);
}
window.setTimeout(f, 1);
</script>
</html>