Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / loader / stateobjects / pushstate-with-fragment-urls-and-hashchange.html
blob98a429ea6d7c14218a932ad1f1674319780518a6
1 <html>
2 <head>
3 <script>
5 if (window.testRunner) {
6 testRunner.clearBackForwardList();
7 testRunner.dumpAsText();
8 testRunner.waitUntilDone();
11 function log(txt)
13 document.getElementById("logger").innerText += txt + "\n";
16 function runTest()
18 history.replaceState("OriginalEntry", "original");
19 history.pushState(null, null, "#");
20 history.pushState(null, null, "");
21 history.pushState(null, null, "#hash");
22 history.pushState(null, null, "#otherhash");
23 history.pushState(null, null, "#");
24 history.pushState(null, null, null);
25 history.pushState(null, null, "some-other.html");
26 history.pushState(null, null, "some-other.html?withquery");
27 history.pushState(null, null, "some-other.html?withquery#");
28 history.pushState(null, null, "some-other.html?withquery");
29 history.pushState(null, null, "some-other.html?withquery#somehash");
30 history.pushState(null, null, "some-other.html?withquery#");
31 history.pushState(null, null, "some-other.html?withquery#someotherhash");
32 history.pushState(null, null, "some-other.html?withsomeotherquery#someotherhash");
33 history.pushState(null, null, "some-other.html?withsomeotherquery#somehash");
34 history.pushState(null, null, "some-other.html?withsomeotherquery");
35 history.pushState(null, null, "some-other.html?withsomeotherquery#");
36 history.pushState(null, null, "some-other.html?withsomeotherquery");
38 history.pushState("BufferEntry", "Last entry");
39 history.back();
42 function lastPathComponent(url)
44 return url.split('/').pop();
47 onpopstate = function(event)
49 log("State popped with event " + event.state + " (type " + typeof event.state + ") and last path component " + lastPathComponent(location.href));
50 if (event.state != "OriginalEntry")
51 setTimeout("history.back();", 0);
52 else if (window.testRunner)
53 testRunner.notifyDone();
56 onhashchange = function(event)
58 log("Hash change fired and last path component is " + lastPathComponent(event.newURL));
61 </script>
62 <body onload="runTest();">
63 <pre>
64 This test pushes a series of state objects with different URLs and fragment identifiers meant to test the hashChange event as states are popped.
65 </pre><br>
66 <pre id="logger"></pre>
67 </body>
68 </html>