diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/history/the-history-interface/009-5.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/history/the-history-interface/009-5.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/history/the-history-interface/009-5.html b/testing/web-platform/tests/html/browsers/history/the-history-interface/009-5.html new file mode 100644 index 000000000..068a089af --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-history-interface/009-5.html @@ -0,0 +1,23 @@ +<!doctype html> +<html> + <head> + <title>history.pushState/replaceState and referer headers</title> + </head> + <body> + + <noscript><p>Enable JavaScript and reload</p></noscript> + <div id="log"></div> + <script type="text/javascript"> +var httpReferer = unescape("{{headers[referer]}}"); +var lastUrl = location.href.replace(/\/[^\/]*$/,'\/009-4.html?2345'); +parent.test(function () { + parent.assert_equals( httpReferer, lastUrl ); +}, 'HTTP Referer should use the replaced state'); +parent.test(function () { + parent.assert_equals( document.referrer, lastUrl ); +}, 'document.referrer should use the replaced state'); +parent.done(); + </script> + + </body> +</html> |