tor-browser

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

missing-right-token.html (1129B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <meta id="expected" charset="utf-8">
      5  <title>Selectors: attribute selectors with missing right token</title>
      6  <link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
      7  <link rel="help" href="https://drafts.csswg.org/selectors-4/#attribute-selectors">
      8  <link rel="help" href="https://drafts.csswg.org/css-syntax/#rule-defs">
      9  <meta name="assert" content="Checks attribute selectors with missing right token are matched.">
     10  <script src="/resources/testharness.js"></script>
     11  <script src="/resources/testharnessreport.js"></script>
     12 </head>
     13 <body>
     14 
     15 
     16  <div id="container">
     17    <span></span>
     18    <span class="cls"></span>
     19  </div>
     20 
     21  <script>
     22    test(() => {
     23      assert_equals(document.querySelector('meta[charset="utf-8"'), expected);
     24      assert_equals(document.querySelector('meta[charset="utf-8'), expected);
     25 
     26      assert_equals(container.querySelectorAll('span:not([class]').length, 1);
     27      assert_equals(container.querySelectorAll('span:not([class').length, 1);
     28    }, "attribute selectors with missing right tokens succeed");
     29  </script>
     30 </body>
     31 </html>