| 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"> | |
| 5 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../js/resources/js-test-pre.js"></script> |
| 6 </head> | 5 </head> |
| 7 <body> | 6 <body> |
| 8 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=76701">bug 76701</a
>: | 7 <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 | 8 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. | 9 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 | 10 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 | 11 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 | 12 of where. IE and Firefox also seem to process the content-language at the end |
| 14 of the document. | 13 of the document. |
| 15 </p> | 14 </p> |
| 16 <div id="console"></div> | 15 <div id="console"></div> |
| 17 <div id="x"></div> | 16 <div id="x"></div> |
| 18 <div id="y" lang="ar"></div> | 17 <div id="y" lang="ar"></div> |
| 19 <script> | 18 <script> |
| 20 function languageOfNode(id) { | 19 function languageOfNode(id) { |
| 21 var element = document.getElementById(id); | 20 var element = document.getElementById(id); |
| 22 return window.getComputedStyle(element).webkitLocale; | 21 return window.getComputedStyle(element).webkitLocale; |
| 23 } | 22 } |
| 24 shouldBeEqualToString("languageOfNode('x')", "ja-JP"); | 23 shouldBeEqualToString("languageOfNode('x')", "ja-JP"); |
| 25 shouldBeEqualToString("languageOfNode('y')", "ar"); | 24 shouldBeEqualToString("languageOfNode('y')", "ar"); |
| 26 </script> | 25 </script> |
| 27 <meta http-equiv="content-language" content="ja-JP"> | 26 <meta http-equiv="content-language" content="ja-JP"> |
| 28 </body> | 27 </body> |
| 29 </html> | 28 </html> |
| OLD | NEW |