tor-browser

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

idlharness.html (1037B)


      1 <!doctype html>
      2 <title>CSS Anchor Positioning IDL tests</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#interfaces">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/resources/WebIDLParser.js"></script>
      7 <script src="/resources/idlharness.js"></script>
      8 
      9 <style>
     10 @position-fallback --fallback {
     11  @try {}
     12  @try {}
     13 }
     14 </style>
     15 
     16 <script>
     17  'use strict';
     18  idl_test(
     19    ['css-anchor-position'],
     20    ['cssom'],
     21    idl_array => {
     22      try {
     23        self.positionFallback = document.styleSheets[0].cssRules.item(0);
     24        self.try1 = self.positionFallback.cssRules.item(0);
     25        self.try2 = self.positionFallback.cssRules.item(1);
     26      } catch (e) {
     27        // Will be surfaced when any rule is undefined below.
     28      }
     29 
     30      idl_array.add_objects({
     31        CSSPositionFallbackRule: ['positionFallback'],
     32        CSSTryRule: ['try1', 'try2'],
     33        CSSStyleDeclaration: ['try1.style', 'try2.style'],
     34      });
     35    }
     36  );
     37 </script>