- Revision
- 260606
- Author
- [email protected]
- Date
- 2020-04-23 16:45:15 -0700 (Thu, 23 Apr 2020)
Log Message
REGRESSION (r260278): TestWebKitAPI.Fullscreen.Delegate is timing out on macOS bots
https://bugs.webkit.org/show_bug.cgi?id=210676
<rdar://problem/61953702>
Reviewed by Daniel Bates.
A number of API tests modify the WKWebViewConfiguration after calling -[WKWebView initWithFrame:configuration:], which
could be a source of failures or flakiness. Update these tests to set those configuration values before passing the
configuration to WKWebView.
* TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm:
(TestWebKitAPI::TEST):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (260605 => 260606)
--- trunk/Tools/ChangeLog 2020-04-23 23:43:50 UTC (rev 260605)
+++ trunk/Tools/ChangeLog 2020-04-23 23:45:15 UTC (rev 260606)
@@ -1,3 +1,26 @@
+2020-04-23 Jer Noble <[email protected]>
+
+ REGRESSION (r260278): TestWebKitAPI.Fullscreen.Delegate is timing out on macOS bots
+ https://bugs.webkit.org/show_bug.cgi?id=210676
+ <rdar://problem/61953702>
+
+ Reviewed by Daniel Bates.
+
+ A number of API tests modify the WKWebViewConfiguration after calling -[WKWebView initWithFrame:configuration:], which
+ could be a source of failures or flakiness. Update these tests to set those configuration values before passing the
+ configuration to WKWebView.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm:
+ (TestWebKitAPI::TEST):
+
2020-04-23 Saam Barati <[email protected]>
DumpRenderTree should have the JIT entitlement on Mac
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm (260605 => 260606)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm 2020-04-23 23:43:50 UTC (rev 260605)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm 2020-04-23 23:45:15 UTC (rev 260606)
@@ -41,8 +41,8 @@
TEST(Fullscreen, Alert)
{
auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+ [configuration preferences]._fullScreenEnabled = YES;
auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) configuration:configuration.get()]);
- [configuration preferences]._fullScreenEnabled = YES;
auto checkFullscreen = [&] {
isInFullscreen = [webView _isInFullscreen];
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm (260605 => 260606)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm 2020-04-23 23:43:50 UTC (rev 260605)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm 2020-04-23 23:45:15 UTC (rev 260606)
@@ -85,8 +85,8 @@
TEST(Fullscreen, Delegate)
{
RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+ [configuration preferences]._fullScreenEnabled = YES;
RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) configuration:configuration.get()]);
- [configuration preferences]._fullScreenEnabled = YES;
RetainPtr<FullscreenDelegateMessageHandler> handler = adoptNS([[FullscreenDelegateMessageHandler alloc] init]);
[[configuration userContentController] addScriptMessageHandler:handler.get() name:@"fullscreenChangeHandler"];
[webView _setFullscreenDelegate:handler.get()];
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm (260605 => 260606)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm 2020-04-23 23:43:50 UTC (rev 260605)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm 2020-04-23 23:45:15 UTC (rev 260606)
@@ -55,8 +55,8 @@
TEST(Fullscreen, LayoutConstraints)
{
RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+ [configuration preferences]._fullScreenEnabled = YES;
RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) configuration:configuration.get()]);
- [configuration preferences]._fullScreenEnabled = YES;
RetainPtr<FullscreenStateChangeMessageHandler> handler = adoptNS([[FullscreenStateChangeMessageHandler alloc] init]);
[[configuration userContentController] addScriptMessageHandler:handler.get() name:@"fullscreenStateChangeHandler"];
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm (260605 => 260606)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm 2020-04-23 23:43:50 UTC (rev 260605)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm 2020-04-23 23:45:15 UTC (rev 260606)
@@ -112,11 +112,12 @@
TEST(PictureInPicture, WKUIDelegate)
{
RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
- RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 640, 480) configuration:configuration.get()]);
[configuration preferences]._fullScreenEnabled = YES;
[configuration preferences]._allowsPictureInPictureMediaPlayback = YES;
RetainPtr<PictureInPictureUIDelegate> handler = adoptNS([[PictureInPictureUIDelegate alloc] init]);
[[configuration userContentController] addScriptMessageHandler:handler.get() name:@"pictureInPictureChangeHandler"];
+ RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 640, 480) configuration:configuration.get()]);
+
[webView setUIDelegate:handler.get()];
#if HAVE(TOUCH_BAR)
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm (260605 => 260606)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm 2020-04-23 23:43:50 UTC (rev 260605)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm 2020-04-23 23:45:15 UTC (rev 260606)
@@ -56,12 +56,12 @@
TEST(TopContentInset, Fullscreen)
{
RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+ [configuration preferences]._fullScreenEnabled = YES;
+ RetainPtr<FullscreenChangeMessageHandler> handler = adoptNS([[FullscreenChangeMessageHandler alloc] init]);
+ [[configuration userContentController] addScriptMessageHandler:handler.get() name:@"fullscreenChangeHandler"];
RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) configuration:configuration.get()]);
[webView _setTopContentInset:10];
[webView _setAutomaticallyAdjustsContentInsets:NO];
- [configuration preferences]._fullScreenEnabled = YES;
- RetainPtr<FullscreenChangeMessageHandler> handler = adoptNS([[FullscreenChangeMessageHandler alloc] init]);
- [[configuration userContentController] addScriptMessageHandler:handler.get() name:@"fullscreenChangeHandler"];
RetainPtr<NSWindow> window = adoptNS([[NSWindow alloc] initWithContentRect:[webView frame] styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO]);
[[window contentView] addSubview:webView.get()];