Bug 1468837 [wpt PR 9905] - Update css-masking IDL file, a=testonly
authorLuke Bjerring <lukebjerring@users.noreply.github.com>
Mon, 02 Jul 2018 17:30:37 +0000
changeset 814260 d2ff3a30a46c763cb3db0680bdad2530cd863063
parent 814259 3fa1ad011dd59eb388b8cc6b58a8504c0ba69a2f
child 814261 d431e041255fe531956c954974a95b02b9cce3b1
push id115144
push userbmo:gl@mozilla.com
push dateWed, 04 Jul 2018 20:51:10 +0000
reviewerstestonly
bugs1468837
milestone63.0a1
Bug 1468837 [wpt PR 9905] - Update css-masking IDL file, a=testonly Automatic update from web-platform-testsAdd css-masking IDL file with test (#9905) -- wpt-commits: 82a7c8930aae4df57dbd7895b8d3038c095f0790 wpt-pr: 9905
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/css-masking/idlharness.html
testing/web-platform/tests/interfaces/css-masking.idl
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -288094,16 +288094,21 @@
      {}
     ]
    ],
    "interfaces/css-fonts.idl": [
     [
      {}
     ]
    ],
+   "interfaces/css-masking.idl": [
+    [
+     {}
+    ]
+   ],
    "interfaces/css-typed-om.idl": [
     [
      {}
     ]
    ],
    "interfaces/cssom-view.idl": [
     [
      {}
@@ -318402,16 +318407,22 @@
     ]
    ],
    "css/css-logical/logicalprops-quirklength.html": [
     [
      "/css/css-logical/logicalprops-quirklength.html",
      {}
     ]
    ],
+   "css/css-masking/idlharness.html": [
+    [
+     "/css/css-masking/idlharness.html",
+     {}
+    ]
+   ],
    "css/css-masking/parsing/clip-invalid.html": [
     [
      "/css/css-masking/parsing/clip-invalid.html",
      {}
     ]
    ],
    "css/css-masking/parsing/clip-path-invalid.html": [
     [
@@ -519457,16 +519468,20 @@
   "css/css-masking/clip/reference/clip-rect-top-ref.html": [
    "700d9d78427c2f60e62859073e8144b4fc096686",
    "support"
   ],
   "css/css-masking/clip/reference/clip-vertical-stripe-ref.html": [
    "8853e79d6e9c3d262ebb38c569e97932f3b27cd4",
    "support"
   ],
+  "css/css-masking/idlharness.html": [
+   "527fb8b8884e00d898c047f092221af56211bbcd",
+   "testharness"
+  ],
   "css/css-masking/parsing/clip-invalid.html": [
    "81cd98170ea4abe216c0cf155aa493c58079bd53",
    "testharness"
   ],
   "css/css-masking/parsing/clip-path-invalid.html": [
    "791ea3c564f629ed8d679499f5483e122ad9f602",
    "testharness"
   ],
@@ -588613,16 +588628,20 @@
   "interfaces/css-font-loading.idl": [
    "a0d53cc4e88f38cce9fd45759963e5da9a6f3dc3",
    "support"
   ],
   "interfaces/css-fonts.idl": [
    "ff2d83e9468c743993c9b4a1ecf3fab09684dc16",
    "support"
   ],
+  "interfaces/css-masking.idl": [
+   "5f4ed3d8922e30ab3ddb714d185c6e6f794e5a29",
+   "support"
+  ],
   "interfaces/css-typed-om.idl": [
    "36526913c07a04f9fd329a5650430db82407d766",
    "support"
   ],
   "interfaces/cssom-view.idl": [
    "3f575def818098d376ddf069673692530fcf8896",
    "support"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-masking/idlharness.html
@@ -0,0 +1,36 @@
+<!doctype html>
+<title>css-masking IDL tests</title>
+<link rel="help" href="https://drafts.fxtf.org/css-masking-1/">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/WebIDLParser.js"></script>
+<script src="/resources/idlharness.js"></script>
+<script>
+  "use strict";
+
+  promise_test(async () => {
+    const idl_array = new IdlArray();
+    const idl = await fetch("/interfaces/css-masking.idl").then(r => r.text());
+    const dom = await fetch("/interfaces/dom.idl").then(r => r.text());
+    idl_array.add_idls(idl);
+    idl_array.add_untested_idls('interface SVGElement : Element {};');
+    idl_array.add_untested_idls('interface SVGAnimatedEnumeration {};');
+    idl_array.add_untested_idls('interface SVGAnimatedLength {};');
+    idl_array.add_untested_idls('interface SVGAnimatedTransformList {};');
+    idl_array.add_dependency_idls(dom); // Needed for Element
+    idl_array.add_objects({
+      SVGClipPathElement: [document.querySelector('#clip1')],
+      SVGMaskElement: [document.querySelector('#mask1')],
+    });
+    idl_array.test();
+  }, "Test IDL implementation of css-masking");
+</script>
+
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:html="http://www.w3.org/1999/xhtml">
+  <clipPath id="clip1">
+    <rect x="50" y="50" width="100" height="100" />
+  </clipPath>
+  <mask id="mask1" x="0" y="0" width="1" height="1" maskContentUnits="objectBoundingBox">
+    <rect x="0" y="0" width="1" height="1" fill="white" />
+  </mask>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/css-masking.idl
@@ -0,0 +1,18 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content of this file was automatically extracted from the
+// "CSS Masking Module Level 1" spec.
+// See: https://drafts.fxtf.org/css-masking-1/
+
+interface SVGClipPathElement : SVGElement {
+  readonly attribute SVGAnimatedEnumeration clipPathUnits;
+  readonly attribute SVGAnimatedTransformList transform;
+};
+
+interface SVGMaskElement : SVGElement {
+  readonly attribute SVGAnimatedEnumeration maskUnits;
+  readonly attribute SVGAnimatedEnumeration maskContentUnits;
+  readonly attribute SVGAnimatedLength x;
+  readonly attribute SVGAnimatedLength y;
+  readonly attribute SVGAnimatedLength width;
+  readonly attribute SVGAnimatedLength height;
+};