Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / loader / resources / document-with-fragment-url-test.html
blob8f75b8aa6d92b58ab274cd9fd0d3ad7ad0c077c8
1 <script>
3 if (!sessionStorage.in_document_with_fragment_url_2)
4 sessionStorage.in_document_with_fragment_url_2 = true;
5 else
6 delete sessionStorage.in_document_with_fragment_url_2;
8 function documentURLHash()
10 var index = document.URL.lastIndexOf("#");
11 if (index == -1)
12 return "";
13 return document.URL.substring(index);
16 function hashChanged()
18 alert("hashChanged to " + documentURLHash() + " which is interesting because this particular test shouldn't generated a hashchange event");
21 function loaded()
23 if (sessionStorage.in_document_with_fragment_url_2) {
24 alert("First load complete. URL's current hash is " + documentURLHash());
25 var rect = document.getElementById("clickElement").getBoundingClientRect();
26 eventSender.mouseMoveTo(rect.left + rect.width / 2, rect.top + rect.height / 2);
27 eventSender.mouseDown();
28 eventSender.mouseUp();
29 } else {
30 alert("Second load complete. URL's current hash is " + documentURLHash());
31 if (window.testRunner)
32 testRunner.notifyDone();
36 </script>
37 <body onhashchange="hashChanged();" onload="loaded();">
38 <div id="foo"><a id="clickElement" href="">Click here to go to the top of the page</a></div><br>
39 This page should manually be loaded with "#foo" appended to the URL. When you then click the link, the page should navigate to the url without #foo.
40 </body>