| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script src="/resources/get-host-info.js"></script> |
| </head> |
| <body> |
| </body> |
| <script> |
| if (window.testRunner) { |
| testRunner.setAllowRunningOfInsecureContent(true); |
| } |
| |
| window.onload = function() { |
| var test = async_test("Shared workers secure context"); |
| |
| window.onmessage = test.step_func(function (event) { |
| assert_equals(true, event.data.success); |
| test.done(); |
| }); |
| |
| test.step(function () { |
| var worker = new SharedWorker("resources/worker-util.js", "worker"); |
| var iframe = document.createElement("iframe"); |
| iframe.src = get_host_info().UNAUTHENTICATED_ORIGIN + "/workers/resources/load-worker-in-iframe.html"; |
| document.body.appendChild(iframe); |
| }); |
| }; |
| </script> |
| </html> |