| <!DOCTYPE html> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="content-language" content=" |
| ja-JP zh_CN |
| |
| "> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=76701">bug 76701</a>: |
| map HTTP-EQUIV content-language to -webkit-locale. This particular test tests |
| that the the pragma-set default language is set to the first sequence of |
| non-whitespace characters of the content-language content. This expectation may |
| change, see bug. This expectation is as per the HTML 5 spec. It appears that |
| Firefox does not exactly do this, but trims the leading and trailing |
| whitespace. It's unclear what IE does. |
| </p> |
| <div id="console"></div> |
| <div id="x"></div> |
| <div id="y" lang="ar"></div> |
| <script> |
| function languageOfNode(id) { |
| var element = document.getElementById(id); |
| return window.getComputedStyle(element).webkitLocale; |
| } |
| shouldBeEqualToString("languageOfNode('x')", "ja_JP"); |
| shouldBeEqualToString("languageOfNode('y')", "ar"); |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |