blob: b4bd38e460afc06d3920569fe76285fc283b05e4 [file] [log] [blame]
rwlbuis@webkit.org8b2a8b42010-07-16 16:50:51 +00001<html xmlns="http://www.w3.org/1999/xhtml">
2 <head>
3 <style type="text/css">
4 span {background: white;display:none}
5 span:lang(de) {background: red}
6 </style>
7 <script>
8 function log(message) {
9 document.getElementById("console").innerHTML += message;
10 }
11
12 function test() {
rniwa@webkit.org38608af2012-06-19 07:23:13 +000013 if (window.testRunner)
14 testRunner.dumpAsText();
rwlbuis@webkit.org8b2a8b42010-07-16 16:50:51 +000015
16 var i = document.getElementById("emptyLang");
17 if (document.defaultView.getComputedStyle(i, null).getPropertyValue('background-color') != "rgb(255, 255, 255)") {
18 log("FAILURE");
19 return;
20 }
21 var i2 = document.getElementById("emptyXmlLang");
22 if (document.defaultView.getComputedStyle(i2, null).getPropertyValue('background-color') != "rgb(255, 255, 255)") {
23 log("FAILURE");
24 return;
25 }
26 var i3 = document.getElementById("noLang");
27 if (document.defaultView.getComputedStyle(i3, null).getPropertyValue('background-color') != "rgb(255, 0, 0)") {
28 log("FAILURE");
29 return;
30 }
31 log("SUCCESS");
32 }
33 </script>
34 </head>
35 <body onload="test()">
36 <p>Tests if empty language declarations are supported</p>
37 <p xml:lang="de">
38 <span lang="" id="emptyLang"/>
39 <span xml:lang="" id="emptyXmlLang"/>
40 <span id="noLang"/>
41 </p>
42 <div id="console"></div>
43 </body>
44</html>