Closed Bug 1482826 Opened Last year Closed Last year

Fix DAMP autocomplete test

Categories

(DevTools :: Console, enhancement)

enhancement
Not set

Tracking

(firefox63 fixed)

RESOLVED FIXED
Firefox 63
Tracking Status
firefox63 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

The test regressed a lot (~60% when we enabled codeMirror in the jsterm).
This is because we are forcing the autocompletion to happen with jsterm.complete, but at the same time, setInputValue is triggering the actual autocompletion code path. 
So every call to the server is made twice, making the results erroneous.
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
We can now simply call setInputValue and the autocompletion
will happen. Since we are forcing the call to jsterm.complete,
there were 2 calls made to the server, making the measurements
in the test erroneous.
This also revealed a race in setInputValue: the text was
set by codeMirror before the cursor was actually moved. Which
means we were sending an erroneous autocompletion query to the
server.
We use codeMirror.operation to tell codeMirror to both set the
text and the cursor in a single operation.
Comment on attachment 8999541 [details]
Bug 1482826 - Fix DAMP autocomplete test; r=Honza.

Jan Honza Odvarko [:Honza] has approved the revision.
Attachment #8999541 - Flags: review+
Blocks: 1479521
https://hg.mozilla.org/mozilla-central/rev/d2d335ca743b
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in before you can comment on or make changes to this bug.