Bug 1408915 - Enable and rename browser_webconsole_add_edited_input_to_history.js in the new console frontend; r=Honza.
MozReview-Commit-ID: 41xj6osEFOM
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
@@ -190,29 +190,28 @@ skip-if = true # Bug 1406060
skip-if = true # Bug 1406060
[browser_console_webconsole_ctrlw_close_tab.js]
skip-if = true # Bug 1406060
[browser_console_webconsole_iframe_messages.js]
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_add_edited_input_to_history.js]
[browser_jsterm_copy_command.js]
skip-if = true
subsuite = clipboard
# old console skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
[browser_jsterm_dollar.js]
[browser_jsterm_history_persist.js]
[browser_jsterm_inspect.js]
[browser_jsterm_no_autocompletion_on_defined_variables.js]
[browser_jsterm_no_input_and_tab_key_pressed.js]
[browser_jsterm_no_input_change_and_tab_key_pressed.js]
[browser_netmonitor_shows_reqs_in_webconsole.js]
-[browser_webconsole_add_edited_input_to_history.js]
-skip-if = true # Bug 1408915
[browser_webconsole_allow_mixedcontent_securityerrors.js]
tags = mcb
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-properties-with-non-alphanumeric-names.js]
skip-if = true # Bug 1408916
rename from devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_add_edited_input_to_history.js
rename to devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_add_edited_input_to_history.js
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_add_edited_input_to_history.js
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_add_edited_input_to_history.js
@@ -7,26 +7,27 @@
// lost after navigating in history.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=817834
"use strict";
const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 817834";
add_task(function* () {
- yield loadTab(TEST_URI);
-
- let hud = yield openConsole();
-
+ let hud = yield openNewTabAndConsole(TEST_URI);
+ // Clearing history that might have been set in previous tests.
+ yield hud.jsterm.clearHistory();
testEditedInputHistory(hud);
+ yield hud.jsterm.clearHistory();
});
-function testEditedInputHistory(HUD) {
- let jsterm = HUD.jsterm;
+function testEditedInputHistory(hud) {
+ let jsterm = hud.jsterm;
let inputNode = jsterm.inputNode;
+
ok(!jsterm.getInputValue(), "jsterm.getInputValue() is empty");
is(inputNode.selectionStart, 0);
is(inputNode.selectionEnd, 0);
jsterm.setInputValue('"first item"');
EventUtils.synthesizeKey("VK_UP", {});
is(jsterm.getInputValue(), '"first item"', "null test history up");
EventUtils.synthesizeKey("VK_DOWN", {});