Closed Bug 1578436 Opened 2 months ago Closed 2 months ago

Handle input events on tip buttons

Categories

(Firefox :: Address Bar, enhancement, P2)

enhancement
Points:
5

Tracking

()

RESOLVED FIXED
Firefox 71
Iteration:
71.2 - Sept 16 - 29
Tracking Status
firefox71 --- fixed

People

(Reporter: harry, Assigned: harry)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

See UrlbarController.handleKeyNavigation and UrlbarInput.handleCommand. We should call out to a method on the result's provider and make sure engagement event telemetry is properly handled.

See Also: → 1578438
See Also: → 1578435
Assignee: nobody → bkaluzny
Iteration: --- → 71.2 - Sept 16 - 29
Status: NEW → ASSIGNED
Priority: -- → P2

Keyboard and mouse events didn't really require two separate approaches, so I'm closing bug 1578438 in favour of this one.

Assignee: bkaluzny → htwyford
Points: 3 → 5
Summary: Handle enter keypresses on tip buttons → Handle input events on tip buttons
Duplicate of this bug: 1578438
Pushed by htwyford@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7eba83975e7e
Handle enter keypresses and mouse clicks on tip buttons. r=adw

Clearing ni since I've been actively working on this issue. A fix is forthcoming.

Flags: needinfo?(htwyford)
Pushed by htwyford@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e28a3e15c777
Handle enter keypresses and mouse clicks on tip buttons. r=adw

Backed out changeset e28a3e15c777 (Bug 1578436) for browser_tip_selection.js failures

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=windows%2C10%2Cx64%2Cquantumrender%2Cdebug%2Cmochitests%2Ctest-windows10-64-qr%2Fdebug-mochitest-browser-chrome-e10s&fromchange=f9e6c8a78f7790f9e6eae4c24378cc3e5a7c645d&tochange=a037b206cb66f6f07d7494b16e09554e9a43714e&selectedJob=268194649

Backout link: https://hg.mozilla.org/integration/autoland/rev/a037b206cb66f6f07d7494b16e09554e9a43714e

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=268194649&repo=autoland&lineNumber=21042

[task 2019-09-24T16:49:46.954Z] 16:49:46 INFO - TEST-START | browser/components/urlbar/tests/browser/browser_tip_selection.js
[task 2019-09-24T16:49:47.141Z] 16:49:47 INFO - TEST-INFO | started process screenshot
[task 2019-09-24T16:49:47.212Z] 16:49:47 INFO - TEST-INFO | screenshot: exit 0
[task 2019-09-24T16:49:47.213Z] 16:49:47 INFO - Buffered messages logged at 16:49:46
[task 2019-09-24T16:49:47.213Z] 16:49:47 INFO - Entering test bound tipIsSecondResult
[task 2019-09-24T16:49:47.213Z] 16:49:47 INFO - Buffered messages logged at 16:49:47
[task 2019-09-24T16:49:47.214Z] 16:49:47 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_tip_selection.js | Tip provider was invoked - true == true -
[task 2019-09-24T16:49:47.214Z] 16:49:47 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_tip_selection.js | There should be four results in the view. - 4 == 4 -
[task 2019-09-24T16:49:47.214Z] 16:49:47 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_tip_selection.js | The second result should be a tip. - 7 == 7 -
[task 2019-09-24T16:49:47.214Z] 16:49:47 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_tip_selection.js | The first result should be selected. - 0 == 0 -
[task 2019-09-24T16:49:47.214Z] 16:49:47 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_tip_selection.js | The selected element should be the tip button. - true == true -
[task 2019-09-24T16:49:47.214Z] 16:49:47 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_tip_selection.js | getSelectedIndex should return 1 even though the tip button is selected. - 1 == 1 -
[task 2019-09-24T16:49:47.214Z] 16:49:47 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_tip_selection.js | The selected element should be the tip help button. - true == true -
[task 2019-09-24T16:49:47.215Z] 16:49:47 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_tip_selection.js | getSelectedIndex should return 1 even though the help button is selected. - 1 == 1 -
[task 2019-09-24T16:49:47.215Z] 16:49:47 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_tip_selection.js | The third result should be selected. - 2 == 2 -
[task 2019-09-24T16:49:47.215Z] 16:49:47 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_tip_selection.js | The selected element should be the tip help button. - true == true -
[task 2019-09-24T16:49:47.215Z] 16:49:47 INFO - Leaving test bound tipIsSecondResult
[task 2019-09-24T16:49:47.215Z] 16:49:47 INFO - Entering test bound mouseSelection
[task 2019-09-24T16:49:47.215Z] 16:49:47 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_tip_selection.js | Tip provider was invoked - true == true -
[task 2019-09-24T16:49:47.215Z] 16:49:47 INFO - Buffered messages finished
[task 2019-09-24T16:49:47.215Z] 16:49:47 INFO - TEST-UNEXPECTED-FAIL | browser/components/urlbar/tests/browser/browser_tip_selection.js | Uncaught exception - at chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_tip_selection.js:181 - TypeError: element is null
[task 2019-09-24T16:49:47.215Z] 16:49:47 INFO - Stack trace:
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - mouseSelection@chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_tip_selection.js:181:3
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - AsyncTester_execTest/<@chrome://mochikit/content/browser-test.js:1350:34
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - async
Tester_execTest@chrome://mochikit/content/browser-test.js:1385:11
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - nextTest/<@chrome://mochikit/content/browser-test.js:1213:14
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:805:67
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - Leaving test bound mouseSelection
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - Entering test bound tipIsOnlyResult
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - GECKO(9600) | ++DOCSHELL 000001955ABBA800 == 24 [pid = 10684] [id = {668590c5-40a5-4ca2-ba0e-d185ecd17afa}]
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - GECKO(9600) | ++DOMWINDOW == 56 (0000019554B47B60) [pid = 10684] [serial = 189] [outer = 0000000000000000]
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - GECKO(9600) | ++DOMWINDOW == 57 (000001955437C800) [pid = 10684] [serial = 190] [outer = 0000019554B47B60]
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - Console message: [JavaScript Error: "parentNode is undefined" {file: "resource:///modules/UrlbarView.jsm" line: 1115}]
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - _addTextContentWithHighlights@resource:///modules/UrlbarView.jsm:1115:5
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - _updateRow@resource:///modules/UrlbarView.jsm:775:12
[task 2019-09-24T16:49:47.216Z] 16:49:47 INFO - _updateResults@resource:///modules/UrlbarView.jsm:657:14
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - onQueryResults@resource:///modules/UrlbarView.jsm:374:10
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - notify@resource:///modules/UrlbarController.jsm:601:25
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - receiveResults@resource:///modules/UrlbarController.jsm:193:10
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - notifyResults@resource:///modules/UrlbarProvidersManager.jsm:389:23
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - SkippableTimer/this.promise<@resource:///modules/UrlbarUtils.jsm:742:9
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - promise callbackSkippableTimer@resource:///modules/UrlbarUtils.jsm:739:62
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - add@resource:///modules/UrlbarProvidersManager.jsm:397:26
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - startQuery@chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_tip_selection.js:48:18
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - start@resource:///modules/UrlbarProvidersManager.jsm:301:30
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - async
startQuery@resource:///modules/UrlbarProvidersManager.jsm:185:17
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - startQuery@resource:///modules/UrlbarController.jsm:132:24
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - startQuery@resource:///modules/UrlbarInput.jsm:856:52
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - _startSearch@resource://testing-common/UrlbarTestUtils.jsm:116:12
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - promiseAutocompleteResultPopup@resource://testing-common/UrlbarTestUtils.jsm:69:12
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - asyncmouseSelection@chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_tip_selection.js:173:25
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - Tester_execTest/<@chrome://mochikit/content/browser-test.js:1350:34
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - async
Tester_execTest@chrome://mochikit/content/browser-test.js:1385:11
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - nextTest/<@chrome://mochikit/content/browser-test.js:1213:14
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:805:67
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO -
[task 2019-09-24T16:49:47.217Z] 16:49:47 INFO - GECKO(9600) | [Parent 10684, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file z:/build/build/src/dom/base/ThirdPartyUtil.cpp, line 416
[task 2019-09-24T16:49:47.267Z] 16:49:47 INFO - GECKO(9600) | ++DOCSHELL 0000019555706800 == 25 [pid = 10684] [id = {cad8339a-0b6e-414c-8738-cf90cf680aae}]
[task 2019-09-24T16:49:47.267Z] 16:49:47 INFO - GECKO(9600) | ++DOMWINDOW == 58 (0000019554B47D40) [pid = 10684] [serial = 191] [outer = 0000000000000000]
[task 2019-09-24T16:49:47.306Z] 16:49:47 INFO - GECKO(9600) | ++DOCSHELL 000001956084D800 == 26 [pid = 10684] [id = {e4188ac6-6828-4c84-8daf-1774293f6ae0}]
[task 2019-09-24T16:49:47.306Z] 16:49:47 INFO - GECKO(9600) | ++DOMWINDOW == 59 (0000019554B65200) [pid = 10684] [serial = 192] [outer = 0000000000000000]
[task 2019-09-24T16:49:47.409Z] 16:49:47 INFO - GECKO(9600) | ++DOCSHELL 000001CA5625E800 == 4 [pid = 5144] [id = {5adea318-5d90-4443-92bd-4f8675852115}]
...

Flags: needinfo?(htwyford)
Flags: needinfo?(htwyford)
Pushed by htwyford@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e6344e53e8d3
Handle enter keypresses and mouse clicks on tip buttons. r=adw
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
Regressions: 1584233
You need to log in before you can comment on or make changes to this bug.