OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html xmlns="http://www.w3.org/1999/xhtml"> | 2 <html xmlns="http://www.w3.org/1999/xhtml"> |
3 <head> | 3 <head> |
4 <link rel="stylesheet" href="../js/resources/js-test-style.css"> | 4 <link rel="stylesheet" href="../js/resources/js-test-style.css"> |
5 <script src="../js/resources/js-test-pre.js"></script> | 5 <script src="../js/resources/js-test-pre.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=76701">bug 76701</a
>: | 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 | 9 map HTTP-EQUIV content-language to -webkit-locale. This particular test tests |
10 that a content-language is used even if it appears at the end of the document. | 10 that a content-language is used even if it appears at the end of the document. |
11 This expectation may change, see bug. According to the HTML 5 spec, a meta | 11 This expectation may change, see bug. According to the HTML 5 spec, a meta |
12 element should be processed when it is inserted into the document, regardless | 12 element should be processed when it is inserted into the document, regardless |
13 of where. IE and Firefox also seem to process the content-language at the end | 13 of where. IE and Firefox also seem to process the content-language at the end |
14 of the document. | 14 of the document. |
15 </p> | 15 </p> |
16 <div id="console"></div> | 16 <div id="console"></div> |
17 <div id="x"></div> | 17 <div id="x"></div> |
18 <div id="y" lang="ar"></div> | 18 <div id="y" lang="ar"></div> |
19 <script> | 19 <script> |
20 function languageOfNode(id) { | 20 function languageOfNode(id) { |
21 var element = document.getElementById(id); | 21 var element = document.getElementById(id); |
22 return window.getComputedStyle(element).webkitLocale; | 22 return window.getComputedStyle(element).webkitLocale; |
23 } | 23 } |
24 shouldBeEqualToString("languageOfNode('x')", "ja-JP"); | 24 shouldBeEqualToString("languageOfNode('x')", "ja-JP"); |
25 shouldBeEqualToString("languageOfNode('y')", "ar"); | 25 shouldBeEqualToString("languageOfNode('y')", "ar"); |
26 </script> | 26 </script> |
27 <script src="../js/resources/js-test-post.js"></script> | |
28 <meta http-equiv="content-language" content="ja-JP"> | 27 <meta http-equiv="content-language" content="ja-JP"> |
29 </body> | 28 </body> |
30 </html> | 29 </html> |
OLD | NEW |