Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / content-language-with-whitespace.html
blob5f70efe7de699861b2300fb32d70f06f6d70063f
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
7 ">
8 <script src="../../resources/js-test.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;
27 shouldBeEqualToString("languageOfNode('x')", '"ja_JP"');
28 shouldBeEqualToString("languageOfNode('y')", '"ar"');
29 </script>
30 </body>
31 </html>