Bug 1401560 - Make sure console input is focused after opening the console. r=nchevobbe
authorabhinav <abhinav.koppula@gmail.com>
Fri, 06 Oct 2017 01:04:01 +0530
changeset 435608 2abcdba8a85cd073642df23d850139f9f414b1ba
parent 435607 3549d9c469cfc5c3a014884dd7216377a85482ab
child 435609 e42d927d6bb2b8a91e321126ff24d3b2d9c07285
push id8114
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 16:33:21 +0000
treeherdermozilla-beta@73e0d89a540f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnchevobbe
bugs1401560
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1401560 - Make sure console input is focused after opening the console. r=nchevobbe MozReview-Commit-ID: 3NVuavDKiPG
devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_input_focus.js
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_input_focus.js
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_input_focus.js
@@ -11,18 +11,21 @@ const TEST_URI =
   `data:text/html;charset=utf-8,Test input focused
   <script>
     console.log("console message 1");
   </script>`;
 
 add_task(function* () {
   let hud = yield openNewTabAndConsole(TEST_URI);
 
+  let inputNode = hud.jsterm.inputNode;
+  info("Focus after console is opened");
+  ok(hasFocus(inputNode), "input node is focused after console is opened");
+
   hud.jsterm.clearOutput();
-  let inputNode = hud.jsterm.inputNode;
   ok(hasFocus(inputNode), "input node is focused after output is cleared");
 
   info("Focus during message logging");
   ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
     content.wrappedJSObject.console.log("console message 2");
   });
   let msg = yield waitFor(() => findMessage(hud, "console message 2"));
   ok(hasFocus(inputNode, "input node is focused, first time"));