Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / content-language-dynamically-removed.html
blobad5e60c67e9ce8f4a2a6db908360925c46846e84
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta id="target" http-equiv="content-language" content="zh">
5 <script src="../../resources/js-test.js"></script>
6 </head>
7 <body>
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 dynamically removing the meta element has no effect. This
11 expectation may change, see bug. The HTML 5 spec decrees that the
12 pragma-set default language be changed only when the meta element is
13 <a href="http://dev.w3.org/html5/spec/Overview.html#insert-an-element-into-a-document">inserted into the document</a>.
14 In Firefox and IE removing the meta element doesn't seem to affect the page,
15 but in Firefox the meta content-language displayed in "Page Information" is
16 affected.
17 </p>
18 <div id="console"></div>
19 <div id="x"></div>
20 <div id="y" lang="ar"></div>
21 <script>
22 function languageOfNode(id) {
23 var element = document.getElementById(id);
24 return window.getComputedStyle(element).webkitLocale;
26 shouldBeEqualToString("languageOfNode('x')", '"zh"');
27 shouldBeEqualToString("languageOfNode('y')", '"ar"');
29 var meta = document.getElementById("target");
30 var parent = meta.parentNode;
31 meta.parentNode.removeChild(meta);
32 shouldBeEqualToString("languageOfNode('x')", '"zh"');
33 shouldBeEqualToString("languageOfNode('y')", '"ar"');
34 </script>
35 </body>
36 </html>