Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-link-rel.php |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-link-rel.php b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-link-rel.php |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a0c906605c4261d49f4169d38d5f7669823a25aa |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-link-rel.php |
| @@ -0,0 +1,23 @@ |
| +<?php |
| +header("Suborigin: foobar"); |
| +?> |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<title>Service Worker link rel fails from a suborigin</title> |
| +<script src="/resources/testharness.js"></script> |
| +<script src="/resources/testharnessreport.js"></script> |
| +</head> |
| +<script> |
| +var link = document.createElement('link'); |
| +link.setAttribute('rel', 'serviceworker'); |
| +link.setAttribute('href', 'resources/sw-reject-all-with-error.js'); |
|
falken
2016/09/23 01:22:33
I think this file doesn't exist? The test could be
jww
2016/09/23 04:34:47
It does exist, from a prior CL (see https://cs.chr
|
| +link.onload = function() { |
| + assert_unreached('Service worker was successfully registered with a <link> element'); |
| +} |
| +link.onerror = function() { |
| + done(); |
| +} |
| +document.getElementsByTagName('head')[0].appendChild(link); |
| +</script> |
| +</html> |