2 <html xmlns=
"http://www.w3.org/1999/xhtml">
4 <meta http-equiv=
"content-language" content=
"
8 <script src=
"../../resources/js-test.js"></script>
11 <p>Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=76701">bug
76701</a>:
12 map HTTP-EQUIV content-language to -webkit-locale. This particular test tests
13 that the the pragma-set default language is set to the first sequence of
14 non-whitespace characters of the content-language content. This expectation may
15 change, see bug. This expectation is as per the HTML
5 spec. It appears that
16 Firefox does not exactly do this, but trims the leading and trailing
17 whitespace. 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')", '"ja_JP"');
28 shouldBeEqualToString("languageOfNode('y')", '"ar"');