Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / loader / stateobjects / state-url-sets-links-visited.html
blobae98f5750accb802391957eb394fde4155db1c16
1 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 <script>
5 jsTestIsAsync = true;
7 if (window.testRunner)
8 testRunner.keepWebHistory();
10 function loaded()
12 description('Verify that changes done by history.replaceState and history.pushState update visitedLinks.');
14 window.history.replaceState(null, "Title", "replacedURL.html");
15 window.history.pushState(null, "Title", "pushedURL.html");
17 if (window.internals) {
18 style1 = internals.computedStyleIncludingVisitedInfo(document.getElementById('link1'));
19 style2 = internals.computedStyleIncludingVisitedInfo(document.getElementById('link2'));
21 // The style is not necessarily updated synchronously in response to history.replaceState and history.pushState.
22 shouldBecomeEqualToString("style1.color", "rgb(255, 165, 0)", function() {
23 shouldBecomeEqualToString("style2.color", "rgb(255, 165, 0)", finishJSTest);
24 });
28 </script>
30 <style>
31 :link { color: rgb(0, 255, 0); background-color: white }
32 :visited { color: rgb(255, 165, 0); background-color: black }
33 </style>
34 </head>
35 <body onload="loaded();">
36 <p id=description></p>
37 <a id="link1" href="replacedURL.html">This link should get colored visited as a result of replaceState() setting it as the current URL</a><br>
38 <a id="link2" href="pushedURL.html">This link should get colored visited as a result of pushState() adding it to the forward list</a><br>
39 If you're running in a browser, the link should be orange-on-black and you should see "replacedURL.html" in your global history.<br>
40 If you're running in DRT, the test will also append "PASS" or "FAIL".<br>
41 <div id=console></div>
42 </body>
43 </html>