| Index: LayoutTests/http/tests/cache/subresource-revalidation-referrer.html
|
| diff --git a/LayoutTests/http/tests/cache/subresource-revalidation-referrer.html b/LayoutTests/http/tests/cache/subresource-revalidation-referrer.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8b8391190425aa12b49c8fb3f56e031dd2cbea8a
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/cache/subresource-revalidation-referrer.html
|
| @@ -0,0 +1,25 @@
|
| +<!DOCTYPE HTML>
|
| +<script src="/js-test-resources/js-test.js"></script>
|
| +<script src="resources/referrer-echo.php" type="text/javascript"></script>
|
| +<script>
|
| +description("Check that Referrer: for validation requests are correctly set.");
|
| +window.jsTestIsAsync = true;
|
| +
|
| +// The above script adds the 'referrer' global.
|
| +shouldBeTrue('referrer.indexOf("subresource-revalidation-referrer.html") >= 0');
|
| +
|
| +var first = true;
|
| +function iframeLoaded(ref) {
|
| + if (first) {
|
| + // Navigating the iframe-embedded anchor will use the iframe's
|
| + // URL as referrer.
|
| + first = false;
|
| + window.frames[0].document.getElementsByTagName("a")[0].click();
|
| + } else {
|
| + referrer = ref;
|
| + shouldBeTrue('referrer.indexOf("subresource-revalidation-referrer-iframe.html") >= 0');
|
| + finishJSTest();
|
| + }
|
| +}
|
| +</script>
|
| +<iframe src="resources/subresource-revalidation-referrer-iframe.html"></iframe>
|
|
|