| Index: third_party/WebKit/LayoutTests/http/tests/security/suborigins/resources/fetch-resource.php
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/resources/fetch-resource.php b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/resources/fetch-resource.php
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4039ea02989d1cf98bb068dc12b76bd4aee1559e
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/resources/fetch-resource.php
|
| @@ -0,0 +1,22 @@
|
| +<?php
|
| +if ($_GET["suborigin"]) {
|
| + header("Suborigin: " . $_GET["suborigin"]);
|
| +}
|
| +?>
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<script>
|
| +var id = '<?php echo($_GET["id"]); ?>';
|
| +var resource_url = '<?php echo($_GET["resource"]); ?>'
|
| +
|
| +var is_mem_cached = window.internals.isLoadingFromMemoryCache(resource_url);
|
| +
|
| +fetch(resource_url, {mode: 'no-cors'})
|
| +.then(function(response) {
|
| + window.parent.postMessage({'type': 'response', 'is_mem_cached': is_mem_cached, 'id': id}, '*');
|
| +})
|
| +.catch(function(e) {
|
| + window.parent.postMessage({'type': 'error', 'is_mem_cached': is_mem_cached, 'id': id}, '*')
|
| +});
|
| +</script>
|
| +</html>
|
|
|