mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Bug 1470922 - Fix tests failing with the new Jsterm; r=bgrins.
MozReview-Commit-ID: EaOSFmWa1tZ --HG-- extra : rebase_source : 7a499966af0bb4f318fa6d66c8e714a40207e638
This commit is contained in:
parent
ed14a440a5
commit
272f14e3e5
@ -52,8 +52,7 @@ function testUseKeyWithSplitConsole() {
|
||||
}, "jsdebugger");
|
||||
|
||||
info("synthesizeKey with the console focused");
|
||||
const consoleInput = gToolbox.getPanel("webconsole").hud.jsterm.inputNode;
|
||||
consoleInput.focus();
|
||||
focusConsoleInput();
|
||||
synthesizeKeyShortcut("F3", panelWin);
|
||||
|
||||
ok(commandCalled, "Shortcut key should trigger the command");
|
||||
@ -69,8 +68,7 @@ function testUseKeyWithSplitConsoleWrongTool() {
|
||||
}, "inspector");
|
||||
|
||||
info("synthesizeKey with the console focused");
|
||||
const consoleInput = gToolbox.getPanel("webconsole").hud.jsterm.inputNode;
|
||||
consoleInput.focus();
|
||||
focusConsoleInput();
|
||||
synthesizeKeyShortcut("F4", panelWin);
|
||||
|
||||
ok(!commandCalled, "Shortcut key shouldn't trigger the command");
|
||||
@ -81,3 +79,7 @@ async function cleanup() {
|
||||
gBrowser.removeCurrentTab();
|
||||
gToolbox = panelWin = null;
|
||||
}
|
||||
|
||||
function focusConsoleInput() {
|
||||
gToolbox.getPanel("webconsole").hud.jsterm.focus();
|
||||
}
|
||||
|
@ -28,8 +28,7 @@ add_task(async function() {
|
||||
const hud = toolbox.getPanel("webconsole").hud;
|
||||
const jsterm = hud.jsterm;
|
||||
|
||||
const jstermInput = jsterm.hud.document.querySelector(".jsterm-input-node");
|
||||
is(jstermInput.value, "temp0", "first console variable is named temp0");
|
||||
is(jsterm.getInputValue(), "temp0", "first console variable is named temp0");
|
||||
|
||||
let result = await jsterm.execute();
|
||||
isnot(result.textContent.indexOf('<p id="console-var">'), -1,
|
||||
@ -39,7 +38,7 @@ add_task(async function() {
|
||||
menuItem.click();
|
||||
await inspector.once("console-var-ready");
|
||||
|
||||
is(jstermInput.value, "temp1", "second console variable is named temp1");
|
||||
is(jsterm.getInputValue(), "temp1", "second console variable is named temp1");
|
||||
|
||||
result = await jsterm.execute();
|
||||
isnot(result.textContent.indexOf('<p id="console-var-multi">'), -1,
|
||||
|
Loading…
Reference in New Issue
Block a user