fune/devtools/client/webreplay/mochitest/browser_dbg_rr_logpoint-03.js
Brian Hackett 33f0851783 Bug 1582557 - Fix some stepping issues, r=jlast.
Differential Revision: https://phabricator.services.mozilla.com/D46518

--HG--
extra : moz-landing-system : lando
2019-09-19 21:18:57 +00:00

37 lines
1 KiB
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-disable no-undef */
"use strict";
// Test event logpoints when replaying.
add_task(async function() {
const dbg = await attachRecordingDebugger("doc_events.html", {
waitForRecording: true,
});
const console = await getDebuggerSplitConsole(dbg);
const hud = console.hud;
await dbg.actions.addEventListenerBreakpoints(["event.mouse.mousedown"]);
await dbg.actions.toggleEventLogging();
const msg = await waitForMessage(hud, "mousedown");
// The message's inline preview should contain useful properties.
const regexps = [
/target: HTMLDivElement/,
/clientX: \d+/,
/clientY: \d+/,
/layerX: \d+/,
/layerY: \d+/,
];
for (const regexp of regexps) {
ok(regexp.test(msg.textContent), `Message text includes ${regexp}`);
}
// When expanded, other properties should be visible.
await checkMessageObjectContents(msg, ["altKey: false", "bubbles: true"]);
await shutdownDebugger(dbg);
});