http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html Is a flaky text failure on Mac and iOS Suspected regression point is r292072. run-webkit-tests http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html --iterations 100 Reveals that this text failure only happens on the first iteration. Issue does not reproduce at r292069. HISTORY: https://results.webkit.org/?suite=layout-tests&test=http%2Ftests%2FwebAPIStatistics%2Fcanvas-read-and-write-data-collection.html DIFF: --- /Volumes/Data/worker/ios-simulator-15-release-gpuprocess-tests-wk2/build/layout-test-results/http/tests/webAPIStatistics/canvas-read-and-write-data-collection-expected.txt +++ /Volumes/Data/worker/ios-simulator-15-release-gpuprocess-tests-wk2/build/layout-test-results/http/tests/webAPIStatistics/canvas-read-and-write-data-collection-actual.txt @@ -9,3 +9,11 @@ isPrevalentResource: No isVeryPrevalentResource: No dataRecordsRemoved: 0 +Registrable domain: nullOrigin + hadUserInteraction: No + mostRecentUserInteraction: -1 + grandfathered: No + IsScheduledForAllButCookieDataRemoval: No + isPrevalentResource: No + isVeryPrevalentResource: No + dataRecordsRemoved: 0 DIFF-URL: https://build.webkit.org/results/Apple-iOS-15-Simulator-Release-GPUProcess-WK2-Tests/r292075%20(697)/http/tests/webAPIStatistics/canvas-read-and-write-data-collection-diff.txt
<rdar://problem/91073081>
Marked expectations for test here: https://commits.webkit.org/249082@main
Fixed test expectations for macOS in https://commits.webkit.org/249127@main
Reverting r292072 makes this test pass again.
It looks like disabling this test for EWS (since flaky/failing tests are skipped) has caused the failure to move to a different webAPIStatistics test: https://ews-build.s3-us-west-2.amazonaws.com/Commit-Queue/456407-21304/results.html
Resolved by revert via https://bugs.webkit.org/show_bug.cgi?id=238690 Removed expectations in https://commits.webkit.org/249144@main
I understand what's happening now: 1. InjectedBundle::initialize() runs, which calls activateFonts() (which installs WebKit's testing fonts for the local (web) process. This queues up a notification (which is asynchronously delivered). 2. WebProcess::createWebPage() runs, which loads a dummy empty page, which uses -webkit-standard, and so we end up calling realizeNextFallback() and therefore WebResourceLoadObserver::logFontLoad(). This populates some dummy statistics in the WebResourceLoadObserver under the domain "nullOrigin". 3. InjectedBundle::beginTesting() runs, which calls WebResourceLoadObserver::clearState(). The previously-recorded statistics are now gone. 4. The pending notification gets delivered. The page is still the dummy page. The style recalc ends up calling realizeNextFallback() and therefore WebResourceLoadObserver::logFontLoad(). This populates some more dummy statistics in the WebResourceLoadObserver under the domain "nullOrigin". Before r292072 this didn't use to happen. 5. The test runs, loads some stuff, and dumps the contents of the WebResourceLoadObserver. The contents contain both statistics that the test intentionally created, as well as the dummy statistics that was placed there by the layout the notification caused.
Reopening because there is work to do to make the test work properly.
One thing to realize from the above story is that this problem only occurs during testing. Real users wouldn't actually encounter this problem.
Created attachment 456438 [details] Patch
Created attachment 456442 [details] Patch
Putting back in config changed, so I can continue this in https://bugs.webkit.org/show_bug.cgi?id=238483