Closed Bug 1437802 Opened 6 years ago Closed 6 years ago

Create selectNodeText(node) in new web console test head.js

Categories

(DevTools :: Console, enhancement, P1)

enhancement

Tracking

(firefox60 fixed)

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: miker, Assigned: miker)

Details

(Whiteboard: [newconsole-mvp])

Attachments

(1 file)

In order to focus a node in the web console the input must first be blurred or we will autofocus the input again.

To help with this we should have two helper functions:
devtools/client/webconsole/new-console-output/test/mochitest/head.js::selectNodeText(node)
devtools/client/webconsole/new-console-output/test/mochitest/head.js::isNodeSelected(node)

We should use this in current tests that use selection.
Has Regression Range: --- → irrelevant
Has STR: --- → irrelevant
We never actually select a node in bug 1404359 so it isn't a dependency.
No longer depends on: 1404359
We don't need isNodeSelected() because it is a one liner anyhow: `selection.containsNode(node)`

I have added `selectNodeText(hud, node)` to `devtools/client/webconsole/new-console-output/test/mochitest/head.js`.

The two tests that select nodes now use this helper:

- devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_output_copy_newlines.js
- devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_output_copy.js
Comment on attachment 8950550 [details]
Bug 1437802 - Create selectNodeText(node) in new web console test head.js

https://reviewboard.mozilla.org/r/219832/#review225604

Looks good to me. r+ with a green TRY
Attachment #8950550 - Flags: review?(nchevobbe) → review+
Pushed by mratcliffe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7398b884c9eb
Create selectNodeText(node) in new web console test head.js r=nchevobbe
Whiteboard: [newconsole-mvp]
https://hg.mozilla.org/mozilla-central/rev/7398b884c9eb
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: