[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 02:11:01 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 249c709b8920bf4789070a313e6efb846baeaab9
Author: ukai at chromium.org <ukai at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 5 09:51:39 2010 +0000
2010-03-05 Fumitoshi Ukai <ukai at chromium.org>
Reviewed by Alexey Proskuryakov.
WebSocket test to transfer null character
https://bugs.webkit.org/show_bug.cgi?id=35715
* websocket/tests/null-character-expected.txt: Added.
* websocket/tests/null-character.html: Added.
* websocket/tests/script-tests/null-character.js: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7862a33..c315b21 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -2,6 +2,17 @@
Reviewed by Alexey Proskuryakov.
+ WebSocket test to transfer null character
+ https://bugs.webkit.org/show_bug.cgi?id=35715
+
+ * websocket/tests/null-character-expected.txt: Added.
+ * websocket/tests/null-character.html: Added.
+ * websocket/tests/script-tests/null-character.js: Added.
+
+2010-03-05 Fumitoshi Ukai <ukai at chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
WebSocket onmessageerror event handler
https://bugs.webkit.org/show_bug.cgi?id=35570
diff --git a/LayoutTests/websocket/tests/null-character-expected.txt b/LayoutTests/websocket/tests/null-character-expected.txt
new file mode 100644
index 0000000..6fca377
--- /dev/null
+++ b/LayoutTests/websocket/tests/null-character-expected.txt
@@ -0,0 +1,12 @@
+Make sure WebSocket transfer null character
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+WebSocket open
+msg should not be split by frame char \xff\0
+PASS msg is expectedMessage
+WebSocket closed
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/websocket/tests/null-character.html b/LayoutTests/websocket/tests/null-character.html
new file mode 100644
index 0000000..f227f1a
--- /dev/null
+++ b/LayoutTests/websocket/tests/null-character.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/null-character.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/script-tests/null-character.js b/LayoutTests/websocket/tests/script-tests/null-character.js
new file mode 100644
index 0000000..3e2b5f1
--- /dev/null
+++ b/LayoutTests/websocket/tests/script-tests/null-character.js
@@ -0,0 +1,38 @@
+description("Make sure WebSocket transfer null character");
+
+if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+function finish()
+{
+ isSuccessfullyParsed();
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+}
+
+var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/echo");
+// \xff in string would be \xc3\xbf on websocket connection (UTF-8)
+var expectedMessage = "Should Not\xff\0Split";
+
+ws.onopen = function()
+{
+ debug("WebSocket open");
+ ws.send(expectedMessage);
+};
+
+var msg;
+ws.onmessage = function(messageEvent)
+{
+ msg = messageEvent.data;
+ debug("msg should not be split by frame char \\xff\\0");
+ shouldBe("msg", "expectedMessage");
+ ws.close();
+};
+
+ws.onclose = function()
+{
+ debug("WebSocket closed");
+ finish();
+};
+
+var successfullyParsed = true;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list