Bug 1655951 - Fix browser/browser_jsterm_evaluation_context_selector_pause_in_debugger.js failure. r=jdescottes.

It seems that the test was failing because the focus wasn't on the console by
the time we were trying to evaluate the input, so the Enter keypress wasn't
registered and the input not evaluated.
This is fixed by focusing the console input in `keyboardExecuteAndWaitForMessage`,
before hitting Enter.

Differential Revision: https://phabricator.services.mozilla.com/D85368
This commit is contained in:
Nicolas Chevobbe 2020-07-30 08:58:56 +00:00
Родитель 95e0f6f509
Коммит 6949d7f72c
2 изменённых файлов: 5 добавлений и 0 удалений

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

@ -61,6 +61,10 @@ add_task(async function() {
);
ok(true, "Evaluation result is the expected one");
// Cleanup
await clearOutput(hud);
setInputValue(hud, "");
info("Resume the debugger");
await resume(dbg);

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

@ -307,6 +307,7 @@ function keyboardExecuteAndWaitForMessage(
matchingText,
selector = ".message"
) {
hud.jsterm.focus();
setInputValue(hud, input);
const onMessage = waitForMessage(hud, matchingText, selector);
if (isEditorModeEnabled(hud)) {