Bug 1403910 - Enable and rename browser_webconsole_No_input_and_Tab_key_pressed.js on the new console frontend; r=Honza draft
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Thu, 12 Oct 2017 16:03:04 +0200
changeset 679288 049172d5ee87f16d585f6b01dfeb231eed8091f6
parent 678974 2ca37e969460f5dfe50b26ba94d55a6182f70d81
child 679319 ab4f454590556c0fa57d4a3cf2e85cbfffd57fb5
push id84182
push userbmo:nchevobbe@mozilla.com
push dateThu, 12 Oct 2017 14:03:38 +0000
reviewersHonza
bugs1403910
milestone58.0a1
Bug 1403910 - Enable and rename browser_webconsole_No_input_and_Tab_key_pressed.js on the new console frontend; r=Honza MozReview-Commit-ID: 1lq4QJ9JWb8
devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_no_input_and_tab_key_pressed.js
devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_No_input_and_Tab_key_pressed.js
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
@@ -200,21 +200,20 @@ skip-if = true #	Bug 1403188
 skip-if = true
 subsuite = clipboard
 # old console skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
 [browser_jsterm_history_persist.js]
 skip-if = true # Bug 1401881
 [browser_jsterm_inspect.js]
 [browser_jsterm_no_autocompletion_on_defined_variables.js]
 skip-if = true # Bug 1401881
+[browser_jsterm_no_input_and_tab_key_pressed.js]
 [browser_netmonitor_shows_reqs_in_webconsole.js]
 [browser_webconsole.js]
 skip-if = true #	Bug 1404829
-[browser_webconsole_No_input_and_Tab_key_pressed.js]
-skip-if = true #	Bug 1403910
 [browser_webconsole_No_input_change_and_Tab_key_pressed.js]
 skip-if = true #	Bug 1404882
 [browser_webconsole_add_edited_input_to_history.js]
 skip-if = true # Bug 1401881
 [browser_webconsole_allow_mixedcontent_securityerrors.js]
 tags = mcb
 skip-if = true #	Bug 1403452
 # old console skip-if = (os == 'win' && bits == 64) # Bug 1390001
rename from devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_No_input_and_Tab_key_pressed.js
rename to devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_no_input_and_tab_key_pressed.js
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_No_input_and_Tab_key_pressed.js
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_no_input_and_tab_key_pressed.js
@@ -2,36 +2,33 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // See Bug 583816.
 
-const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
-                 "test/browser/test-console.html";
+const TEST_URI = "data:text/html,Testing jsterm with no input";
 
 add_task(function* () {
-  yield loadTab(TEST_URI);
-
-  let hud = yield openConsole();
+  let hud = yield openNewTabAndConsole(TEST_URI);
   testCompletion(hud);
 });
 
 function testCompletion(hud) {
   let jsterm = hud.jsterm;
   let input = jsterm.inputNode;
 
   jsterm.setInputValue("");
   EventUtils.synthesizeKey("VK_TAB", {});
   is(jsterm.completeNode.value, "<- no result", "<- no result - matched");
   is(input.value, "", "inputnode is empty - matched");
-  is(input.getAttribute("focused"), "true", "input is still focused");
+  ok(hasFocus(input), "input is still focused");
 
   // Any thing which is not in property autocompleter
   jsterm.setInputValue("window.Bug583816");
   EventUtils.synthesizeKey("VK_TAB", {});
   is(jsterm.completeNode.value, "                <- no result",
      "completenode content - matched");
   is(input.value, "window.Bug583816", "inputnode content - matched");
-  is(input.getAttribute("focused"), "true", "input is still focused");
+  ok(hasFocus(input), "input is still focused");
 }