| <!DOCTYPE html> |
| <title>taskWorklet on an insecure context</title> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script src="/resources/get-host-info.js"></script> |
| <script> |
| if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { |
| test(t => assert_not_equals(window.taskWorklet, undefined), |
| 'taskWorklet should be available on a secure context.'); |
| window.location = get_host_info().UNAUTHENTICATED_ORIGIN + |
| window.location.pathname; |
| } else { |
| test(t => assert_equals(window.taskWorklet, undefined), |
| 'taskWorklet should not be available on an insecure context.'); |
| } |
| </script> |