Regression(r188105): Seems to have caused crashes during PLT on some iPads
[WebKit-https.git] / LayoutTests / fast / css / lang-mapped-to-webkit-locale.xhtml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>mapping lang to -webkit-locale</title>
6 <script src="../../resources/js-test-pre.js"></script>
7 </head>
8 <body>
9 <p>This is a test for <a href="http://webkit.org/b/67586">bug 67586</a>. HTML attributes lang and xml:lang are mapped to '-webkit-locale' to use their value in font fallback.</p>
10 <div id="console"></div>
11 <div xml:lang="ja" lang="en" id="x1"><div id="x2"><div id="x3"></div></div></div>
12 <div lang="zh" id="l1"><div id="l2"><div id="l3"></div></div></div>
13 <div lang="ko" id="m1"><div lang="fr" xml:lang="fr" id="m2"><div id="m3"></div></div></div>
14 <div xml:lang="fr" id="n1"><div id="n2"><div lang="sv" id="n3"></div></div></div>
15 <div xml:lang="ja" id="p1"><div lang="" id="p2"></div></div>
16 <div lang="ja" id="q1">
17     <div lang="" id="q2"></div>
18     <div xml:lang="" id="q3"></div>
19     <div xml:lang="ar" id="q4"><div xml:lang="" id="q5"></div></div>
20     <div lang="  " id="q6"></div>
21     <div lang="auto" id="q7"></div>
22     <div lang="xyzzy" id="q8"></div>
23     <div lang="][;][[" id="q9"></div>
24 </div>
25 <script>
26 function languageOfNode(id) {
27     var element = document.getElementById(id);
28     return window.getComputedStyle(element).webkitLocale;
29 }
30 shouldBeEqualToString("languageOfNode('x1')", "ja");
31 shouldBeEqualToString("languageOfNode('x2')", "ja");
32 shouldBeEqualToString("languageOfNode('x3')", "ja");
33 shouldBeEqualToString("languageOfNode('l1')", "zh");
34 shouldBeEqualToString("languageOfNode('l2')", "zh");
35 shouldBeEqualToString("languageOfNode('l3')", "zh");
36 shouldBeEqualToString("languageOfNode('m1')", "ko");
37 shouldBeEqualToString("languageOfNode('m2')", "fr");
38 shouldBeEqualToString("languageOfNode('m3')", "fr");
39 shouldBeEqualToString("languageOfNode('n1')", "fr");
40 shouldBeEqualToString("languageOfNode('n2')", "fr");
41 shouldBeEqualToString("languageOfNode('n3')", "sv");
42 shouldBeEqualToString("languageOfNode('p1')", "ja");
43 shouldBeEqualToString("languageOfNode('p2')", "auto");
44 shouldBeEqualToString("languageOfNode('q1')", "ja");
45 shouldBeEqualToString("languageOfNode('q2')", "auto");
46 shouldBeEqualToString("languageOfNode('q3')", "auto");
47 shouldBeEqualToString("languageOfNode('q4')", "ar");
48 shouldBeEqualToString("languageOfNode('q5')", "auto");
49 shouldBeEqualToString("languageOfNode('q6')", "'  '");
50 shouldBeEqualToString("languageOfNode('q7')", "auto");
51 shouldBeEqualToString("languageOfNode('q8')", "xyzzy");
52 shouldBeEqualToString("languageOfNode('q9')", "'][;][['");
53
54 var successfullyParsed = true;
55 </script>
56 <script src="../../resources/js-test-post.js"></script>
57 </body>
58 </html>
59