chromium/third_party/blink/web_tests/fast/css/content-language-comma-separated-list.html

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-language" content="ja, 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 a comma-separated list of languages is ignored. This expectation may
change, see bug.  The HTML5 spec says that content-language should not have
multiple languages, and decrees that a content-language containing a comma be
ignored; this <a
href="http://lists.w3.org/Archives/Public/public-html/2011Mar/0398.html">position has
been upheld</a> following significant debate. Firefox accepts a
comma-separated list and a CSS :lang selector for any language in the list is
matched. It's unclear what IE does.
</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')", "auto");
shouldBeEqualToString("languageOfNode('y')", '"ar"');
</script>
</body>
</html>