[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

ukai at chromium.org ukai at chromium.org
Thu Apr 8 00:28:44 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit b3bf1e40cb48ee4125d6ba30a9ef09d61e8bd4d6
Author: ukai at chromium.org <ukai at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 9 03:20:46 2009 +0000

    2009-12-08  Fumitoshi Ukai  <ukai at chromium.org>
    
            Reviewed by Darin Adler.
    
            Add tests that WebSocket-Protocol: is ignored if protocol was not specified.
            https://bugs.webkit.org/show_bug.cgi?id=32267
    
            * websocket/tests/script-tests/websocket-protocol-ignored.js: Added.
            * websocket/tests/websocket-protocol-ignored-expected.txt: Added.
            * websocket/tests/websocket-protocol-ignored.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51885 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c08fea9..42592a3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2009-12-08  Fumitoshi Ukai  <ukai at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Add tests that WebSocket-Protocol: is ignored if protocol was not specified.
+        https://bugs.webkit.org/show_bug.cgi?id=32267
+
+        * websocket/tests/script-tests/websocket-protocol-ignored.js: Added.
+        * websocket/tests/websocket-protocol-ignored-expected.txt: Added.
+        * websocket/tests/websocket-protocol-ignored.html: Added.
+
 2009-12-08  Peterson Trethewey  <petersont at google.com>
 
         Reviewed by Oliver Hunt.
diff --git a/LayoutTests/websocket/tests/script-tests/websocket-protocol-ignored.js b/LayoutTests/websocket/tests/script-tests/websocket-protocol-ignored.js
new file mode 100644
index 0000000..12d7365
--- /dev/null
+++ b/LayoutTests/websocket/tests/script-tests/websocket-protocol-ignored.js
@@ -0,0 +1,44 @@
+description("Test WebSocket handshake success without protocol and ignore WebSocket-Protocol from server.");
+
+if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+
+var protocol;
+
+function endTest()
+{
+    shouldBe("protocol", '"sub-protocol"');
+    clearTimeout(timeoutID);
+    isSuccessfullyParsed();
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+}
+
+var url = "ws://localhost:8880/websocket/tests/protocol-test?protocol=sub-protocol";
+var ws = new WebSocket(url);
+
+ws.onopen = function()
+{
+    debug("Connected");
+};
+
+ws.onmessage = function (messageEvent)
+{
+    protocol = messageEvent.data;
+    ws.close();
+};
+
+ws.onclose = function()
+{
+    endTest();
+};
+
+function timeOutCallback()
+{
+    debug("Timed out in state: " + ws.readyState);
+    endTest();
+}
+
+var timeoutID = setTimeout(timeOutCallback, 3000);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/websocket/tests/websocket-protocol-ignored-expected.txt b/LayoutTests/websocket/tests/websocket-protocol-ignored-expected.txt
new file mode 100644
index 0000000..4de6d71
--- /dev/null
+++ b/LayoutTests/websocket/tests/websocket-protocol-ignored-expected.txt
@@ -0,0 +1,10 @@
+Test WebSocket handshake success without protocol and ignore WebSocket-Protocol from server.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+Connected
+PASS protocol is "sub-protocol"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/websocket/tests/websocket-protocol-ignored.html b/LayoutTests/websocket/tests/websocket-protocol-ignored.html
new file mode 100644
index 0000000..85cdcd0
--- /dev/null
+++ b/LayoutTests/websocket/tests/websocket-protocol-ignored.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script src="../../fast/js/resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/websocket-protocol-ignored.js"></script>
+</body>
+</html>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list