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:
Nicolas Chevobbe 2017-10-23 09:07:14 +02:00
Родитель 827151f951
Коммит aaaad9dd6d
2 изменённых файлов: 8 добавлений и 11 удалений

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

@ -195,6 +195,7 @@ skip-if = true # Bug 1406060
[browser_console_webconsole_private_browsing.js] [browser_console_webconsole_private_browsing.js]
skip-if = true # Bug 1403188 skip-if = true # Bug 1403188
# old console skip-if = e10s # Bug 1042253 - webconsole e10s tests # old console skip-if = e10s # Bug 1042253 - webconsole e10s tests
[browser_jsterm_accessibility.js]
[browser_jsterm_add_edited_input_to_history.js] [browser_jsterm_add_edited_input_to_history.js]
[browser_jsterm_autocomplete_helpers.js] [browser_jsterm_autocomplete_helpers.js]
[browser_jsterm_autocomplete-properties-with-non-alphanumeric-names.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 # old console skip-if = (os == 'win' && bits == 64) # Bug 1390001
[browser_webconsole_assert.js] [browser_webconsole_assert.js]
skip-if = true # Bug 1403458 skip-if = true # Bug 1403458
[browser_webconsole_autocomplete_accessibility.js]
skip-if = true # Bug 1408918
[browser_webconsole_autocomplete_and_selfxss.js] [browser_webconsole_autocomplete_and_selfxss.js]
subsuite = clipboard subsuite = clipboard
skip-if = true # Bug 1404850 skip-if = true # Bug 1404850

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

@ -10,16 +10,14 @@
const TEST_URI = "data:text/html;charset=utf8,<p>test code completion"; const TEST_URI = "data:text/html;charset=utf8,<p>test code completion";
add_task(function* () { add_task(async function () {
yield loadTab(TEST_URI); let hud = await openNewTabAndConsole(TEST_URI);
let hud = yield openConsole();
let jsterm = hud.jsterm; let jsterm = hud.jsterm;
let input = jsterm.inputNode; let input = jsterm.inputNode;
info("Type 'd' to open the autocomplete popup"); info("Type 'd' to open the autocomplete popup");
yield autocomplete(jsterm, "d"); await autocomplete(jsterm, "d");
// Add listeners for focus and blur events. // Add listeners for focus and blur events.
let wasBlurred = false; let wasBlurred = false;
@ -30,7 +28,7 @@ add_task(function* () {
}); });
let wasFocused = false; let wasFocused = false;
input.addEventListener("blur", () => { input.addEventListener("focus", () => {
ok(wasBlurred, "jsterm input received a blur event before received back the focus"); ok(wasBlurred, "jsterm input received a blur event before received back the focus");
wasFocused = true; wasFocused = true;
}, { }, {
@ -42,15 +40,15 @@ add_task(function* () {
EventUtils.synthesizeKey("VK_TAB", {}); EventUtils.synthesizeKey("VK_TAB", {});
info("Wait for the autocomplete popup to be closed"); info("Wait for the autocomplete popup to be closed");
yield onPopupClosed; await onPopupClosed;
ok(wasFocused, "jsterm input received a focus event"); ok(wasFocused, "jsterm input received a focus event");
}); });
function* autocomplete(jsterm, value) { async function autocomplete(jsterm, value) {
let popup = jsterm.autocompletePopup; let popup = jsterm.autocompletePopup;
yield new Promise(resolve => { await new Promise(resolve => {
jsterm.setInputValue(value); jsterm.setInputValue(value);
jsterm.complete(jsterm.COMPLETE_HINT_ONLY, resolve); jsterm.complete(jsterm.COMPLETE_HINT_ONLY, resolve);
}); });