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(#); }
20 <p id=
"message">TEST DID NOT COMPLETE
</p>
22 <p>Rules from the stylesheet:
</p>
24 <pre id=
"result"></pre>
26 <p>Expected result:
</p>
28 <pre id=
"expected">#a { content: attr(b); }
48 if (window
.testRunner
)
49 testRunner
.dumpAsText();
51 var rules
= document
.styleSheets
[0].cssRules
;
53 for (var i
= 0; i
< rules
.length
; i
++) {
54 text
+= rules
.item(i
).cssText
;
58 document
.getElementById("result").appendChild(document
.createTextNode(text
));
60 if (document
.getElementById("result").firstChild
.data
=== document
.getElementById("expected").firstChild
.data
)
61 document
.getElementById("message").firstChild
.data
= "SUCCESS";
63 document
.getElementById("message").firstChild
.data
= "FAILURE";