Bug 175338 - Address flakiness related to download tests
Summary: Address flakiness related to download tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
: 168235 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-08-08 13:04 PDT by Ryan Haddad
Modified: 2017-08-14 10:11 PDT (History)
9 users (show)

See Also:


Attachments
Patch (34.33 KB, patch)
2017-08-11 14:47 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Haddad 2017-08-08 13:04:59 PDT
LayoutTest imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-stringifier.html is a flaky failure

https://build.webkit.org/results/Apple%20El%20Capitan%20Release%20WK2%20(Tests)/r220403%20(3594)/results.html

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Ftext-level-semantics%2Fthe-a-element%2Fa-stringifier.html

--- /Volumes/Data/slave/elcapitan-release-tests-wk2/build/layout-test-results/imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-stringifier-expected.txt
+++ /Volumes/Data/slave/elcapitan-release-tests-wk2/build/layout-test-results/imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-stringifier-actual.txt
@@ -1,3 +1,4 @@
+Download completed.
 
 PASS HTMLAnchorElement stringifier 
 PASS HTMLAnchorElement stringifier 1
Comment 1 Chris Dumez 2017-08-11 10:59:34 PDT
This is likely caused by a previous test. a-stringifier.html is unlikely to be the culprit here :(
Comment 2 Chris Dumez 2017-08-11 11:00:57 PDT
It is likely that a download layout test is not properly waiting for the download to finish to call finishJSTest().
Comment 3 Chris Dumez 2017-08-11 11:02:02 PDT
The culprit is likely:
imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click.html 

It clicks a download link and calls done() right away.
Comment 4 Chris Dumez 2017-08-11 11:06:29 PDT
It looks like download tests are currently expected to use:
    if (window.testRunner)
        testRunner.waitUntilDownloadFinished();
Comment 5 Chris Dumez 2017-08-11 14:42:51 PDT
*** Bug 168235 has been marked as a duplicate of this bug. ***
Comment 6 Chris Dumez 2017-08-11 14:47:19 PDT
Created attachment 317967 [details]
Patch
Comment 7 Ryosuke Niwa 2017-08-12 14:29:00 PDT
Comment on attachment 317967 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=317967&action=review

> Tools/ChangeLog:8
> +        - Update WKTR so that the flag set by testRunner.waitUntilDownloadFinished()

We don't have the support for this feature in DRT?
Comment 8 Chris Dumez 2017-08-12 14:52:55 PDT
(In reply to Ryosuke Niwa from comment #7)
> Comment on attachment 317967 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=317967&action=review
> 
> > Tools/ChangeLog:8
> > +        - Update WKTR so that the flag set by testRunner.waitUntilDownloadFinished()
> 
> We don't have the support for this feature in DRT?

No it was apparently only added to WK2.
Comment 9 WebKit Commit Bot 2017-08-12 14:58:49 PDT
Comment on attachment 317967 [details]
Patch

Clearing flags on attachment: 317967

Committed r220626: <http://trac.webkit.org/changeset/220626>
Comment 10 WebKit Commit Bot 2017-08-12 14:58:50 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2017-08-12 14:59:13 PDT
<rdar://problem/33865119>
Comment 12 Chris Dumez 2017-08-14 10:09:49 PDT
Committed r220703: <http://trac.webkit.org/changeset/220703>
Comment 13 Chris Dumez 2017-08-14 10:11:02 PDT
Small follow-up in https://trac.webkit.org/r220703.