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

Unified Diff: LayoutTests/http/tests/security/mixedContent/websocket/insecure-websocket-in-secure-page-worker-allowed.html

Issue 222153002: Disallow connecting an insecure WebSocket from a secure page. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 8 months 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/security/mixedContent/websocket/insecure-websocket-in-secure-page-worker-allowed.html
diff --git a/LayoutTests/http/tests/security/mixedContent/websocket/insecure-websocket-in-secure-page-worker-allowed.html b/LayoutTests/http/tests/security/mixedContent/websocket/insecure-websocket-in-secure-page-worker-allowed.html
new file mode 100644
index 0000000000000000000000000000000000000000..c61d20a3da54cb362b6a6e14f0b70712fcb2fe56
--- /dev/null
+++ b/LayoutTests/http/tests/security/mixedContent/websocket/insecure-websocket-in-secure-page-worker-allowed.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="/js-test-resources/testharness.js"></script>
+<script src="/js-test-resources/testharnessreport.js"></script>
+<script>
+
+if (window.testRunner) {
+ testRunner.setCanOpenWindows();
+ testRunner.setCloseRemainingWindowsWhenComplete(true);
+ testRunner.overridePreference("WebKitAllowRunningInsecureContent", true);
+}
+
+var test = async_test("Test that an insecure WebSocket connection is not blocked when created in a worker created from HTTPS resource.");
+test.step(function ()
+{
+ window.addEventListener("message", test.step_func(function (evt)
+ {
+ assert_equals(evt.data, "DONE", "evt.data");
+ test.done();
+ }), false);
+
+ window.open("https://127.0.0.1:8443/security/mixedContent/websocket/resources/expect-successful-construction-worker.html");
+});
+
+</script>
+</head>
+<body>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698