4 <meta http-equiv=
"content-language" content=
"ja, zh_CN">
5 <script src=
"../../resources/js-test.js"></script>
8 <p>Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=76701">bug
76701</a>:
9 map HTTP-EQUIV content-language to -webkit-locale. This particular test tests
10 that a comma-separated list of languages is ignored. This expectation may
11 change, see bug. The HTML5 spec says that content-language should not have
12 multiple languages, and decrees that a content-language containing a comma be
14 href=
"http://lists.w3.org/Archives/Public/public-html/2011Mar/0398.html">position has
15 been upheld
</a> following significant debate. Firefox accepts a
16 comma-separated list and a CSS :lang selector for any language in the list is
17 matched. It's unclear what IE does.
19 <div id=
"console"></div>
21 <div id=
"y" lang=
"ar"></div>
23 function languageOfNode(id
) {
24 var element
= document
.getElementById(id
);
25 return window
.getComputedStyle(element
).webkitLocale
;
27 shouldBeEqualToString("languageOfNode('x')", "auto");
28 shouldBeEqualToString("languageOfNode('y')", '"ar"');