| <!DOCTYPE html> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script src="resources/test-helpers.js"></script> |
| <script src="resources/registration-tests.js"></script> |
| <body> |
| <script> |
| async_test(function(t) { |
| window.addEventListener('message', function(e) { |
| if (e.data == 'error') { |
| t.step(function() { |
| t.done(); |
| }); |
| } else { |
| t.step(function() { |
| assert_unreached('iframe successfully loaded service worker'); |
| }); |
| } |
| }); |
| }, 'Sandboxed iframe should not be able to register service worker with link rel'); |
| </script> |
| <iframe src="resources/iframe-register-link-element.html" sandbox="allow-scripts"></iframe> |
| </body> |