tor-browser

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

test-002.html (1140B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <title>Shadow DOM Test: A_08_01_02</title>
      5 <link rel="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
      6 <link rel="help" href="http://www.w3.org/TR/2013/WD-shadow-dom-20130514/#inert-html-elements">
      7 <meta name="assert" content="HTML Elements in shadow trees: link element must behave as inert not as part of the document tree">
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <script src="../../../../html/resources/common.js"></script>
     11 <script src="../../../resources/shadow-dom-utils.js"></script>
     12 </head>
     13 <body>
     14 <div id="log"></div>
     15 <script>
     16 test(unit(function (ctx) {
     17 
     18    var d = newRenderedHTMLDocument(ctx);
     19 
     20    var link = d.createElement('link');
     21    link.setAttribute('rel', 'stylesheet');
     22 
     23    //create Shadow root
     24    var root = d.createElement('div');
     25    d.body.appendChild(root);
     26    var s = root.attachShadow({mode: 'open'});
     27 
     28    s.appendChild(link);
     29 
     30    assert_equals(d.styleSheets.length, 0, 'link element must behave as inert not as part of the document tree');
     31 
     32 
     33 }), 'A_08_01_02_T01');
     34 </script>
     35 </body>
     36 </html>