Fix geckoview-junit test assertions that were bypassed on Kotlin <2.4
Categories
(GeckoView :: General, defect)
Tracking
(firefox152 fixed)
| Tracking | Status | |
|---|---|---|
| firefox152 | --- | fixed |
People
(Reporter: RyanVM, Assigned: RyanVM)
References
Details
Attachments
(3 files)
Three tests had incorrect @AssertCalled count/order constraints or wrong expected values that were silently bypassed on Kotlin 2.3 and older due to a Kotlin bridge-method annotation propagation issue. Discovered while diagnosing Kotlin 2.4 geckoview-junit failures.
| Assignee | ||
Comment 1•2 months ago
|
||
The onLocationChange callback receives the absolute URL (Services.io's
displaySpec for the resolved URI), not the relative argument passed to
window.location.replace(). The strict equalTo check only avoided
failing because the bridge-method @AssertCalled propagation suppressed
this override on Kotlin 2.3.21 — the assertion was never evaluated.
| Assignee | ||
Comment 2•2 months ago
|
||
The actual delivery order is onLocationChange(about:blank) ->
onLoadRequest(target) -> onLocationChange(target) -> onTitleChange.
The hard-coded [1,2,3,4] order was wrong (it placed onLoadRequest
after the two location changes); update to [1,3] / [2] / [4].
| Assignee | ||
Comment 3•2 months ago
|
||
WebNotification.click() simulates a notification-body click and produces
a notificationclick event with event.action = "". The service-worker
fixture only appends ?action=<id> to the target URL when event.action
is non-empty, so the test's expected URL (with ?action=foo) was never
attainable through click(). Use the click(action) overload to simulate
clicking the action button instead.
Comment 5•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a974ea9baaec
https://hg.mozilla.org/mozilla-central/rev/121de9b402bc
https://hg.mozilla.org/mozilla-central/rev/a3ed62235aaa
Description
•