Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / loading / state-object-security-exception.html
blob7ba103e2a668a19f519822c7912b7f6d238e2ccb
1 <html>
2 <head>
3 <script>
5 if (window.testRunner) {
6 testRunner.clearBackForwardList();
7 testRunner.dumpAsText();
10 function log(txt)
12 document.getElementById("logger").innerText += txt + "\n";
15 function tryURL(url)
17 try {
18 history.pushState(null, null, url);
19 log("Trying to pushState() with url " + url + " succeeded, but should've failed.");
20 } catch(e) {
21 log("Trying to pushState() with url " + url + " failed with exception " + e);
23 log("History length is " + history.length);
25 try {
26 history.replaceState(null, null, url);
27 log("Trying to replaceState() with url " + url + " succeeded, but should've failed.");
28 } catch(e) {
29 log("Trying to replaceState() with url " + url + " failed with exception " + e);
31 log("History length is " + history.length);
34 var URLsToTry = new Array(
35 "http://localhost/test.html",
36 "http://localhost:8001/test.html",
37 "http://www.webkit.org/test.html",
38 "http://www.webkit.org/",
39 "ftp://www.webkit.org/",
40 "file://anyfile.html/"
43 function runTest()
45 for (n in URLsToTry)
46 tryURL(URLsToTry[n]);
49 </script>
50 <body onload="runTest();">
51 <pre>
52 This test makes sure that calls to pushState() and replaceState() with URLs that violate the security origin check fail as expected.
53 </pre><br>
54 <pre id="logger"></pre>
55 </body>
56 </html>