Bug 1547084 Part 7 - Test changes for new control logic, r=loganfsmyth.
authorBrian Hackett <bhackett1024@gmail.com>
Sun, 12 May 2019 13:20:40 -1000
changeset 474177 d394c173d6a4a527d6da32fd0ef8fa110a83bb6b
parent 474176 85b94102fa34e3f261f2d6713ba3c5b88e72e31a
child 474178 786f094a30ae94722246f078561928990ab1e0b7
child 474183 73c897cf5ec08aa31c207cdd04cc7431b8404a1d
push id36023
push userncsoregi@mozilla.com
push dateThu, 16 May 2019 21:56:43 +0000
treeherdermozilla-central@786f094a30ae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersloganfsmyth
bugs1547084
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1547084 Part 7 - Test changes for new control logic, r=loganfsmyth.
devtools/client/webreplay/mochitest/browser.ini
devtools/client/webreplay/mochitest/browser_dbg_rr_console_warp-02.js
devtools/client/webreplay/mochitest/browser_dbg_rr_recovery-01.js
devtools/client/webreplay/mochitest/browser_dbg_rr_replay-02.js
devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-02.js
devtools/client/webreplay/mochitest/examples/doc_rr_recovery.html
--- a/devtools/client/webreplay/mochitest/browser.ini
+++ b/devtools/client/webreplay/mochitest/browser.ini
@@ -11,34 +11,31 @@ support-files =
   !/devtools/client/shared/test/test-actor-registry.js
   !/devtools/client/shared/test/test-actor.js
   !/devtools/client/debugger/test/mochitest/helpers.js
   !/devtools/client/debugger/test/mochitest/helpers/context.js
   !/devtools/client/inspector/test/shared-head.js
   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
   examples/styles.css
 
 [browser_dbg_rr_breakpoints-01.js]
 [browser_dbg_rr_breakpoints-02.js]
 [browser_dbg_rr_breakpoints-03.js]
 [browser_dbg_rr_breakpoints-04.js]
 [browser_dbg_rr_breakpoints-05.js]
 [browser_dbg_rr_record.js]
 [browser_dbg_rr_stepping-01.js]
 [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]
 [browser_dbg_rr_console_warp-01.js]
 [browser_dbg_rr_console_warp-02.js]
 [browser_dbg_rr_logpoint-01.js]
 [browser_dbg_rr_logpoint-02.js]
 [browser_rr_inspector-01.js]
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_console_warp-02.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_console_warp-02.js
@@ -13,17 +13,17 @@ add_task(async function() {
     { waitForRecording: true }
   );
 
   const {tab, toolbox, threadClient} = dbg;
   const console = await getDebuggerSplitConsole(dbg);
   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);
 
   message = findMessage(hud, "number: 1");
   ok(message.classList.contains("paused-before"), "paused before message is shown");
 
   await toolbox.destroy();
deleted file mode 100644
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_recovery-01.js
+++ /dev/null
@@ -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);
-});
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_replay-02.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_replay-02.js
@@ -40,19 +40,24 @@ add_task(async function() {
   gBrowser.selectedTab = replayingTab;
   await once(Services.ppmm, "HitRecordingEndpoint");
 
   const rplyTab = await attachDebugger(replayingTab);
   toolbox = rplyTab.toolbox;
   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);
   await checkEvaluateInTopFrame(target, "number", lastNumberValue);
 
   await client.removeBreakpoint(bp);
   await toolbox.destroy();
   await gBrowser.removeTab(replayingTab);
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-02.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-02.js
@@ -15,17 +15,22 @@ add_task(async function() {
 
   const { toolbox } = await attachDebugger(tab), client = toolbox.threadClient;
   await client.interrupt();
   const bp = await setBreakpoint(client, "doc_rr_basic.html", 22);
   await rewindToLine(client, 22);
   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);
   await toolbox.destroy();
   await gBrowser.removeTab(tab);
 });
deleted file mode 100644
--- a/devtools/client/webreplay/mochitest/examples/doc_rr_recovery.html
+++ /dev/null
@@ -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>