4 <script src=
"../../resources/js-test.js"></script>
7 <p>Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=76701">bug
76701</a>:
8 map http-equiv content-language to -webkit-locale. This particular test tests
9 that a dynamically added content-language is processed. This expectation may
10 change, see bug. The HTML
5 spec decrees that http-equiv content-language be
12 <a href=
"http://dev.w3.org/html5/spec/Overview.html#insert-an-element-into-a-document">inserted into the document
</a>.
13 In Firefox and IE adding the meta element dynamically doesn't seem to affect
14 the page, but in Firefox the meta content-language displayed in
"Page
15 Information" is affected.
17 <div id=
"console"></div>
19 <div id=
"y" lang=
"ar"></div>
21 function languageOfNode(id
) {
22 var element
= document
.getElementById(id
);
23 return window
.getComputedStyle(element
).webkitLocale
;
25 shouldBeEqualToString("languageOfNode('x')", "auto");
26 shouldBeEqualToString("languageOfNode('y')", '"ar"');
28 var meta
= document
.createElement("meta");
29 meta
.httpEquiv
= "content-language";
31 document
.getElementById("head").appendChild(meta
);
32 shouldBeEqualToString("languageOfNode('x')", '"ja"');
33 shouldBeEqualToString("languageOfNode('y')", '"ar"');