tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / css / attr-parsing.html
1 <style>
2 #a { content: attr(b); }
3 #c { content: attr("x"); }
4 #d { content: attr(0); }
5 #e { content: attr(0.0); }
6 #f { content: attr(0%); }
7 #g { content: attr(0px); }
8 #h { content: attr(); }
9 #i { content: attr(+0); }
10 #j { content: attr(-k); }
11 #l { content: attr(0m); }
12 #n { content: attr(-0p); }
13 #q { content: attr(url(http://webkit.org)); }
14 #r { content: attr(U+0020); }
15 #s { content: attr(U+0020-00FF); }
16 #t { content: attr(#123456); }
17 #u { content: attr(#); }
18 </style>
19
20 <p id="message">TEST DID NOT COMPLETE</p>
21
22 <p>Rules from the stylesheet:</p>
23
24 <pre id="result"></pre>
25
26 <p>Expected result:</p>
27
28 <pre id="expected">#a { content: attr(b); }
29 #c { }
30 #d { }
31 #e { }
32 #f { }
33 #g { }
34 #h { }
35 #i { }
36 #j { }
37 #l { }
38 #n { }
39 #q { }
40 #r { }
41 #s { }
42 #t { }
43 #u { }
44 </pre>
45
46 <script>
47
48 if (window.layoutTestController)
49     layoutTestController.dumpAsText();
50
51 var rules = document.styleSheets[0].cssRules;
52 var text = "";
53 for (var i = 0; i < rules.length; i++) {
54     text += rules.item(i).cssText;
55     text += "\n";
56 }
57
58 document.getElementById("result").appendChild(document.createTextNode(text));
59
60 if (document.getElementById("result").firstChild.data === document.getElementById("expected").firstChild.data)
61     document.getElementById("message").firstChild.data = "SUCCESS";
62 else
63     document.getElementById("message").firstChild.data = "FAILURE";
64
65 </script>