Title: [271330] trunk/Tools
- Revision
- 271330
- Author
- [email protected]
- Date
- 2021-01-08 15:31:24 -0800 (Fri, 08 Jan 2021)
Log Message
Unreviewed test gardening. Attempting to diagnose failing PiP API tests by enabling more logging
during the test run, to be collected after a failed test.
* DumpRenderTree/DumpRenderTree.xcodeproj/xcshareddata/xcschemes/DumpRenderTree.xcscheme:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme:
* TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/ExitPiPOnSuspendVideoElement.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm:
(TEST):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (271329 => 271330)
--- trunk/Tools/ChangeLog 2021-01-08 23:19:54 UTC (rev 271329)
+++ trunk/Tools/ChangeLog 2021-01-08 23:31:24 UTC (rev 271330)
@@ -1,3 +1,17 @@
+2021-01-08 Jer Noble <[email protected]>
+
+ Unreviewed test gardening. Attempting to diagnose failing PiP API tests by enabling more logging
+ during the test run, to be collected after a failed test.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/xcshareddata/xcschemes/DumpRenderTree.xcscheme:
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme:
+ * TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WebKitCocoa/ExitPiPOnSuspendVideoElement.mm:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm:
+ (TEST):
+
2021-01-08 Wenson Hsieh <[email protected]>
[macOS] -[WKWebView acceptsFirstMouse:] sometimes crashes in IPC::Connection::createSyncMessageEncoder
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm (271329 => 271330)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm 2021-01-08 23:19:54 UTC (rev 271329)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm 2021-01-08 23:31:24 UTC (rev 271330)
@@ -99,6 +99,10 @@
TEST(ExitFullscreenOnEnterPiP, ElementFullscreen)
{
+ [[NSUserDefaults standardUserDefaults] registerDefaults:@{
+ @"WebCoreLogging": @"Fullscreen=debug",
+ @"WebKit2Logging": @"Fullscreen=debug",
+ }];
RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
[configuration preferences]._fullScreenEnabled = YES;
[configuration preferences]._allowsPictureInPictureMediaPlayback = YES;
@@ -109,6 +113,11 @@
[webView synchronouslyLoadTestPageNamed:@"ExitFullscreenOnEnterPiP"];
+ [[NSUserDefaults standardUserDefaults] registerDefaults:@{
+ @"WebCoreLogging": @"",
+ @"WebKit2Logging": @"",
+ }];
+
didEnterFullscreen = false;
[webView evaluateJavaScript:@"document.getElementById('enter-element-fullscreen').click()" completionHandler: nil];
ASSERT_TRUE(TestWebKitAPI::Util::runFor(&didEnterFullscreen, 10));
@@ -130,6 +139,7 @@
[webView evaluateJavaScript:@"document.getElementById('exit-pip').click()" completionHandler: nil];
ASSERT_TRUE(TestWebKitAPI::Util::runFor(&didExitPiP, 10));
+
}
} // namespace TestWebKitAPI
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitPiPOnSuspendVideoElement.mm (271329 => 271330)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitPiPOnSuspendVideoElement.mm 2021-01-08 23:19:54 UTC (rev 271329)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ExitPiPOnSuspendVideoElement.mm 2021-01-08 23:31:24 UTC (rev 271330)
@@ -62,6 +62,11 @@
if (!WebCore::supportsPictureInPicture())
return;
+ [[NSUserDefaults standardUserDefaults] registerDefaults:@{
+ @"WebCoreLogging": @"Fullscreen=debug",
+ @"WebKit2Logging": @"Fullscreen=debug",
+ }];
+
RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
[configuration preferences]._fullScreenEnabled = YES;
[configuration preferences]._allowsPictureInPictureMediaPlayback = YES;
@@ -71,6 +76,11 @@
[webView synchronouslyLoadTestPageNamed:@"ExitFullscreenOnEnterPiP"];
+ [[NSUserDefaults standardUserDefaults] registerDefaults:@{
+ @"WebCoreLogging": @"",
+ @"WebKit2Logging": @"",
+ }];
+
didEnterPiP = false;
[webView evaluateJavaScript:@"document.getElementById('enter-pip').click()" completionHandler: nil];
ASSERT_TRUE(TestWebKitAPI::Util::runFor(&didEnterPiP, 10));
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm (271329 => 271330)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm 2021-01-08 23:19:54 UTC (rev 271329)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm 2021-01-08 23:31:24 UTC (rev 271330)
@@ -41,11 +41,23 @@
if (!WebCore::supportsPictureInPicture())
return;
+ [[NSUserDefaults standardUserDefaults] registerDefaults:@{
+ @"WebCoreLogging": @"Fullscreen=debug",
+ @"WebKit2Logging": @"Fullscreen=debug",
+ }];
+
+
auto *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
[[configuration preferences] _setAllowsPictureInPictureMediaPlayback:YES];
auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration addToWindow:YES]);
[webView synchronouslyLoadHTMLString:@"<video src="" webkit-playsinline playsinline loop></video>"];
+
+ [[NSUserDefaults standardUserDefaults] registerDefaults:@{
+ @"WebCoreLogging": @"",
+ @"WebKit2Logging": @"",
+ }];
+
[webView objectByEvaluatingJavaScript:@"document.querySelector('video').addEventListener('webkitpresentationmodechanged', event => { window.webkit.messageHandlers.testHandler.postMessage('presentationmodechanged'); });"];
__block bool presentationModeChanged = false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes