Title: [266059] trunk/LayoutTests
Revision
266059
Author
you...@apple.com
Date
2020-08-24 08:02:59 -0700 (Mon, 24 Aug 2020)

Log Message

http/tests/websocket/tests/hybi/close-on-* tests are not interoperable
https://bugs.webkit.org/show_bug.cgi?id=215692

Reviewed by Darin Adler.

Before the patch, tests were not passing in Chrome, Firefox and NSURLSession WebSocket code path.
This was due to the fact the web socket script is using try/finally and the closure of the connection is not raising an exception
while it is for Chrome, Firefox and NSURLSession WebSocket code path.
Change the WebSocket server script to more reliably send the socket message at closing time of the connection.

* http/tests/websocket/tests/hybi/close-on-navigate-new-location-expected.txt:
* http/tests/websocket/tests/hybi/close-on-navigate-new-location.html:
* http/tests/websocket/tests/hybi/close-on-unload-and-force-gc-expected.txt:
* http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.html:
* http/tests/websocket/tests/hybi/close-on-unload-expected.txt:
* http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent-expected.txt:
* http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent.html:
* http/tests/websocket/tests/hybi/close-on-unload.html:
* http/tests/websocket/tests/hybi/close-on-unload_wsh.py:
(web_socket_transfer_data):
* http/tests/websocket/tests/hybi/send-after-close-on-unload-expected.txt:
* http/tests/websocket/tests/hybi/send-after-close-on-unload.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (266058 => 266059)


--- trunk/LayoutTests/ChangeLog	2020-08-24 15:02:47 UTC (rev 266058)
+++ trunk/LayoutTests/ChangeLog	2020-08-24 15:02:59 UTC (rev 266059)
@@ -1,3 +1,28 @@
+2020-08-24  Youenn Fablet  <you...@apple.com>
+
+        http/tests/websocket/tests/hybi/close-on-* tests are not interoperable
+        https://bugs.webkit.org/show_bug.cgi?id=215692
+
+        Reviewed by Darin Adler.
+
+        Before the patch, tests were not passing in Chrome, Firefox and NSURLSession WebSocket code path.
+        This was due to the fact the web socket script is using try/finally and the closure of the connection is not raising an exception
+        while it is for Chrome, Firefox and NSURLSession WebSocket code path.
+        Change the WebSocket server script to more reliably send the socket message at closing time of the connection.
+
+        * http/tests/websocket/tests/hybi/close-on-navigate-new-location-expected.txt:
+        * http/tests/websocket/tests/hybi/close-on-navigate-new-location.html:
+        * http/tests/websocket/tests/hybi/close-on-unload-and-force-gc-expected.txt:
+        * http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.html:
+        * http/tests/websocket/tests/hybi/close-on-unload-expected.txt:
+        * http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent-expected.txt:
+        * http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent.html:
+        * http/tests/websocket/tests/hybi/close-on-unload.html:
+        * http/tests/websocket/tests/hybi/close-on-unload_wsh.py:
+        (web_socket_transfer_data):
+        * http/tests/websocket/tests/hybi/send-after-close-on-unload-expected.txt:
+        * http/tests/websocket/tests/hybi/send-after-close-on-unload.html:
+
 2020-08-24  Hector Lopez  <hector_i_lo...@apple.com>
         [ macOS wk1 Debug ] inspector/animation/nameChanged.html is a flaky crash
         https://bugs.webkit.org/show_bug.cgi?id=215767

Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location-expected.txt (266058 => 266059)


--- trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location-expected.txt	2020-08-24 15:02:47 UTC (rev 266058)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location-expected.txt	2020-08-24 15:02:59 UTC (rev 266059)
@@ -5,7 +5,7 @@
 PASS ws on master document is ready.
 PASS insert a iframe, where open ws called 'socket1'
 PASS 'socket1' is sent to the server. navigate to new location. expect receiving 'socket1' on ws...
-PASS closedSocket is "socket1"
+PASS closedSocket is "socket1: receive next message"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location.html (266058 => 266059)


--- trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location.html	2020-08-24 15:02:47 UTC (rev 266058)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location.html	2020-08-24 15:02:59 UTC (rev 266059)
@@ -30,7 +30,7 @@
 };
 ws._onclose_ = function()
 {
-    shouldBe("closedSocket", '"socket1"');
+    shouldBe("closedSocket", '"socket1: receive next message"');
     finishJSTest();
 };
 

Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc-expected.txt (266058 => 266059)


--- trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc-expected.txt	2020-08-24 15:02:47 UTC (rev 266058)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc-expected.txt	2020-08-24 15:02:59 UTC (rev 266059)
@@ -5,7 +5,7 @@
 PASS ws on master document is ready.
 PASS insert a iframe, where open ws called 'socket1'
 PASS 'socket1' is sent to the server. unload the iframe and force garbage collection. expect receiving 'socket1' on ws and no crash...
-PASS closedSocket is "socket1"
+PASS closedSocket is "socket1: receive next message"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.html (266058 => 266059)


--- trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.html	2020-08-24 15:02:47 UTC (rev 266058)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.html	2020-08-24 15:02:59 UTC (rev 266059)
@@ -30,7 +30,7 @@
 };
 ws._onclose_ = function()
 {
-    shouldBe("closedSocket", '"socket1"');
+    shouldBe("closedSocket", '"socket1: receive next message"');
     finishJSTest();
 };
 

Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-expected.txt (266058 => 266059)


--- trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-expected.txt	2020-08-24 15:02:47 UTC (rev 266058)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-expected.txt	2020-08-24 15:02:59 UTC (rev 266059)
@@ -5,7 +5,7 @@
 PASS ws on master document is ready.
 PASS insert a iframe, where open ws called 'socket1'
 PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...
-PASS closedSocket is "socket1"
+PASS closedSocket is "socket1: receive next message"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent-expected.txt (266058 => 266059)


--- trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent-expected.txt	2020-08-24 15:02:47 UTC (rev 266058)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent-expected.txt	2020-08-24 15:02:59 UTC (rev 266059)
@@ -6,7 +6,7 @@
 PASS insert a iframe, where open ws called 'socket1'
 PASS document.childWebSocket is non-null.
 PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...
-PASS closedSocket is "socket1"
+PASS closedSocket is "socket1: receive next message"
 PASS document.childWebSocket.readyState is 3
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent.html (266058 => 266059)


--- trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent.html	2020-08-24 15:02:47 UTC (rev 266058)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent.html	2020-08-24 15:02:59 UTC (rev 266059)
@@ -31,7 +31,7 @@
 };
 ws._onclose_ = function()
 {
-    shouldBe("closedSocket", '"socket1"');
+    shouldBe("closedSocket", '"socket1: receive next message"');
     shouldBe("document.childWebSocket.readyState", "3");
     finishJSTest();
 };

Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload.html (266058 => 266059)


--- trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload.html	2020-08-24 15:02:47 UTC (rev 266058)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload.html	2020-08-24 15:02:59 UTC (rev 266059)
@@ -30,7 +30,7 @@
 };
 ws._onclose_ = function()
 {
-    shouldBe("closedSocket", '"socket1"');
+    shouldBe("closedSocket", '"socket1: receive next message"');
     finishJSTest();
 };
 

Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload_wsh.py (266058 => 266059)


--- trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload_wsh.py	2020-08-24 15:02:47 UTC (rev 266058)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload_wsh.py	2020-08-24 15:02:59 UTC (rev 266059)
@@ -48,9 +48,8 @@
         # notify to client that socketName is received by server.
         msgutil.send_message(request, socketName)
         msgutil.receive_message(request)  # wait, and exception by close.
-        socketName = socketName + ': receive next message'
     finally:
         # request is closed. notify this socketName to other web sockets.
         del connections[request]
         for ws in connections.keys():
-            msgutil.send_message(ws, socketName)
+            msgutil.send_message(ws, socketName + ': receive next message')

Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/send-after-close-on-unload-expected.txt (266058 => 266059)


--- trunk/LayoutTests/http/tests/websocket/tests/hybi/send-after-close-on-unload-expected.txt	2020-08-24 15:02:47 UTC (rev 266058)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/send-after-close-on-unload-expected.txt	2020-08-24 15:02:59 UTC (rev 266059)
@@ -7,7 +7,7 @@
 PASS document.childWebSocket is non-null.
 PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...
 PASS document.childWebSocket.send('send to closed socket') is undefined.
-PASS closedSocket is "socket1"
+PASS closedSocket is "socket1: receive next message"
 PASS document.childWebSocket.readyState is 3
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/send-after-close-on-unload.html (266058 => 266059)


--- trunk/LayoutTests/http/tests/websocket/tests/hybi/send-after-close-on-unload.html	2020-08-24 15:02:47 UTC (rev 266058)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/send-after-close-on-unload.html	2020-08-24 15:02:59 UTC (rev 266059)
@@ -31,7 +31,7 @@
 };
 ws._onclose_ = function()
 {
-    shouldBe("closedSocket", '"socket1"');
+    shouldBe("closedSocket", '"socket1: receive next message"');
     shouldBe("document.childWebSocket.readyState", "3");
     finishJSTest();
 };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to