summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/websocket
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/data/websocket')
-rw-r--r--chrome/test/data/websocket/check-hsts.html19
-rw-r--r--chrome/test/data/websocket/set-hsts.html1
-rw-r--r--chrome/test/data/websocket/set-hsts.html.mock-http-headers4
3 files changed, 24 insertions, 0 deletions
diff --git a/chrome/test/data/websocket/check-hsts.html b/chrome/test/data/websocket/check-hsts.html
new file mode 100644
index 0000000..46c1967
--- /dev/null
+++ b/chrome/test/data/websocket/check-hsts.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<title>Testing HSTS with WebSockets</title>
+<script>
+var ws_url = window.location.hash.substring(1);
+var ws = new WebSocket(ws_url);
+
+ws.onopen = function()
+{
+ // The fact that the WebSocket connect opened successfully means that SSL was
+ // used.
+ document.title = 'PASS';
+}
+
+ws.onclose = function(evt)
+{
+ if (!evt.wasClean)
+ document.title = 'FAIL';
+}
+</script>
diff --git a/chrome/test/data/websocket/set-hsts.html b/chrome/test/data/websocket/set-hsts.html
new file mode 100644
index 0000000..4f3f4e0
--- /dev/null
+++ b/chrome/test/data/websocket/set-hsts.html
@@ -0,0 +1 @@
+<title>SET</title>
diff --git a/chrome/test/data/websocket/set-hsts.html.mock-http-headers b/chrome/test/data/websocket/set-hsts.html.mock-http-headers
new file mode 100644
index 0000000..912b8b4
--- /dev/null
+++ b/chrome/test/data/websocket/set-hsts.html.mock-http-headers
@@ -0,0 +1,4 @@
+HTTP/1.1 200 OK
+Cache-Control: private
+Content-Type: text/html; charset=UTF-8
+Strict-Transport-Security: max-age=3600