OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <script src="/js-test-resources/js-test.js"></script> |
| 3 <script src="resources/referrer-echo.php" type="text/javascript"></script> |
| 4 <script> |
| 5 description("Check that Referrer: for validation requests are correctly set."); |
| 6 window.jsTestIsAsync = true; |
| 7 |
| 8 // The above script adds the 'referrer' global. |
| 9 shouldBeTrue('referrer.indexOf("subresource-revalidation-referrer.html") >= 0'); |
| 10 |
| 11 var first = true; |
| 12 function iframeLoaded(ref) { |
| 13 if (first) { |
| 14 // Navigating the iframe-embedded anchor will use the iframe's |
| 15 // URL as referrer. |
| 16 first = false; |
| 17 window.frames[0].document.getElementsByTagName("a")[0].click(); |
| 18 } else { |
| 19 referrer = ref; |
| 20 shouldBeTrue('referrer.indexOf("subresource-revalidation-referrer-iframe
.html") >= 0'); |
| 21 finishJSTest(); |
| 22 } |
| 23 } |
| 24 </script> |
| 25 <iframe src="resources/subresource-revalidation-referrer-iframe.html"></iframe> |
OLD | NEW |