Bug 1408915 - Enable and rename browser_webconsole_add_edited_input_to_history.js in the new console frontend; r=Honza. draft
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Thu, 19 Oct 2017 08:59:32 +0200
changeset 683107 c088eb951b44fce1f5a17c12e7f1554ff759c913
parent 683106 18457577c2d665245877c8acc954df82b19d6e90
child 683111 cdfd228648de219b24790f931a282bbcc73704af
child 683395 9c6a4e51bcfa323105778ccfe8705f71d37e347f
push id85252
push userbmo:nchevobbe@mozilla.com
push dateThu, 19 Oct 2017 07:17:55 +0000
reviewersHonza
bugs1408915
milestone58.0a1
Bug 1408915 - Enable and rename browser_webconsole_add_edited_input_to_history.js in the new console frontend; r=Honza. MozReview-Commit-ID: 41xj6osEFOM
devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_add_edited_input_to_history.js
devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_add_edited_input_to_history.js
--- 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", {});