mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
The helper function waits for an event to be dispatched, which adds extra safety. Differential Revision: https://phabricator.services.mozilla.com/D53927
34 lines
905 B
JavaScript
34 lines
905 B
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
// Tests that commands run by the user are executed in content space.
|
|
|
|
"use strict";
|
|
|
|
const TEST_URI =
|
|
"http://example.com/browser/devtools/client/webconsole/" +
|
|
"test/browser/test-console.html";
|
|
|
|
add_task(async function() {
|
|
const hud = await openNewTabAndConsole(TEST_URI);
|
|
await clearOutput(hud);
|
|
|
|
const onInputMessage = waitForMessage(
|
|
hud,
|
|
"window.location.href;",
|
|
".message.command"
|
|
);
|
|
const onEvaluationResultMessage = waitForMessage(
|
|
hud,
|
|
TEST_URI,
|
|
".message.result"
|
|
);
|
|
execute(hud, "window.location.href;");
|
|
|
|
let message = await onInputMessage;
|
|
ok(message, "Input message is displayed with the expected class");
|
|
|
|
message = await onEvaluationResultMessage;
|
|
ok(message, "EvaluationResult message is displayed with the expected class");
|
|
});
|