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 <meta http-equiv="content-language" content=" | 4 <meta http-equiv="content-language" content=" |
5 ja-JP zh_CN | 5 ja-JP zh_CN |
6 | 6 |
7 "> | 7 "> |
8 <script src="../../resources/js-test.js"></script> | 8 <script src="../../resources/js-test.js"></script> |
9 </head> | 9 </head> |
10 <body> | 10 <body> |
11 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=76701">bug 76701</a
>: | 11 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=76701">bug 76701</a
>: |
12 map HTTP-EQUIV content-language to -webkit-locale. This particular test tests | 12 map HTTP-EQUIV content-language to -webkit-locale. This particular test tests |
13 that the the pragma-set default language is set to the first sequence of | 13 that the the pragma-set default language is set to the first sequence of |
14 non-whitespace characters of the content-language content. This expectation may | 14 non-whitespace characters of the content-language content. This expectation may |
15 change, see bug. This expectation is as per the HTML 5 spec. It appears that | 15 change, see bug. This expectation is as per the HTML 5 spec. It appears that |
16 Firefox does not exactly do this, but trims the leading and trailing | 16 Firefox does not exactly do this, but trims the leading and trailing |
17 whitespace. It's unclear what IE does. | 17 whitespace. It's unclear what IE does. |
18 </p> | 18 </p> |
19 <div id="console"></div> | 19 <div id="console"></div> |
20 <div id="x"></div> | 20 <div id="x"></div> |
21 <div id="y" lang="ar"></div> | 21 <div id="y" lang="ar"></div> |
22 <script> | 22 <script> |
23 function languageOfNode(id) { | 23 function languageOfNode(id) { |
24 var element = document.getElementById(id); | 24 var element = document.getElementById(id); |
25 return window.getComputedStyle(element).webkitLocale; | 25 return window.getComputedStyle(element).webkitLocale; |
26 } | 26 } |
27 shouldBeEqualToString("languageOfNode('x')", "ja_JP"); | 27 shouldBeEqualToString("languageOfNode('x')", "'ja_JP'"); |
28 shouldBeEqualToString("languageOfNode('y')", "ar"); | 28 shouldBeEqualToString("languageOfNode('y')", "'ar'"); |
29 </script> | 29 </script> |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |