tor-browser

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

usemap-casing.html (4414B)


      1 <!DOCTYPE html>
      2 <meta charset=utf-8>
      3 <title>object usemap case-sensitive</title>
      4 <link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
      5 <link rel="help" href="https://html.spec.whatwg.org/multipage/infrastructure.html#rules-for-parsing-a-hash-name-reference">
      6 <!-- See also: https://github.com/whatwg/html/issues/1666 -->
      7 
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 
     11 <object data="/images/threecolors.png" usemap="#sanityCheck" width="100" height="100"></object>
     12 <map name="sanityCheck"><area shape="rect" coords="0,0,100,100"></map>
     13 
     14 <object data="/images/threecolors.png" usemap="#sImPlE" width="100" height="100"></object>
     15 <map name="simple"><area shape="rect" coords="0,0,100,100"></map>
     16 <map name="SIMPLE"><area shape="rect" coords="0,0,100,100"></map>
     17 
     18 <object data="/images/threecolors.png" usemap="#paSSfield-killroyß" width="100" height="100"></object>
     19 <map name="passfield-killroyß"><area shape="rect" coords="0,0,100,100"></map>
     20 <map name="PASSFIELD-KILLROYß"><area shape="rect" coords="0,0,100,100"></map>
     21 <map name="paſſfield-killroyß"><area shape="rect" coords="0,0,100,100"></map>
     22 <map name="passfield-&#x212a;illroyß"><area shape="rect" coords="0,0,100,100"></map>
     23 <map name="paßfield-killroyß"><area shape="rect" coords="0,0,100,100"></map>
     24 <map name="paẞfield-killroyß"><area shape="rect" coords="0,0,100,100"></map>
     25 <map name="passfield-killroyẞ"><area shape="rect" coords="0,0,100,100"></map>
     26 <map name="passfield-killroyß"><area shape="rect" coords="0,0,100,100"></map>
     27 <map name="passfıeld-killroyß"><area shape="rect" coords="0,0,100,100"></map>
     28 <map name="passfİeld-killroyß"><area shape="rect" coords="0,0,100,100"></map>
     29 
     30 <object data="/images/threecolors.png" usemap="#глупый" width="100" height="100"></object>
     31 <map name="глупы&#x438;&#x306;"><area shape="rect" coords="0,0,100,100"></map>
     32 <map name="ГЛУПЫЙ"><area shape="rect" coords="0,0,100,100"></map>
     33 <map name="ГЛУПЫ&#x418;&#x306;"><area shape="rect" coords="0,0,100,100"></map>
     34 
     35 <object data="/images/threecolors.png" usemap="#åωk" width="100" height="100"></object>
     36 <map name="ÅΩK"><area shape="rect" coords="0,0,100,100"></map>
     37 <map name="&#x212b;ωk"><area shape="rect" coords="0,0,100,100"></map>
     38 <map name="å&#x2126;k"><area shape="rect" coords="0,0,100,100"></map>
     39 <map name="åω&#x212a;"><area shape="rect" coords="0,0,100,100"></map>
     40 
     41 <object data="/images/threecolors.png" usemap="#blah1" width="100" height="100"></object>
     42 <map name="blah&#x2460;"><area shape="rect" coords="0,0,100,100"></map>
     43 <map name="bl&#x24b6;h1"><area shape="rect" coords="0,0,100,100"></map>
     44 <map name="bl&#x24d0;h1"><area shape="rect" coords="0,0,100,100"></map>
     45 
     46 <object data="/images/threecolors.png" usemap="#t&Eacute;dz5アパートFi" width="100" height="100"></object>
     47 <map name="T&Eacute;DZ5アパートFi"><area shape="rect" coords="0,0,100,100"></map>
     48 <map name="T&eacute;&#x01F1;&#x2075;アパートFi"><area shape="rect" coords="0,0,100,100"></map>
     49 <map name="t&Eacute;dz5&#x3300;Fi"><area shape="rect" coords="0,0,100,100"></map>
     50 <map name="t&Eacute;dz5&#x30A2;&#x30CF;&#x309A;&#x30FC;&#x30C8;Fi"><area shape="rect" coords="0,0,100,100"></map>
     51 <map name="T&Eacute;DZ⁵アパートFi"><area shape="rect" coords="0,0,100,100"></map>
     52 <map name="T&Eacute;DZ5アパートfi"><area shape="rect" coords="0,0,100,100"></map>
     53 
     54 <object data="/images/threecolors.png" usemap="#ΣΣ" width="100" height="100"></object>
     55 <map name="σς"><area shape="rect" coords="0,0,100,100"></map>
     56 
     57 <div id="log"></div>
     58 
     59 <script>
     60 "use strict";
     61 setup({ explicit_done: true });
     62 
     63 onload = () => {
     64  const objects = Array.from(document.querySelectorAll(`object`));
     65 
     66  for (let object of objects) {
     67    test(() => {
     68      const objectRect = object.getBoundingClientRect();
     69      const x = objectRect.left + objectRect.width / 2;
     70      const y = objectRect.top + objectRect.height / 2;
     71      const element = document.elementFromPoint(x, y);
     72 
     73      const name = element.parentElement.getAttribute("name");
     74      const messageSuffix = name ? `; used <map> with name "${name}"` : "";
     75 
     76      assert_equals(element, object, "The element retrieved must be the object, not an area" + messageSuffix);
     77    }, `Object with usemap of ${object.useMap} should not match any of the areas (it does not support usemap)`);
     78  }
     79 
     80  done();
     81 };
     82 </script>