tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / history / self-is-visited.html
1 <html>
2 <head>
3 <script>
4 if (window.layoutTestController) {
5     window.layoutTestController.keepWebHistory();
6     window.layoutTestController.dumpAsText();
7 }
8
9 function compareStyles()
10 {
11     if (window.layoutTestController) {
12         var firstStyle = window.layoutTestController.computedStyleIncludingVisitedInfo(document.getElementById('one'));
13         var secondStyle = window.layoutTestController.computedStyleIncludingVisitedInfo(document.getElementById('two'));
14         if (firstStyle.color == secondStyle.color || firstStyle.backgroundColor == secondStyle.backgroundColor) {
15             document.getElementById('result').innerHTML = 'FAIL';
16             return;
17         }
18     }
19     
20     var firstStyle = window.getComputedStyle(document.getElementById('one'), "");
21     var secondStyle = window.getComputedStyle(document.getElementById('two'), "");
22     if (firstStyle.color != secondStyle.color || firstStyle.backgroundColor != secondStyle.backgroundColor) {
23         document.getElementById('result').innerHTML = 'FAIL';
24         return;
25     }
26 }
27 </script>
28 <style>
29 :link { color: green; background-color: white }
30 :visited { color: orange; background-color: black }
31 </style>
32 </head>
33 <body onload="compareStyles()">
34 <iframe src="resources/dummy.html" style="display:none"></iframe>
35
36 <p>
37 These two links should be different colors (green and orange):
38 </p>
39 <p>
40 <a href="http://madeup.site.com" id="one">One</a> 
41 <a href="resources/dummy.html" id="two">Two</a><br>
42 </p>
43 <p id=result>
44 PASS
45 </p>
46 </body>
47 </html>