Bug 228571 - [ Mac ] fast/dom/webtiming-document-open.html is a flaky failure
Summary: [ Mac ] fast/dom/webtiming-document-open.html is a flaky failure
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-28 16:03 PDT by Eric Hutchison
Modified: 2021-07-29 16:02 PDT (History)
7 users (show)

See Also:


Attachments
Patch (15.02 KB, patch)
2021-07-29 10:29 PDT, Alex Christensen
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Hutchison 2021-07-28 16:03:08 PDT
fast/dom/webtiming-document-open.html 

is a flaky failure.

History: https://results.webkit.org/?platform=mac&suite=layout-tests&test=fast%2Fdom%2Fwebtiming-document-open.html

Results: https://build.webkit.org/results/Apple-BigSur-Debug-WK2-Tests/r280347%20(2979)/results.html

Diff: 
--- /Volumes/Data/worker/bigsur-debug-tests-wk2/build/layout-test-results/fast/dom/webtiming-document-open-expected.txt
+++ /Volumes/Data/worker/bigsur-debug-tests-wk2/build/layout-test-results/fast/dom/webtiming-document-open-actual.txt
@@ -13,7 +13,7 @@
 PASS timing.domainLookupEnd is originalTiming.domainLookupEnd
 PASS timing.domainLookupStart is originalTiming.domainLookupStart
 PASS timing.fetchStart is originalTiming.fetchStart
-PASS timing.loadEventEnd is originalTiming.loadEventEnd
+FAIL timing.loadEventEnd should be 1627422346940. Was 1627422346941.
 PASS timing.loadEventStart is originalTiming.loadEventStart
 PASS timing.navigationStart is originalTiming.navigationStart
 PASS timing.redirectEnd is originalTiming.redirectEnd

Reproduced on r280380 using run-webkit-tests  -f --iterations 500 --exit-after-n-failures 1 --clobber-old-results fast/dom/webtiming-document-open.html.
Comment 1 Radar WebKit Bug Importer 2021-07-28 16:04:20 PDT
<rdar://problem/81240846>
Comment 2 Eric Hutchison 2021-07-28 16:12:28 PDT
Updated test expectations at https://trac.webkit.org/changeset/280408/webkit.
Comment 3 Alex Christensen 2021-07-29 10:29:53 PDT
Created attachment 434532 [details]
Patch
Comment 4 Chris Dumez 2021-07-29 15:35:03 PDT
Comment on attachment 434532 [details]
Patch

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

> Source/WebCore/page/PerformanceTiming.cpp:58
>          return 0;

Is it intentional in all these getters that we're not caching in early return cases?

> Source/WebCore/page/PerformanceTiming.cpp:80
> +    m_unloadEventStart =  monotonicTimeToIntegerMilliseconds(timing->unloadEventStart());

nit: extra space
Comment 5 Alex Christensen 2021-07-29 15:57:04 PDT
Comment on attachment 434532 [details]
Patch

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

>> Source/WebCore/page/PerformanceTiming.cpp:58
>>          return 0;
> 
> Is it intentional in all these getters that we're not caching in early return cases?

All those early returns are unlikely to be hit, and if we do and the website queries multiple times then we'll early return multiple times.
This whole API has been replaced, MDN says it's deprecated and not to use it.  It will be removed a bit after bug 227336 is fixed.
Comment 6 Alex Christensen 2021-07-29 16:02:30 PDT
http://trac.webkit.org/r280454