Title: [275415] trunk
Revision
275415
Author
[email protected]
Date
2021-04-02 03:44:16 -0700 (Fri, 02 Apr 2021)

Log Message

[MacOS] Enable NSURLSession WebSocket code path in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=220973
<rdar://problem/73655870>

Reviewed by Darin Adler.

Source/WebKit:

Disable a debug assert until it gets fixed below WebKit.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:webSocketTask:didOpenWithProtocol:]):

Source/WTF:

* wtf/PlatformHave.h:
Bump NSURLSessionWebSocket path to above BigSur and iOS14.

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (275414 => 275415)


--- trunk/Source/WTF/ChangeLog	2021-04-02 09:14:46 UTC (rev 275414)
+++ trunk/Source/WTF/ChangeLog	2021-04-02 10:44:16 UTC (rev 275415)
@@ -1,3 +1,14 @@
+2021-04-02  Youenn Fablet  <[email protected]>
+
+        [MacOS] Enable NSURLSession WebSocket code path in WebKitTestRunner
+        https://bugs.webkit.org/show_bug.cgi?id=220973
+        <rdar://problem/73655870>
+
+        Reviewed by Darin Adler.
+
+        * wtf/PlatformHave.h:
+        Bump NSURLSessionWebSocket path to above BigSur and iOS14.
+
 2021-04-02  Yusuke Suzuki  <[email protected]>
 
         Unreviewed, fix passing hash value

Modified: trunk/Source/WTF/wtf/PlatformHave.h (275414 => 275415)


--- trunk/Source/WTF/wtf/PlatformHave.h	2021-04-02 09:14:46 UTC (rev 275414)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2021-04-02 10:44:16 UTC (rev 275415)
@@ -511,7 +511,7 @@
 #define HAVE_DEVICE_MANAGEMENT 1
 #endif
 
-#if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 110000)
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000)
 #define HAVE_NSURLSESSION_WEBSOCKET 1
 #endif
 

Modified: trunk/Source/WebKit/ChangeLog (275414 => 275415)


--- trunk/Source/WebKit/ChangeLog	2021-04-02 09:14:46 UTC (rev 275414)
+++ trunk/Source/WebKit/ChangeLog	2021-04-02 10:44:16 UTC (rev 275415)
@@ -1,3 +1,16 @@
+2021-04-02  Youenn Fablet  <[email protected]>
+
+        [MacOS] Enable NSURLSession WebSocket code path in WebKitTestRunner
+        https://bugs.webkit.org/show_bug.cgi?id=220973
+        <rdar://problem/73655870>
+
+        Reviewed by Darin Adler.
+
+        Disable a debug assert until it gets fixed below WebKit.
+
+        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+        (-[WKNetworkSessionDelegate URLSession:webSocketTask:didOpenWithProtocol:]):
+
 2021-04-01  Yusuke Suzuki  <[email protected]>
 
         [WTF] Introduce RobinHoodHashTable

Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (275414 => 275415)


--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2021-04-02 09:14:46 UTC (rev 275414)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2021-04-02 10:44:16 UTC (rev 275415)
@@ -1006,7 +1006,8 @@
 - (void)URLSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)task didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(NSData *)reason
 {
     if (auto* webSocketTask = [self existingWebSocketTask:task]) {
-        ASSERT([reason isEqualToData:task.closeReason]);
+        // FIXME: We can re-enable ASSERT below once NSURLSession bug rdar://problem/72383646 is fixed.
+        // ASSERT([reason isEqualToData:task.closeReason]);
         ASSERT(closeCode == [task closeCode]);
         auto closeReason = adoptNS([[NSString alloc] initWithData:reason encoding:NSUTF8StringEncoding]);
         webSocketTask->didClose(closeCode, closeReason.get());

Modified: trunk/Tools/ChangeLog (275414 => 275415)


--- trunk/Tools/ChangeLog	2021-04-02 09:14:46 UTC (rev 275414)
+++ trunk/Tools/ChangeLog	2021-04-02 10:44:16 UTC (rev 275415)
@@ -1,3 +1,14 @@
+2021-04-02  Youenn Fablet  <[email protected]>
+
+        [MacOS] Enable NSURLSession WebSocket code path in WebKitTestRunner
+        https://bugs.webkit.org/show_bug.cgi?id=220973
+        <rdar://problem/73655870>
+
+        Reviewed by Darin Adler.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::resetPreferencesToConsistentValues):
+
 2021-04-01  Yusuke Suzuki  <[email protected]>
 
         [WTF] Introduce RobinHoodHashTable

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (275414 => 275415)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2021-04-02 09:14:46 UTC (rev 275414)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2021-04-02 10:44:16 UTC (rev 275415)
@@ -918,7 +918,6 @@
     WKPreferencesSetHiddenPageDOMTimerThrottlingEnabled(preferences, false);
     WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled(preferences, false);
     WKPreferencesSetStorageBlockingPolicy(preferences, kWKAllowAllStorage); // FIXME: We should be testing the default.
-    WKPreferencesSetIsNSURLSessionWebSocketEnabled(preferences, false);
     WKPreferencesSetFetchAPIKeepAliveEnabled(preferences, true);
     WKPreferencesSetMediaPreloadingEnabled(preferences, true);
     WKPreferencesSetExposeSpeakersEnabled(preferences, true);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to