Closed Bug 1522280 Opened 9 months ago Closed 9 months ago

Add autofill tests


(Firefox :: Address Bar, enhancement, P1)




Firefox 67
Tracking Status
firefox67 --- fixed


(Reporter: adw, Assigned: adw)



(Whiteboard: [fxsearch])


(2 files)

Bug 1521236 added autofill to quantumbar, but it didn't include any tests. We should add tests.

Whiteboard: [fxsearch]

I split this up into two patches, one for input tests and one for controller tests.

The input tests check a couple of things: input.autofill() in isolation, and also that enableAutofill is false when the previous search string starts with the new search string.

The controller test checks that input.autofill() gets called as appropriate (on receiveResults on the first result and context.autofillValue is non-null).

Pushed by
Add autofill tests: controller tests. r=Standard8
Pushed by
Add autofill tests: input tests. r=dao

Push with failures:

Failure log:

Backout link:

[task 2019-01-29T17:11:46.513Z] 17:11:46 INFO - TEST-START | browser/components/urlbar/tests/unit/test_UrlbarController_unit.js
[task 2019-01-29T17:11:47.246Z] 17:11:47 WARNING - TEST-UNEXPECTED-FAIL | browser/components/urlbar/tests/unit/test_UrlbarController_unit.js | xpcshell return code: 0
[task 2019-01-29T17:11:47.248Z] 17:11:47 INFO - TEST-INFO took 731ms
[task 2019-01-29T17:11:47.249Z] 17:11:47 INFO - >>>>>>>
[task 2019-01-29T17:11:47.250Z] 17:11:47 INFO - PID 10986 | [10986, Main Thread] WARNING: Couldn't get the user appdata directory. Crash events may not be produced.: file /builds/worker/workspace/build/src/toolkit/crashreporter/nsExceptionHandler.cpp, line 2536
[task 2019-01-29T17:11:47.251Z] 17:11:47 INFO - PID 10986 | JavaScript strict warning: resource://testing-common/sinon-2.3.2.js, line 8941: ReferenceError: reference to undefined property "iso-8859-8-i"
[task 2019-01-29T17:11:47.251Z] 17:11:47 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2019-01-29T17:11:47.253Z] 17:11:47 INFO - (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2019-01-29T17:11:47.254Z] 17:11:47 INFO - (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2019-01-29T17:11:47.255Z] 17:11:47 INFO - running event loop
[task 2019-01-29T17:11:47.256Z] 17:11:47 INFO - "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "ReferenceError: reference to undefined property "iso-8859-8-i"" {file: "resource://testing-common/sinon-2.3.2.js" line: 8941}]"
[task 2019-01-29T17:11:47.258Z] 17:11:47 INFO - browser/components/urlbar/tests/unit/test_UrlbarController_unit.js | Starting setup
[task 2019-01-29T17:11:47.259Z] 17:11:47 INFO - (xpcshell/head.js) | test setup pending (2)
[task 2019-01-29T17:11:47.260Z] 17:11:47 INFO - (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2019-01-29T17:11:47.260Z] 17:11:47 INFO - (xpcshell/head.js) | test run_next_test 1 pending (2)
[task 2019-01-29T17:11:47.262Z] 17:11:47 INFO - (xpcshell/head.js) | test setup finished (2)
[task 2019-01-29T17:11:47.263Z] 17:11:47 INFO - browser/components/urlbar/tests/unit/test_UrlbarController_unit.js | Starting test_constructor_throws
[task 2019-01-29T17:11:47.264Z] 17:11:47 INFO - (xpcshell/head.js) | test test_constructor_throws pending (2)
[task 2019-01-29T17:11:47.264Z] 17:11:47 INFO - TEST-PASS | browser/components/urlbar/tests/unit/test_UrlbarController_unit.js | test_constructor_throws - [test_constructor_throws : 59] . Should throw if the browserWindow was not supplied

Flags: needinfo?(adw)
Backout by
Backed out changeset 7065c7171760 for xpcshell failures on test_UrlbarController_unit.

The addition to the controller test got tripped up by the rename of MATCH_SOURCE to RESULT_SOURCE in bug 1522425, which landed on autoland earlier today but hasn't landed on m-c yet. Fix coming up.

Flags: needinfo?(adw)
Pushed by
Add autofill tests: controller tests. r=Standard8
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67

Uh, I never relanded the input tests after they were backed out. Bug 1523753 happened while those tests were briefly in autoland though, so I need to fix that first.

Resolution: FIXED → ---

Once bug 1523753 is fixed, I'll reland the input tests. My changes didn't cause the leak, and they probably don't make it worse, but I'll hold off on relanding anyway until that's resolved.

Pushed by
Add autofill tests: input tests. r=dao
Closed: 9 months ago9 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.