summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/history/the-history-interface/010-5.html
blob: d150449eb2df241e4ae286cf8ba13fc37f0874c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!doctype html>
<html>
        <head>
                <title>history.pushState/replaceState and referer headers (before onload)</title>
        </head>
        <body>

                <noscript><p>Enable JavaScript and reload</p></noscript>
                <div id="log"></div>
                <script type="text/javascript">
var httpReferer = "{{headers[referer]}}";
var lastUrl = location.href.replace(/\/[^\/]*$/,'\/010-4.html?2345');
parent.test(function () {
        parent.assert_equals( httpReferer, lastUrl );
}, 'HTTP Referer should use the replaced state (before onload)');
parent.test(function () {
        parent.assert_equals( document.referrer, lastUrl );
}, 'document.referrer should use the replaced state (before onload)');
parent.done();
                </script>

        </body>
</html>