Closed Bug 1603994 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 20778 - De-flake loading/lazyload/invisble-image.tentative.html

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox73 fixed)

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 20778 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/20778
Details from upstream follow.

Dominic Farolino <domfarolino@gmail.com> wrote:

De-flake loading/lazyload/invisble-image.tentative.html

This PR de-flakes invisible-image.tentative.html (I'll look into invisible-lazy-image.tentative.html next).

The cause of the flake was that the test assumed the "expected" image always loaded before all of the other images, so that the call to is_image_fully_loaded would return true. In reality, there was nothing in the test assuring this, so if the "expected" image happened to finish after any of the other images is_image_fully_loaded(...) would return false, and break the test.

To fix this, we could add a mechanism to ensure "expected" loads first, but I think we can get rid of the call to is_image_fully_loaded in general. This function was intro'd to ensure that a placeholder image wasn't being used as a stand-in for an image in Chrome. However, I've separately confirmed that placeholder images are never considered "complete", and the load event doesn't fire for them. Therefore is_image_fully_loaded isn't buying us anything extra outside of the image load event, so we can remove it.

PR 20778 applied with additional changes from upstream: adba2f3573f62da0d07a55b7608c2850725a325d, eb536fbabbd5bfa20798479fdba9f691a893db89, 5e5a9f523a50e6b875223b6ad44d7cdf84eb7195

CI Results

Ran 13 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
PASS: 1

Chrome

OK : 1
PASS: 1

Safari

OK : 1
PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

CI Results

Ran 13 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
PASS: 1

Chrome

OK : 1
PASS: 1

Safari

OK : 1
PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4216abe682b0
[wpt PR 20778] - [Lazyload]: De-flake loading/lazyload/invisble-image.tentative.html, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.