Bug 177679

Summary: [High Sierra Release WK2] LayoutTest http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html is a flaky failure
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: Tools / TestsAssignee: Ryan Haddad <ryanhaddad>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, jlewis3, lforschler, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Ryan Haddad 2017-09-29 13:24:09 PDT
LayoutTest http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html is a flaky failure

https://build.webkit.org/results/Apple%20High%20Sierra%20Release%20WK2%20(Tests)/r222634%20(46)/results.html

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Floading%2FresourceLoadStatistics%2Fpartitioned-cookies-with-and-without-user-interaction.html

--- /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt
+++ /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-actual.txt
@@ -4,7 +4,7 @@
 main frame - didChangeLocationWithinPageForFrame
 main frame - willPerformClientRedirectToURL: http://localhost:8000/loading/resourceLoadStatistics/resources/set-cookie.php?name=firstPartyCookie&value=value#http://127.0.0.1:8000/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html#step2 
 main frame - didFinishDocumentLoadForFrame
-main frame - didFinishLoadForFrame
+main frame - didFailLoadWithError
 main frame - didStartProvisionalLoadForFrame
 main frame - didCancelClientRedirectForFrame
 main frame - didCommitLoadForFrame
Comment 1 Alexey Proskuryakov 2017-10-03 20:49:07 PDT
I suspect that this is a mistake in the test, which races parsing and navigation. Moving runTest() from inline script to load event handler may fix the problem.

Ryan or Matt, would you be willing to try this out?
Comment 2 Ryan Haddad 2017-10-04 16:49:19 PDT
(In reply to Alexey Proskuryakov from comment #1)
> I suspect that this is a mistake in the test, which races parsing and
> navigation. Moving runTest() from inline script to load event handler may
> fix the problem.
> 
> Ryan or Matt, would you be willing to try this out?
I'll look at this.
Comment 3 Ryan Haddad 2017-10-04 17:02:06 PDT
I can reproduce the failure with: run-webkit-tests --release http/tests/loading/resourceLoadStatistics/ --no-retry-failure -fg

I cannot reproduce the failure after moving runTest() as suggested.
Comment 4 Ryan Haddad 2017-10-04 17:12:51 PDT
Created attachment 322745 [details]
Patch
Comment 5 WebKit Commit Bot 2017-10-06 16:06:10 PDT
Comment on attachment 322745 [details]
Patch

Clearing flags on attachment: 322745

Committed r223008: <http://trac.webkit.org/changeset/223008>
Comment 6 WebKit Commit Bot 2017-10-06 16:06:12 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2017-10-06 16:07:02 PDT
<rdar://problem/34866712>