Index: LayoutTests/http/tests/security/mixedContent/websocket/insecure-websocket-in-secure-page-allowed.html |
diff --git a/LayoutTests/http/tests/security/mixedContent/websocket/insecure-websocket-in-secure-page-allowed.html b/LayoutTests/http/tests/security/mixedContent/websocket/insecure-websocket-in-secure-page-allowed.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d8cf54210bba877042cdca6be0cddc9cf47dec95 |
--- /dev/null |
+++ b/LayoutTests/http/tests/security/mixedContent/websocket/insecure-websocket-in-secure-page-allowed.html |
@@ -0,0 +1,31 @@ |
+<!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); |
+ // Allow insecure WebSockets. |
+ testRunner.overridePreference("WebKitAllowRunningInsecureContent", true); |
+} |
+ |
+var test = async_test("Test that an insecure WebSocket connection is blocked when created in an 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.html"); |
+}); |
+ |
+</script> |
+</head> |
+<body> |
+</body> |
+</html> |