Bug 262680
| Summary: | Tests with captionDisplayMode option are flaky on ios-wk2 | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kueno <kohei.ueno119> |
| Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Kueno
The `captionDisplayMode` option was introduced in https://bugs.webkit.org/show_bug.cgi?id=261460 (PR: https://github.com/WebKit/WebKit/pull/17689). However when I attempted to import WPT for webvtt/parsing with `captionDisplayMode` setting enabled, I found that the tests were failing intermittently on ios-wk2 (example: https://github.com/WebKit/WebKit/pull/17852#issuecomment-1723066317).
The flakiness of these tests appears to be due to the fact that the `CaptionUserPreferencesTestingModeToken` instance may not always be initialized before the caption mode is set (https://github.com/WebKit/WebKit/blob/659f85098cf4322282a775cbd51eb58a4ed34022/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp#L583). This instance is usually initialized on the `Internals` class's constructor during the WebKitTestRunner setup (https://github.com/WebKit/WebKit/blob/659f85098cf4322282a775cbd51eb58a4ed34022/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp#L888). In most cases, the `CaptionUserPreferencesTestingModeToken` instance is created in the `Internals` class constructore before `WKBundlePageSetCaptionDisplayMode` is called, but there are instances where it is not, particularly when tests are run concurrently. This leads to the tests failing.
To address this issue, the WebKitTestRunner needs to ensure that the `CaptionUserPreferencesTestingModeToken` instance is always initialized before `WKBundlePageSetCaptionDisplayMopde` is called, then eliminating the flakiness of the tests.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Kueno
Pull request: https://github.com/WebKit/WebKit/pull/18675
Radar WebKit Bug Importer
<rdar://problem/116848999>
EWS
Committed 269455@main (9948a5b7f373): <https://commits.webkit.org/269455@main>
Reviewed commits have been landed. Closing PR #18675 and removing active labels.