tor-browser

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

the-lang-attribute-012.html (1792B)


      1 <!DOCTYPE html>
      2 <html   >
      3 <head>
      4 <meta charset="utf-8"/>
      5 <meta http-equiv="Content-Language" content="ko,zh,ja" >
      6 <title>Multiple languages in Content-Language 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/#pragma-directives'>
      9 <script src="/resources/testharness.js"></script>
     10 <script src="/resources/testharnessreport.js"></script>
     11 <meta name='flags' content='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 
     17 #box:lang(ko) { width: 100px; }
     18 #box:lang(zh) { width: 100px; }
     19 #box:lang(ja) { width: 100px; }
     20 
     21    /* styling for debugging related notes */
     22     .notes span:lang(ko) { background-color: #0000FF; color: white; padding: 0 5px; }
     23     .notes span:lang(zh) { background-color: #0000FF; color: white; padding: 0 5px; }
     24     .notes span:lang(ja) { background-color: #0000FF; color: white; padding: 0 5px; }
     25 
     26 </style>
     27 </head>
     28 <body>
     29 
     30 
     31 
     32 <div class="test"><div id="box">&#xA0;</div></div>
     33 <p lang='xx' id='colonlangcontroltest'>This test failed because it relies on :lang for results, but :lang is not supported by this browser.</p>
     34 
     35 
     36 <!--Notes:
     37 
     38 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.
     39 
     40 -->
     41 <script>
     42 test(function() {
     43 assert_equals(document.getElementById('colonlangcontroltest').offsetWidth, 0)
     44 assert_equals(document.getElementById('box').offsetWidth, 50);
     45 }, "The UA will not recognize a language declaration in the Content-Language meta element when more than one language is declared.");
     46 </script>
     47 
     48 <div id='log'></div>
     49 
     50 </body>
     51 </html>