Regression(r188105): Seems to have caused crashes during PLT on some iPads
[WebKit-https.git] / LayoutTests / fast / css / content-language-with-whitespace.html
1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="content-language" content="  
5                 ja-JP            zh_CN  
6
7                 ">
8 <script src="../../resources/js-test-pre.js"></script>
9 </head>
10 <body>
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
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
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
17 whitespace.  It's unclear what IE does.
18 </p>
19 <div id="console"></div>
20 <div id="x"></div>
21 <div id="y" lang="ar"></div>
22 <script>
23 function languageOfNode(id) {
24     var element = document.getElementById(id);
25     return window.getComputedStyle(element).webkitLocale;
26 }
27 shouldBeEqualToString("languageOfNode('x')", "ja_JP");
28 shouldBeEqualToString("languageOfNode('y')", "ar");
29 </script>
30 <script src="../../resources/js-test-post.js"></script>
31 </body>
32 </html>