Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Unified Diff: LayoutTests/http/tests/websocket/tests/hybi/httponly-cookie.pl

Issue 101143002: Remove hybi sub directory for WebSocket layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/websocket/tests/hybi/httponly-cookie.pl
diff --git a/LayoutTests/http/tests/websocket/tests/hybi/httponly-cookie.pl b/LayoutTests/http/tests/websocket/tests/hybi/httponly-cookie.pl
deleted file mode 100755
index fb890e0de3058ba07aa05bd37ad1e2e45928e99f..0000000000000000000000000000000000000000
--- a/LayoutTests/http/tests/websocket/tests/hybi/httponly-cookie.pl
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/perl -wT
-use strict;
-
-if ($ENV{"QUERY_STRING"} eq "clear=1") {
- print "Content-Type: text/plain\r\n";
- print "Set-Cookie: WK-websocket-test=0; Path=/; Max-Age=0\r\n";
- print "Set-Cookie: WK-websocket-test-httponly=0; Path=/; HttpOnly; Max-Age=0\r\n";
- print "\r\n";
- print "Cookies are cleared.";
- exit;
-}
-
-print "Content-Type: text/html\r\n";
-# The "Path" attribute is set to "/" so that the WebSocket created below can
-# pass "Path" check so that we can test if "HttpOnly" check is working.
-print "Set-Cookie: WK-websocket-test=1; Path=/\r\n";
-print "Set-Cookie: WK-websocket-test-httponly=1; Path=/; HttpOnly\r\n";
-print "\r\n";
-print <<HTML
-<html>
-<head>
-<script src="/js-test-resources/js-test.js"></script>
-</head>
-<body>
-<p>Test WebSocket sends HttpOnly cookies.</p>
-<p>On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".</p>
-<div id="console"></div>
-<script>
-window.jsTestIsAsync = true;
-
-var cookie;
-
-// Normalize a cookie string
-function normalizeCookie(cookie)
-{
- // Split the cookie string, sort it and then put it back together.
- return cookie.split('; ').sort().join('; ');
-}
-
-function clearCookies()
-{
- var xhr = new XMLHttpRequest();
- xhr.open("GET", "httponly-cookie.pl?clear=1", false);
- xhr.send(null);
-}
-
-var ws = new WebSocket("ws://127.0.0.1:8880/echo-cookie");
-ws.onopen = function() {
- debug("WebSocket open");
-};
-ws.onmessage = function(evt) {
- cookie = evt.data;
- ws.close();
-};
-ws.onclose = function() {
- debug("WebSocket closed");
- cookie = normalizeCookie(cookie);
- shouldBe("cookie", '"WK-websocket-test-httponly=1; WK-websocket-test=1"');
- clearCookies();
- finishJSTest();
-};
-
-</script>
-</body>
-</html>
-HTML

Powered by Google App Engine
This is Rietveld 408576698