blob: b4bd38e460afc06d3920569fe76285fc283b05e4 [file] [log] [blame]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
span {background: white;display:none}
span:lang(de) {background: red}
</style>
<script>
function log(message) {
document.getElementById("console").innerHTML += message;
}
function test() {
if (window.testRunner)
testRunner.dumpAsText();
var i = document.getElementById("emptyLang");
if (document.defaultView.getComputedStyle(i, null).getPropertyValue('background-color') != "rgb(255, 255, 255)") {
log("FAILURE");
return;
}
var i2 = document.getElementById("emptyXmlLang");
if (document.defaultView.getComputedStyle(i2, null).getPropertyValue('background-color') != "rgb(255, 255, 255)") {
log("FAILURE");
return;
}
var i3 = document.getElementById("noLang");
if (document.defaultView.getComputedStyle(i3, null).getPropertyValue('background-color') != "rgb(255, 0, 0)") {
log("FAILURE");
return;
}
log("SUCCESS");
}
</script>
</head>
<body onload="test()">
<p>Tests if empty language declarations are supported</p>
<p xml:lang="de">
<span lang="" id="emptyLang"/>
<span xml:lang="" id="emptyXmlLang"/>
<span id="noLang"/>
</p>
<div id="console"></div>
</body>
</html>