[webkit-changes] [WebKit/WebKit] 2e6a6b: Introduce captionDisplayMode option to WebKitTestR...
Kohei Ueno
noreply at github.com
Sun Sep 17 19:07:53 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2e6a6bb78167b54325e13d2f73d97608df4c65c7
https://github.com/WebKit/WebKit/commit/2e6a6bb78167b54325e13d2f73d97608df4c65c7
Author: Kohei Ueno <kohei.ueno119 at gmail.com>
Date: 2023-09-17 (Sun, 17 Sep 2023)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/track-text-track-cue-list-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/track-text-track-cue-list.html
M Source/WebCore/page/CaptionUserPreferences.h
M Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
M Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h
M Source/WebKitLegacy/mac/WebView/WebFrame.mm
M Source/WebKitLegacy/mac/WebView/WebFrameInternal.h
M Source/WebKitLegacy/mac/WebView/WebFramePrivate.h
M Tools/DumpRenderTree/TestOptions.cpp
M Tools/DumpRenderTree/TestOptions.h
M Tools/DumpRenderTree/mac/DumpRenderTree.mm
M Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
M Tools/WebKitTestRunner/TestInvocation.cpp
M Tools/WebKitTestRunner/TestOptions.cpp
M Tools/WebKitTestRunner/TestOptions.h
Log Message:
-----------
Introduce captionDisplayMode option to WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=261460
Reviewed by Eric Carlson.
As reported in https://bugs.webkit.org/show_bug.cgi?id=179370#c2,
running WPT for WebVTT in run-webkit-tests results in a timeout.
This is due to the caption mode of WebKitTestRunner being defaulted to `ForceOnly`,
under which conditions the captions never appear and the tests stop.
This is not a problem for LayoutTests other than WPT because we can adjust
the caption mode with `window.internals.setCaptionDisplayMode('Automatic')`
to ensure correct caption display during testing.
To resolve this issue, this change introduces a new option `captionDisplayMode`
to WebKitTestRunner that makes the caption mode configurable instead of
using the internal methods in the window object.
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/track-text-track-cue-list-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/track-text-track-cue-list.html:
* Source/WebCore/page/CaptionUserPreferences.h:
(WTF::EnumTraits<WebCore::CaptionUserPreferences::CaptionDisplayMode>::fromString):
* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundleSetCaptionDisplayMode):
* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* Source/WebKitLegacy/mac/WebView/WebFrame.mm:
(-[WebFrame _createCaptionPreferencesTestingModeToken]):
(-[WebFrame _setCaptionDisplayMode:]):
* Source/WebKitLegacy/mac/WebView/WebFrameInternal.h:
* Source/WebKitLegacy/mac/WebView/WebFramePrivate.h:
* Tools/DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::keyTypeMapping):
* Tools/DumpRenderTree/TestOptions.h:
(WTR::TestOptions::captionDisplayMode const):
* Tools/DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentState):
(runTest):
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::createTestSettingsDictionary):
* Tools/WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
(WTR::TestOptions::keyTypeMapping):
* Tools/WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::captionDisplayMode const):
Canonical link: https://commits.webkit.org/268073@main
More information about the webkit-changes
mailing list