blob: 148c5f8b68bc5201f2939629c1315597107676c5 [file] [log] [blame]
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-language" content=" ">
<meta http-equiv="content-language" content="ja_JP">
<meta http-equiv="content-language" content="zh_CN">
<script src="../../resources/js-test.js"></script>
</head>
<body>
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=76701">bug 76701</a>:
map HTTP-EQUIV content-language to -webkit-locale. This particular test tests
that in the event of multiple content-languages, the final content-language is
used as the pragma-set default language. This expectation may change, see bug.
The HTML5 spec decrees that the first successfully processed one be used.
Firefox and IE seem to use the final one.
</p>
<div id="console"></div>
<div id="x"></div>
<div id="y" lang="ar"></div>
<script>
function languageOfNode(id) {
var element = document.getElementById(id);
return window.getComputedStyle(element).webkitLocale;
}
shouldBeEqualToString("languageOfNode('x')", '"zh_CN"');
shouldBeEqualToString("languageOfNode('y')", '"ar"');
</script>
</body>
</html>