[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.20-204-g221d8e8

ukai at chromium.org ukai at chromium.org
Wed Feb 10 22:16:15 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 1fe39f879d56b78f4492ff009ece9ab66b3dccd0
Author: ukai at chromium.org <ukai at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Feb 5 09:37:37 2010 +0000

    2010-02-05  Fumitoshi Ukai  <ukai at chromium.org>
    
            Reviewed by Alexey Proskuryakov.
    
            send() should return false, after frame that opened a WebSokcet is detached
            https://bugs.webkit.org/show_bug.cgi?id=34630
    
            * websocket/tests/send-after-close-on-unload-expected.txt: Added.
            * websocket/tests/send-after-close-on-unload.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54414 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9a21049..1e4e8f1 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-02-05  Fumitoshi Ukai  <ukai at chromium.org>
+
+        Reviewed by Alexey Proskuryakov.
+
+        send() should return false, after frame that opened a WebSokcet is detached
+        https://bugs.webkit.org/show_bug.cgi?id=34630
+
+        * websocket/tests/send-after-close-on-unload-expected.txt: Added.
+        * websocket/tests/send-after-close-on-unload.html: Added.
+
 2010-02-05  Tony Chang  <tony at chromium.org>
 
         Reviewed by Eric Seidel.
diff --git a/LayoutTests/websocket/tests/send-after-close-on-unload-expected.txt b/LayoutTests/websocket/tests/send-after-close-on-unload-expected.txt
new file mode 100644
index 0000000..826a8b4
--- /dev/null
+++ b/LayoutTests/websocket/tests/send-after-close-on-unload-expected.txt
@@ -0,0 +1,15 @@
+Test if Web Socket opened in iframe, referred in parent document is, and try to send() returns false.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+PASS ws on master document is ready.
+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 document.childWebSocket.send('send to closed socket') is false
+PASS closedSocket is "socket1"
+PASS document.childWebSocket.readyState is 2
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/websocket/tests/send-after-close-on-unload.html b/LayoutTests/websocket/tests/send-after-close-on-unload.html
new file mode 100644
index 0000000..5881f99
--- /dev/null
+++ b/LayoutTests/websocket/tests/send-after-close-on-unload.html
@@ -0,0 +1,61 @@
+<!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 type="text/javascript">
+description("Test if Web Socket opened in iframe, referred in parent document is, and try to send() returns false.");
+
+if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+
+var frameDiv;
+var closedSocket;
+document.childWebSocket = null;
+
+function endTest()
+{
+    shouldBe("closedSocket", '"socket1"');
+    shouldBe("document.childWebSocket.readyState", "2");
+    isSuccessfullyParsed();
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+};
+
+var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/close-on-unload");
+ws.onopen = function()
+{
+    debug("PASS ws on master document is ready.");
+    frameDiv = document.createElement("iframe");
+    frameDiv.src = "resources/close-on-unload-iframe-reference-in-parent.html";
+    document.body.appendChild(frameDiv);
+    debug("PASS insert a iframe, where open ws called 'socket1'");
+};
+ws.onmessage = function(evt)
+{
+    closedSocket = evt.data;
+    ws.close();
+};
+ws.onclose = function()
+{
+    endTest();
+};
+
+document.iframeReady = function()
+{
+    shouldBeNonNull("document.childWebSocket");
+    debug("PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...");
+    document.body.removeChild(frameDiv);
+    shouldBeFalse("document.childWebSocket.send('send to closed socket')");
+};
+
+var successfullyParsed = true;
+</script>
+
+</body>
+</html>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list