Changeset 277508 in webkit
- Timestamp:
- May 14, 2021, 3:18:06 PM (4 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r277506 r277508 1 2021-05-14 Jean-Yves Avenard <jya@apple.com> 2 3 TestWebKitAPI.Fullscreen.WKViewDelegate is timing out 4 https://bugs.webkit.org/show_bug.cgi?id=223282 5 rdar://75495585 6 7 Reviewed by Jer Noble. 8 9 * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: 10 (TestWebKitAPI::TEST): Use WkView/NSWindow directly instead of using a 11 PlatformWebView. A PlatformWebView uses an OffscreenWindow which is a 12 NSWindow placed with a -10000 offset. This configuration appears to fail 13 to go into full screen in automation. 14 1 15 2021-05-14 Sam Weinig <weinig@apple.com> 2 16 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm
r274572 r277508 29 29 30 30 #import "PlatformUtilities.h" 31 #import "PlatformWebView.h"32 31 #import <WebKit/WKPagePrivateMac.h> 33 32 #import <WebKit/WKPreferencesPrivate.h> 34 33 #import <WebKit/WKView.h> 34 #import <WebKit/WKViewPrivate.h> 35 35 #import <WebKit/WKWebViewConfigurationPrivate.h> 36 36 #import <WebKit/WKWebViewPrivate.h> … … 115 115 } 116 116 117 // FIXME: Re-enable this test once webkit.org/b/223282 is resolved 118 TEST(Fullscreen, DISABLED_WKViewDelegate) 117 TEST(Fullscreen, WKViewDelegate) 119 118 { 120 119 WKRetainPtr<WKContextRef> context = adoptWK(WKContextCreateWithConfiguration(nullptr)); … … 123 122 WKPreferencesSetFullScreenEnabled(preferences, true); 124 123 125 PlatformWebView webView(context.get(), pageGroup.get()); 124 WKRetainPtr<WKPageConfigurationRef> configuration = adoptWK(WKPageConfigurationCreate()); 125 WKPageConfigurationSetContext(configuration.get(), context.get()); 126 WKPageConfigurationSetPageGroup(configuration.get(), pageGroup.get()); 127 128 NSRect rect = NSMakeRect(0, 0, 800, 600); 129 auto webView = adoptNS([[WKView alloc] initWithFrame:rect configurationRef:configuration.get()]); 130 [webView setWindowOcclusionDetectionEnabled:NO]; 131 132 auto window = adoptNS([[NSWindow alloc] initWithContentRect:rect styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO]); 133 [[window contentView] addSubview:webView.get()]; 134 [window makeKeyAndOrderFront:nil]; 126 135 127 136 RetainPtr<FullscreenDelegateMessageHandler> handler = adoptNS([[FullscreenDelegateMessageHandler alloc] init]); 128 WKPageSetFullscreenDelegate( webView.page(), handler.get());137 WKPageSetFullscreenDelegate([webView pageRef], handler.get()); 129 138 130 139 WKPageNavigationClientV0 loaderClient; … … 133 142 loaderClient.base.version = 0; 134 143 loaderClient.didFinishNavigation = didFinishNavigation; 135 WKPageSetPageNavigationClient( webView.page(), &loaderClient.base);144 WKPageSetPageNavigationClient([webView pageRef], &loaderClient.base); 136 145 137 146 receivedLoadedMessage = false; 138 147 WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("FullscreenDelegate", "html")); 139 WKPageLoadURL( webView.page(), url.get());148 WKPageLoadURL([webView pageRef], url.get()); 140 149 141 150 TestWebKitAPI::Util::run(&receivedLoadedMessage); 142 151 143 webView.simulateButtonClick(kWKEventMouseButtonLeftButton, 5, 5, 0); 152 NSEvent *event = [NSEvent mouseEventWithType:NSEventTypeLeftMouseDown location:NSMakePoint(5, 5) modifierFlags:0 timestamp:0 windowNumber:window.get().windowNumber context:0 eventNumber:0 clickCount:0 pressure:0]; 153 154 [webView mouseDown:event]; 144 155 TestWebKitAPI::Util::run(&receivedWillEnterFullscreenMessage); 145 156 TestWebKitAPI::Util::run(&receivedDidEnterFullscreenMessage); 146 157 147 webView.simulateButtonClick(kWKEventMouseButtonLeftButton, 5, 5, 0);158 [webView mouseDown:event]; 148 159 TestWebKitAPI::Util::run(&receivedWillExitFullscreenMessage); 149 160 TestWebKitAPI::Util::run(&receivedDidExitFullscreenMessage);
Note:
See TracChangeset
for help on using the changeset viewer.