tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

the-lang-attribute-006.html (1463B)


      1 <!DOCTYPE html>
      2 <html   >
      3 <head>
      4 <meta charset="utf-8"/>
      5 <meta http-equiv="Content-Language" content="ko" >
      6 <title>HTTP header and meta element</title>
      7 <link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
      8 <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-lang-and-xml:lang-attributes'>
      9 <script src="/resources/testharness.js"></script>
     10 <script src="/resources/testharnessreport.js"></script>
     11 <meta name='flags' content='http dom'>
     12 <style type='text/css'>
     13    #colonlangcontroltest { color: red; font-weight: bold; width: 400px; }
     14    #colonlangcontroltest:lang(xx) { display:none; }
     15 .test div { width: 50px; }
     16 #box:lang(ko) { width: 100px; }
     17 </style>
     18 </head>
     19 <body>
     20 
     21 
     22 
     23 <div class="test"><div id="box">&#xA0;</div></div>
     24 <p lang='xx' id='colonlangcontroltest'>This test failed because it relies on :lang for results, but :lang is not supported by this browser.</p>
     25 
     26 
     27 <!--Notes:
     28 
     29 This test uses :lang to detect whether the language has been set. If :lang is not supported, a message will appear and the test will fail.
     30 
     31 -->
     32 <script>
     33 test(function() {
     34 assert_equals(document.getElementById('colonlangcontroltest').offsetWidth, 0)
     35 assert_equals(document.getElementById('box').offsetWidth, 100);
     36 }, "If there is a conflict between the language declarations in the HTTP header and the Content-Language meta element, the UA will recognize the language declared in the meta element.");
     37 </script>
     38 
     39 <div id='log'></div>
     40 
     41 </body>
     42 </html>