зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1408918 - Rename and enable browser_webconsole_autocomplete_accessibility.js in new console frontend; r=Honza
MozReview-Commit-ID: CknvP7M1rVJ --HG-- rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_autocomplete_accessibility.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_accessibility.js extra : rebase_source : 4e755ebedb6360991b820a61a53544c604def4c4
This commit is contained in:
Родитель
827151f951
Коммит
aaaad9dd6d
|
@ -195,6 +195,7 @@ skip-if = true # Bug 1406060
|
|||
[browser_console_webconsole_private_browsing.js]
|
||||
skip-if = true # Bug 1403188
|
||||
# old console skip-if = e10s # Bug 1042253 - webconsole e10s tests
|
||||
[browser_jsterm_accessibility.js]
|
||||
[browser_jsterm_add_edited_input_to_history.js]
|
||||
[browser_jsterm_autocomplete_helpers.js]
|
||||
[browser_jsterm_autocomplete-properties-with-non-alphanumeric-names.js]
|
||||
|
@ -212,8 +213,6 @@ skip-if = true # Bug 1403452
|
|||
# old console skip-if = (os == 'win' && bits == 64) # Bug 1390001
|
||||
[browser_webconsole_assert.js]
|
||||
skip-if = true # Bug 1403458
|
||||
[browser_webconsole_autocomplete_accessibility.js]
|
||||
skip-if = true # Bug 1408918
|
||||
[browser_webconsole_autocomplete_and_selfxss.js]
|
||||
subsuite = clipboard
|
||||
skip-if = true # Bug 1404850
|
||||
|
|
|
@ -10,16 +10,14 @@
|
|||
|
||||
const TEST_URI = "data:text/html;charset=utf8,<p>test code completion";
|
||||
|
||||
add_task(function* () {
|
||||
yield loadTab(TEST_URI);
|
||||
|
||||
let hud = yield openConsole();
|
||||
add_task(async function () {
|
||||
let hud = await openNewTabAndConsole(TEST_URI);
|
||||
|
||||
let jsterm = hud.jsterm;
|
||||
let input = jsterm.inputNode;
|
||||
|
||||
info("Type 'd' to open the autocomplete popup");
|
||||
yield autocomplete(jsterm, "d");
|
||||
await autocomplete(jsterm, "d");
|
||||
|
||||
// Add listeners for focus and blur events.
|
||||
let wasBlurred = false;
|
||||
|
@ -30,7 +28,7 @@ add_task(function* () {
|
|||
});
|
||||
|
||||
let wasFocused = false;
|
||||
input.addEventListener("blur", () => {
|
||||
input.addEventListener("focus", () => {
|
||||
ok(wasBlurred, "jsterm input received a blur event before received back the focus");
|
||||
wasFocused = true;
|
||||
}, {
|
||||
|
@ -42,15 +40,15 @@ add_task(function* () {
|
|||
EventUtils.synthesizeKey("VK_TAB", {});
|
||||
|
||||
info("Wait for the autocomplete popup to be closed");
|
||||
yield onPopupClosed;
|
||||
await onPopupClosed;
|
||||
|
||||
ok(wasFocused, "jsterm input received a focus event");
|
||||
});
|
||||
|
||||
function* autocomplete(jsterm, value) {
|
||||
async function autocomplete(jsterm, value) {
|
||||
let popup = jsterm.autocompletePopup;
|
||||
|
||||
yield new Promise(resolve => {
|
||||
await new Promise(resolve => {
|
||||
jsterm.setInputValue(value);
|
||||
jsterm.complete(jsterm.COMPLETE_HINT_ONLY, resolve);
|
||||
});
|
Загрузка…
Ссылка в новой задаче