blob: e24112a9edd1903a34048520eaca04c7dc840b3f [file] [log] [blame]
<style>
#a { content: attr(b); }
#c { content: attr("x"); }
#d { content: attr(0); }
#e { content: attr(0.0); }
#f { content: attr(0%); }
#g { content: attr(0px); }
#h { content: attr(); }
#i { content: attr(+0); }
#j { content: attr(-k); }
#l { content: attr(0m); }
#n { content: attr(-0p); }
#q { content: attr(url(http://webkit.org)); }
#r { content: attr(U+0020); }
#s { content: attr(U+0020-00FF); }
#t { content: attr(#123456); }
#u { content: attr(#); }
</style>
<p id="message">TEST DID NOT COMPLETE</p>
<p>Rules from the stylesheet:</p>
<pre id="result"></pre>
<p>Expected result:</p>
<pre id="expected">#a { content: attr(b); }
#c { }
#d { }
#e { }
#f { }
#g { }
#h { }
#i { }
#j { content: attr(-k); }
#l { }
#n { }
#q { }
#r { }
#s { }
#t { }
#u { }
</pre>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var rules = document.styleSheets[0].cssRules;
var text = "";
for (var i = 0; i < rules.length; i++) {
text += rules.item(i).cssText;
text += "\n";
}
document.getElementById("result").appendChild(document.createTextNode(text));
if (document.getElementById("result").firstChild.data === document.getElementById("expected").firstChild.data)
document.getElementById("message").firstChild.data = "SUCCESS";
else
document.getElementById("message").firstChild.data = "FAILURE";
</script>