Bug 178029 - [iOS] Layout Test http/tests/preload/viewport/meta-viewport-link-headers.php is flaky
Summary: [iOS] Layout Test http/tests/preload/viewport/meta-viewport-link-headers.php ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-06 14:46 PDT by Matt Lewis
Modified: 2017-11-02 14:25 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Lewis 2017-10-06 14:46:28 PDT
http/tests/preload/viewport/meta-viewport-link-headers.php is a flaky failure on iOS Simulator WK2 according to the flakiness dashboard:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fpreload%2Fviewport%2Fmeta-viewport-link-headers.php

build:
https://build.webkit.org/results/Apple%20iOS%2011%20Simulator%20Release%20WK2%20(Tests)/r222986%20(371)/results.html
https://build.webkit.org/builders/Apple%20iOS%2011%20Simulator%20Release%20WK2%20(Tests)/builds/371

diff:

--- /Volumes/Data/slave/ios-simulator-11-release-tests-wk2/build/layout-test-results/http/tests/preload/viewport/meta-viewport-link-headers-expected.txt
+++ /Volumes/Data/slave/ios-simulator-11-release-tests-wk2/build/layout-test-results/http/tests/preload/viewport/meta-viewport-link-headers-actual.txt
@@ -1,3 +1,3 @@
 
-PASS Makes sure that Link headers support the media attribute and respond to <meta content=viewport> 
+FAIL Makes sure that Link headers support the media attribute and respond to <meta content=viewport> assert_true: The control element should be loaded expected true got false
 
first failure:
https://build.webkit.org/builders/Apple%20iOS%2011%20Simulator%20Release%20WK2%20(Tests)/builds/33

This test was thought to be fixed in https://bugs.webkit.org/show_bug.cgi?id=172518 but it looks like the fix did not work.
Comment 1 Alexey Proskuryakov 2017-10-11 11:41:56 PDT
Yoav, would you be willing to take a look? Apparently the fix in bug 172518 wasn't sufficient.
Comment 2 Alexey Proskuryakov 2017-10-11 11:45:56 PDT
I don't know if that's the cause of flakiness, but this test uses a common anti-pattern. 

The test starts before the document is completely loaded, so loading the image races with completing the document load. The assignment to img.src should happen no earlier than window.onload.

Also, instead of waiting for a second, the test can use shouldBecomeTrue from WebKit test harness (or an equivalent from W3C harness if it exists).
Comment 3 youenn fablet 2017-10-11 12:41:41 PDT
Looking at the test, it might be missing a return after line 34.

As of the 1 second thing, since it is polling repetitively several times, I don't think there is an issue there.
Comment 4 Alexey Proskuryakov 2017-10-11 13:16:07 PDT
It only polls for one second, and the load may not complete so quickly.
Comment 5 Ryan Haddad 2017-11-02 14:25:23 PDT
Marked test as flaky in https://trac.webkit.org/changeset/224355/webkit