diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-cascade/idlharness.html | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-cascade/idlharness.html')
-rw-r--r-- | testing/web-platform/tests/css/css-cascade/idlharness.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-cascade/idlharness.html b/testing/web-platform/tests/css/css-cascade/idlharness.html new file mode 100644 index 0000000000..9bde23b946 --- /dev/null +++ b/testing/web-platform/tests/css/css-cascade/idlharness.html @@ -0,0 +1,36 @@ +<!doctype html> +<title>CSS Cascade Layers IDL tests</title> +<link rel="help" href="https://drafts.csswg.org/css-cascade-5/#layer-apis"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/WebIDLParser.js"></script> +<script src="/resources/idlharness.js"></script> + +<style> +@layer bar, baz; +@import url('data:text/css,') layer(qux); +@layer foo { } +</style> + +<script> + 'use strict'; + idl_test( + ['css-cascade'], + ['cssom'], + idl_array => { + try { + self.statement = document.styleSheets[0].cssRules.item(0); + self.layeredImport = document.styleSheets[0].cssRules.item(1); + self.block = document.styleSheets[0].cssRules.item(2); + } catch (e) { + // Will be surfaced when any rule is undefined below. + } + + idl_array.add_objects({ + CSSLayerBlockRule: ['block'], + CSSLayerStatementRule: ['statement'], + CSSImportRule: ['layeredImport'] + }); + } + ); +</script> |