aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/wpt/metadata/MANIFEST.json1416
-rw-r--r--tests/wpt/metadata/css/CSS2/abspos/remove-block-between-inline-and-abspos.html.ini2
-rw-r--r--tests/wpt/metadata/css/CSS2/floats/remove-block-between-inline-and-float.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-fonts/variations/font-weight-matching.html.ini3
-rw-r--r--tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini2
-rw-r--r--tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini4
-rw-r--r--tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch.html.ini4
-rw-r--r--tests/wpt/metadata/fetch/cross-origin-resource-policy/iframe-loads.html.ini4
-rw-r--r--tests/wpt/metadata/fetch/cross-origin-resource-policy/image-loads.html.ini19
-rw-r--r--tests/wpt/metadata/fetch/cross-origin-resource-policy/scheme-restriction.any.js.ini9
-rw-r--r--tests/wpt/metadata/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js.ini4
-rw-r--r--tests/wpt/metadata/fetch/cross-origin-resource-policy/script-loads.html.ini19
-rw-r--r--tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini3
-rw-r--r--tests/wpt/metadata/websockets/opening-handshake/003-sets-origin.worker.js.ini3
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html.ini (renamed from tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html.ini)2
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-creation.html.ini (renamed from tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html.ini)2
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html.ini2
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html.ini5
-rw-r--r--tests/wpt/web-platform-tests/common/canvas-tests.js10
-rw-r--r--tests/wpt/web-platform-tests/common/get-host-info.sub.js2
-rw-r--r--tests/wpt/web-platform-tests/console/console-counting-label-conversion.any.js55
-rw-r--r--tests/wpt/web-platform-tests/console/console-label-conversion.any.js29
-rw-r--r--tests/wpt/web-platform-tests/console/console-time-label-conversion.any.js46
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-doesnt-send-reports-without-violation.https.sub.html.sub.headers2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-only-sends-reports-on-violation.https.sub.html.sub.headers2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-1.https.sub.html.sub.headers2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-2.https.sub.html.sub.headers2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-sends-reports-on-violation.https.sub.html.sub.headers2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-works-on-frame-src.https.sub.html.sub.headers2
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/abspos/remove-block-between-inline-and-abspos.html22
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/remove-block-between-inline-and-float.html22
-rw-r--r--tests/wpt/web-platform-tests/css/css-pseudo/first-letter-block-to-inline-ref.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-pseudo/first-letter-block-to-inline.html17
-rw-r--r--tests/wpt/web-platform-tests/css/cssom-view/cssom-view-window-screen-interface.html9
-rw-r--r--tests/wpt/web-platform-tests/css/cssom-view/media-query-list-interface.xht70
-rw-r--r--tests/wpt/web-platform-tests/css/cssom-view/window-interface.xht82
-rw-r--r--tests/wpt/web-platform-tests/dom/nodes/selectors.js6
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.html10
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.js14
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-iframe.html67
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/fetch.html83
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/iframe-loads.html46
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/image-loads.html53
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/green.pngbin0 -> 87 bytes
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/hello.py6
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/iframe.py5
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/iframeFetch.html19
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/image.py20
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/redirect.py6
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/script.py6
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.any.js7
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js13
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/script-loads.html51
-rw-r--r--tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/syntax.any.js18
-rw-r--r--tests/wpt/web-platform-tests/input-device-capabilities/META.yml3
-rw-r--r--tests/wpt/web-platform-tests/input-device-capabilities/OWNERS2
-rw-r--r--tests/wpt/web-platform-tests/interfaces/pointerevents-extension.idl8
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/green-100x50.pngbin0 -> 205 bytes
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.default.html24
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.default.worker.js20
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.invalid.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.invalid.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.valid.html37
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.valid.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.default.html24
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.default.worker.js20
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.invalid.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.invalid.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.valid.html40
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.valid.worker.js36
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.center.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.center.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.ltr.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.ltr.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.rtl.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.rtl.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.left.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.left.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.right.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.right.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.ltr.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.ltr.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.rtl.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.rtl.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.bottom.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.bottom.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.hanging.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.hanging.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.ideographic.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.ideographic.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.middle.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.middle.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.top.html38
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.top.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.basic-manual.html29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.basic-manual.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.basic.pngbin0 -> 1137 bytes
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.html29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.html35
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.html35
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html28
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.worker.js24
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large.pngbin0 -> 1137 bytes
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.html29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.html29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.html29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.html29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.rtl.pngbin0 -> 1137 bytes
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.unaffected.html39
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.unaffected.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.html35
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.notinpage.html35
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.notinpage.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.repeat.html36
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.repeat.worker.js32
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.html33
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.basic.html33
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.basic.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.end.html34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.end.worker.js30
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.html33
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.other.html33
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.other.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.space.html33
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.space.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.start.html33
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.start.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.html30
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.worker.js26
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.basic.pngbin0 -> 1634 bytes
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.unaffected.html40
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.unaffected.worker.js36
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.default.html24
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.default.worker.js20
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.basic.html28
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.basic.worker.js24
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.complex.html25
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.complex.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.invalid.html53
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.invalid.worker.js49
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.system.html25
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.system.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.tiny.html25
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.tiny.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.basic.html33
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.basic.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.empty.html28
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.empty.worker.js24
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.space.html34
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.space.worker.js30
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/tools/name2dir.yaml1
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/tools/templates.yaml1
-rw-r--r--tests/wpt/web-platform-tests/offscreen-canvas/tools/tests2d.yaml987
-rw-r--r--tests/wpt/web-platform-tests/permissions/META.yml4
-rw-r--r--tests/wpt/web-platform-tests/permissions/OWNERS3
-rw-r--r--tests/wpt/web-platform-tests/picture-in-picture/picture-in-picture-window.html28
-rw-r--r--tests/wpt/web-platform-tests/pointerevents/extension/idlharness.html15
-rw-r--r--tests/wpt/web-platform-tests/resources/idlharness.js5
-rw-r--r--tests/wpt/web-platform-tests/resources/test/tests/functional/idlharness/IdlInterface/test_to_json_operation.html2
-rw-r--r--tests/wpt/web-platform-tests/resources/test/tests/unit/basic.html7
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/.gitmodules3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/CHANGELOG.md8
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/README.md79
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/checker/index.html55
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/lib/webidl2.js1062
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/lib/writer.js120
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/package-lock.json226
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/package.json7
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/enum-empty.widl1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/enum-wo-comma.widl1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/extattr-empty-ids.widl2
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/id-underscored-number.widl1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/implements_and_includes_ws.widl4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/namespace-readwrite.widl3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableobjects.widl5
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/promise-nullable.widl4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/record-single.widl3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-negative-infinity.widl3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-variadic.widl3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/union-dangling-or.widl1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/union-one.widl1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/union-zero.widl1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/unknown-generic.widl3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/enum-empty.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/enum-wo-comma.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/extattr-empty-ids.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/id-underscored-number.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/implements_and_includes_ws.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/namespace-readwrite.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableobjects.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/promise-nullable.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/readonly-iterable.json2
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/record-key.json2
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/record-single.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/spaced-negative-infinity.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/spaced-variadic.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/stringconstants.json2
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/typedef-nested.json2
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/union-dangling-or.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/union-one.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/union-zero.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/unknown-generic.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/attributes.widl4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/generic.widl4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/identifier-qualified-names.widl7
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/inherits-getter.widl8
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/linecomment.widl2
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/promise-void.widl3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/record.widl3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/sequence.widl5
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/allowany.json31
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/attributes.json23
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/callback.json45
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/constants.json48
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/constructor.json28
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/dictionary-inherits.json26
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/dictionary.json51
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/enum.json31
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/equivalent-decl.json112
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/extended-attributes.json38
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/generic.json57
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/getter-setter.json39
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/identifier-qualified-names.json59
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/implements.json34
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/indexed-properties.json99
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/inherits-getter.json42
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/interface-inherits.json15
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/iterable.json13
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/legacyiterable.json4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/linecomment.json14
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/maplike.json18
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/mixin.json10
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/namedconstructor.json8
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/namespace.json47
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nointerfaceobject.json13
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nullable.json11
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nullableobjects.json26
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/operation-optional-arg.json42
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/overloading.json110
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/overridebuiltins.json18
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/partial-interface.json10
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/primitives.json85
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/promise-void.json36
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/prototyperoot.json5
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/putforwards.json10
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/record.json91
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/reg-operations.json49
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/replaceable.json10
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/sequence.json68
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/setlike.json9
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/static.json49
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-attribute.json10
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-custom.json20
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier.json5
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/treatasnull.json23
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/treatasundefined.json23
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typedef-union.json20
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typedef.json60
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typesuffixes.json17
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/uniontype.json43
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/variadic-operations.json31
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/opt/linecomment.json3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/syntax/opt/typedef-nested.json3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/.gitignore3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/LICENSE202
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/Makefile158
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/README.md40
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/doc/htmltodtd.xsl28
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/doc/widlproc.html1124
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/Makefile79
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/README41
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/bondi.widl227
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/filesystem.widl1038
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/spectowidl.xsl27
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/widlhtml.css100
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/comment.c1827
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/comment.h25
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/entities.h271
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/lex.c560
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/lex.h141
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/main.c63
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/misc.c119
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/misc.h31
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/node.c331
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/node.h65
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/os.h31
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/parse.c1414
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/parse.h19
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/process.c319
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/process.h27
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/widlprocxmltohtml.xsl828
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/Makefile91
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/enum.txt1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/module.txt1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/nonnullableany.txt1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/nonnullableobjects.txt1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/scopedname.txt1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/sequenceAsAttribute.txt1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/stringconstants.idl1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/enum.widl1
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/module.widl25
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/nonnullableany.widl3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/nonnullableobjects.widl5
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/raises.widl18
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/scopedname.widl2
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/sequenceAsAttribute.widl3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/special-omittable.widl8
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/stringconstants.idl3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/allowany.widl6
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/array.widl5
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/attributes.widl14
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/callback.widl5
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/caller.widl5
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/constants.widl18
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/constructor.widl9
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/dictionary-inherits.widl9
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/dictionary.widl11
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/documentation-dos.widl33
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/documentation.widl34
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/enum.widl8
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/equivalent-decl.widl18
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/exception-inheritance.widl7
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/exception.widl8
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/getter-setter.widl7
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/identifier-qualified-names.widl44
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/implements.widl14
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/indexed-properties.widl12
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/inherits-getter.widl16
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/interface-inherits.widl12
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/iterator.widl35
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/namedconstructor.widl6
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/nointerfaceobject.widl5
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/nullable.widl9
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/nullableobjects.widl13
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/operation-optional-arg.widl4
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/overloading.widl20
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/overridebuiltins.widl6
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/partial-interface.widl7
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/primitives.widl19
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/prototyperoot.widl5
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/putforwards.widl5
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/reg-operations.widl17
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/replaceable.widl5
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/sequence.widl7
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/serializer.widl64
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/static.widl11
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/stringifier-attribute.widl6
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/stringifier-custom.widl9
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/stringifier.widl8
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/treatasnull.widl7
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/treatasundefined.widl7
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/typedef.widl22
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/typesuffixes.widl3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/uniontype.widl3
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/variadic-operations.widl7
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/allowany.widlprocxml44
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/array.widlprocxml27
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/attributes.widlprocxml38
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/callback.widlprocxml32
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/caller.widlprocxml21
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/constants.widlprocxml85
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/constructor.widlprocxml51
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/dictionary-inherits.widlprocxml44
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/dictionary.widlprocxml47
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/documentation-dos.widlprocxml59
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/documentation.widlprocxml61
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/enum.widlprocxml52
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/equivalent-decl.widlprocxml111
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/exception-inheritance.widlprocxml31
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/exception.widlprocxml23
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/getter-setter.widlprocxml43
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/identifier-qualified-names.widlprocxml107
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/implements.widlprocxml51
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/indexed-properties.widlprocxml92
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/inherits-getter.widlprocxml44
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/interface-inherits.widlprocxml48
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/iterator.widlprocxml132
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/module.widlprocxml99
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/namedconstructor.widlprocxml30
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/namespaceobject.widlprocxml60
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/nointerfaceobject.widlprocxml28
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/nullable.widlprocxml29
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/nullableobjects.widlprocxml46
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/operation-optional-arg.widlprocxml30
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/overloading.widlprocxml113
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/overridebuiltins.widlprocxml34
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/partial-interface.widlprocxml29
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/primitives.widlprocxml112
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/prototyperoot.widlprocxml23
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/putforwards.widlprocxml27
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/reg-operations.widlprocxml70
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/replaceable.widlprocxml28
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/sequence.widlprocxml32
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/serializer.widlprocxml296
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/special-omittable.widlprocxml37
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/static.widlprocxml58
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/stringifier-attribute.widlprocxml29
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/stringifier-custom.widlprocxml44
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/stringifier.widlprocxml29
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/treatasnull.widlprocxml40
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/treatasundefined.widlprocxml40
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/typedef.widlprocxml100
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/typesuffixes.widlprocxml25
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/uniontype.widlprocxml26
-rw-r--r--tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/variadic-operations.widlprocxml40
-rwxr-xr-xtests/wpt/web-platform-tests/tools/ci/ci_built_diff.sh4
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/browser.py45
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/run.py9
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py3
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/fennec.py254
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py4
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py7
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html6
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html6
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/automation-rate-testing.js46
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-constant-source.html63
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner.html20
-rw-r--r--tests/wpt/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker.js1
-rw-r--r--tests/wpt/web-platform-tests/webusb/resources/usb-allowed-by-feature-policy-worker.js14
-rw-r--r--tests/wpt/web-platform-tests/webusb/resources/usb-disabled-by-feature-policy-worker.js17
-rw-r--r--tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html29
-rw-r--r--tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy-attribute.https.sub.html30
-rw-r--r--tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy.https.sub.html25
-rw-r--r--tests/wpt/web-platform-tests/webusb/usb-disabled-by-feature-policy.https.sub.html25
-rw-r--r--tests/wpt/web-platform-tests/workers/modules/dedicated-worker-import-referrer.html2
439 files changed, 8589 insertions, 14784 deletions
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json
index 1e2073e06a0..285b25ed602 100644
--- a/tests/wpt/metadata/MANIFEST.json
+++ b/tests/wpt/metadata/MANIFEST.json
@@ -12967,6 +12967,66 @@
{}
]
],
+ "offscreen-canvas/text/2d.text.draw.fill.basic-manual.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.basic-manual.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.basic-manual.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.basic-manual.worker.js",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.worker.js",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.rtl-manual.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.rtl-manual.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.worker.js",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.kern.consistent-manual.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.kern.consistent-manual.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.worker.js",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.stroke.basic-manual.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.stroke.basic-manual.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.worker.js",
+ {}
+ ]
+ ],
"orientation-event/free-fall-manual.html": [
[
"/orientation-event/free-fall-manual.html",
@@ -19395,6 +19455,18 @@
{}
]
],
+ "css/CSS2/abspos/remove-block-between-inline-and-abspos.html": [
+ [
+ "/css/CSS2/abspos/remove-block-between-inline-and-abspos.html",
+ [
+ [
+ "/css/reference/ref-filled-green-200px-square.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/CSS2/abspos/table-caption-is-containing-block-001.html": [
[
"/css/CSS2/abspos/table-caption-is-containing-block-001.html",
@@ -48135,6 +48207,18 @@
{}
]
],
+ "css/CSS2/floats/remove-block-between-inline-and-float.html": [
+ [
+ "/css/CSS2/floats/remove-block-between-inline-and-float.html",
+ [
+ [
+ "/css/reference/ref-filled-green-200px-square.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/CSS2/floats/zero-width-floats.html": [
[
"/css/CSS2/floats/zero-width-floats.html",
@@ -127131,6 +127215,18 @@
{}
]
],
+ "css/css-pseudo/first-letter-block-to-inline.html": [
+ [
+ "/css/css-pseudo/first-letter-block-to-inline.html",
+ [
+ [
+ "/css/css-pseudo/first-letter-block-to-inline-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-pseudo/first-line-and-placeholder.html": [
[
"/css/css-pseudo/first-line-and-placeholder.html",
@@ -253440,6 +253536,11 @@
{}
]
],
+ "css/css-pseudo/first-letter-block-to-inline-ref.html": [
+ [
+ {}
+ ]
+ ],
"css/css-pseudo/first-line-and-placeholder-ref.html": [
[
{}
@@ -274145,6 +274246,16 @@
{}
]
],
+ "feature-policy/resources/feature-policy-usb-worker.html": [
+ [
+ {}
+ ]
+ ],
+ "feature-policy/resources/feature-policy-usb-worker.js": [
+ [
+ {}
+ ]
+ ],
"feature-policy/resources/feature-policy-usb.html": [
[
{}
@@ -274670,6 +274781,41 @@
{}
]
],
+ "fetch/cross-origin-resource-policy/resources/green.png": [
+ [
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/resources/hello.py": [
+ [
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/resources/iframe.py": [
+ [
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/resources/iframeFetch.html": [
+ [
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/resources/image.py": [
+ [
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/resources/redirect.py": [
+ [
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/resources/script.py": [
+ [
+ {}
+ ]
+ ],
"fetch/data-urls/README.md": [
[
{}
@@ -288215,7 +288361,7 @@
{}
]
],
- "input-device-capabilities/OWNERS": [
+ "input-device-capabilities/META.yml": [
[
{}
]
@@ -288485,6 +288631,11 @@
{}
]
],
+ "interfaces/pointerevents-extension.idl": [
+ [
+ {}
+ ]
+ ],
"interfaces/pointerevents.idl": [
[
{}
@@ -290190,6 +290341,31 @@
{}
]
],
+ "offscreen-canvas/green-100x50.png": [
+ [
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.basic.png": [
+ [
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.large.png": [
+ [
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.rtl.png": [
+ [
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.stroke.basic.png": [
+ [
+ {}
+ ]
+ ],
"offscreen-canvas/tools/META.yml": [
[
{}
@@ -290525,7 +290701,7 @@
{}
]
],
- "permissions/OWNERS": [
+ "permissions/META.yml": [
[
{}
]
@@ -299190,6 +299366,16 @@
{}
]
],
+ "webusb/resources/usb-allowed-by-feature-policy-worker.js": [
+ [
+ {}
+ ]
+ ],
+ "webusb/resources/usb-disabled-by-feature-policy-worker.js": [
+ [
+ {}
+ ]
+ ],
"webusb/resources/usb-helpers.js": [
[
{}
@@ -312434,16 +312620,6 @@
{}
]
],
- "console/console-counting-label-conversion.any.js": [
- [
- "/console/console-counting-label-conversion.any.html",
- {}
- ],
- [
- "/console/console-counting-label-conversion.any.worker.html",
- {}
- ]
- ],
"console/console-is-a-namespace.any.js": [
[
"/console/console-is-a-namespace.any.html",
@@ -312454,23 +312630,23 @@
{}
]
],
- "console/console-tests-historical.any.js": [
+ "console/console-label-conversion.any.js": [
[
- "/console/console-tests-historical.any.html",
+ "/console/console-label-conversion.any.html",
{}
],
[
- "/console/console-tests-historical.any.worker.html",
+ "/console/console-label-conversion.any.worker.html",
{}
]
],
- "console/console-time-label-conversion.any.js": [
+ "console/console-tests-historical.any.js": [
[
- "/console/console-time-label-conversion.any.html",
+ "/console/console-tests-historical.any.html",
{}
],
[
- "/console/console-time-label-conversion.any.worker.html",
+ "/console/console-tests-historical.any.worker.html",
{}
]
],
@@ -324846,12 +325022,6 @@
{}
]
],
- "css/cssom-view/media-query-list-interface.xht": [
- [
- "/css/cssom-view/media-query-list-interface.xht",
- {}
- ]
- ],
"css/cssom-view/mouseEvent.html": [
[
"/css/cssom-view/mouseEvent.html",
@@ -324954,12 +325124,6 @@
{}
]
],
- "css/cssom-view/window-interface.xht": [
- [
- "/css/cssom-view/window-interface.xht",
- {}
- ]
- ],
"css/cssom-view/window-screen-height-immutable.html": [
[
"/css/cssom-view/window-screen-height-immutable.html",
@@ -338618,6 +338782,62 @@
{}
]
],
+ "fetch/cross-origin-resource-policy/fetch-in-iframe.html": [
+ [
+ "/fetch/cross-origin-resource-policy/fetch-in-iframe.html",
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/fetch.html": [
+ [
+ "/fetch/cross-origin-resource-policy/fetch.html",
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/iframe-loads.html": [
+ [
+ "/fetch/cross-origin-resource-policy/iframe-loads.html",
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/image-loads.html": [
+ [
+ "/fetch/cross-origin-resource-policy/image-loads.html",
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/scheme-restriction.any.js": [
+ [
+ "/fetch/cross-origin-resource-policy/scheme-restriction.any.html",
+ {}
+ ],
+ [
+ "/fetch/cross-origin-resource-policy/scheme-restriction.any.worker.html",
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/scheme-restriction.https.window.js": [
+ [
+ "/fetch/cross-origin-resource-policy/scheme-restriction.https.window.html",
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/script-loads.html": [
+ [
+ "/fetch/cross-origin-resource-policy/script-loads.html",
+ {}
+ ]
+ ],
+ "fetch/cross-origin-resource-policy/syntax.any.js": [
+ [
+ "/fetch/cross-origin-resource-policy/syntax.any.html",
+ {}
+ ],
+ [
+ "/fetch/cross-origin-resource-policy/syntax.any.worker.html",
+ {}
+ ]
+ ],
"fetch/data-urls/base64.any.js": [
[
"/fetch/data-urls/base64.any.html",
@@ -362590,6 +362810,546 @@
{}
]
],
+ "offscreen-canvas/text/2d.text.align.default.html": [
+ [
+ "/offscreen-canvas/text/2d.text.align.default.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.align.default.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.align.default.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.align.invalid.html": [
+ [
+ "/offscreen-canvas/text/2d.text.align.invalid.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.align.invalid.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.align.invalid.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.align.valid.html": [
+ [
+ "/offscreen-canvas/text/2d.text.align.valid.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.align.valid.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.align.valid.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.baseline.default.html": [
+ [
+ "/offscreen-canvas/text/2d.text.baseline.default.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.baseline.default.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.baseline.default.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.baseline.invalid.html": [
+ [
+ "/offscreen-canvas/text/2d.text.baseline.invalid.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.baseline.invalid.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.baseline.invalid.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.baseline.valid.html": [
+ [
+ "/offscreen-canvas/text/2d.text.baseline.valid.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.baseline.valid.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.baseline.valid.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.center.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.center.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.center.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.center.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.end.ltr.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.end.ltr.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.end.ltr.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.end.ltr.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.end.rtl.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.end.rtl.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.end.rtl.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.end.rtl.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.left.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.left.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.left.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.left.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.right.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.right.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.right.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.right.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.start.ltr.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.start.ltr.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.start.ltr.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.start.ltr.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.start.rtl.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.start.rtl.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.start.rtl.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.align.start.rtl.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.alphabetic.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.alphabetic.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.bottom.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.baseline.bottom.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.bottom.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.baseline.bottom.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.hanging.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.baseline.hanging.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.hanging.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.baseline.hanging.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.ideographic.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.baseline.ideographic.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.ideographic.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.baseline.ideographic.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.middle.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.baseline.middle.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.middle.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.baseline.middle.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.top.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.baseline.top.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.top.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.baseline.top.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.unaffected.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.unaffected.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.unaffected.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fill.unaffected.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fontface.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fontface.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fontface.notinpage.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fontface.notinpage.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fontface.notinpage.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fontface.notinpage.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fontface.repeat.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fontface.repeat.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fontface.repeat.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fontface.repeat.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.fontface.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.fontface.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.basic.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.space.basic.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.basic.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.space.basic.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.end.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.space.collapse.end.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.end.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.space.collapse.end.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.other.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.space.collapse.other.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.other.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.space.collapse.other.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.space.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.space.collapse.space.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.space.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.space.collapse.space.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.start.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.space.collapse.start.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.start.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.space.collapse.start.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.stroke.unaffected.html": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.stroke.unaffected.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.draw.stroke.unaffected.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.draw.stroke.unaffected.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.font.default.html": [
+ [
+ "/offscreen-canvas/text/2d.text.font.default.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.font.default.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.font.default.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.basic.html": [
+ [
+ "/offscreen-canvas/text/2d.text.font.parse.basic.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.basic.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.font.parse.basic.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.complex.html": [
+ [
+ "/offscreen-canvas/text/2d.text.font.parse.complex.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.complex.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.font.parse.complex.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.invalid.html": [
+ [
+ "/offscreen-canvas/text/2d.text.font.parse.invalid.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.invalid.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.font.parse.invalid.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.system.html": [
+ [
+ "/offscreen-canvas/text/2d.text.font.parse.system.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.system.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.font.parse.system.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.tiny.html": [
+ [
+ "/offscreen-canvas/text/2d.text.font.parse.tiny.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.tiny.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.font.parse.tiny.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.measure.width.basic.html": [
+ [
+ "/offscreen-canvas/text/2d.text.measure.width.basic.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.measure.width.basic.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.measure.width.basic.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.measure.width.empty.html": [
+ [
+ "/offscreen-canvas/text/2d.text.measure.width.empty.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.measure.width.empty.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.measure.width.empty.worker.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.measure.width.space.html": [
+ [
+ "/offscreen-canvas/text/2d.text.measure.width.space.html",
+ {}
+ ]
+ ],
+ "offscreen-canvas/text/2d.text.measure.width.space.worker.js": [
+ [
+ "/offscreen-canvas/text/2d.text.measure.width.space.worker.html",
+ {}
+ ]
+ ],
"offscreen-canvas/the-canvas-state/2d.state.saverestore.bitmap.html": [
[
"/offscreen-canvas/the-canvas-state/2d.state.saverestore.bitmap.html",
@@ -417920,7 +418680,7 @@
"support"
],
"common/canvas-tests.js": [
- "329e3ae1cfde2ee0525302e6a3260faed3885f28",
+ "c31f3a58eda8896f273650420c9b0e2ae1bc65ed",
"support"
],
"common/canvas-tests.js.headers": [
@@ -417956,7 +418716,7 @@
"support"
],
"common/get-host-info.sub.js": [
- "4175d0fff3555e25a646b0673a082fefdc113fe0",
+ "1eae4a7e29b73d60b9832ef5d8c808f6fd10db5c",
"support"
],
"common/get-host-info.sub.js.headers": [
@@ -435715,14 +436475,14 @@
"587de5bb8dcb002025244e8058b52d4ba0b1bdd3",
"manual"
],
- "console/console-counting-label-conversion.any.js": [
- "a48d28ca0a1d6c5c50dc5d29521563a44beb6590",
- "testharness"
- ],
"console/console-is-a-namespace.any.js": [
"9ad845184a6dd40b1ab64992ca514dbf4736c930",
"testharness"
],
+ "console/console-label-conversion.any.js": [
+ "66b683e11b294518c3057ff371fe7f8a0b00dafb",
+ "testharness"
+ ],
"console/console-number-format-specifiers-symbol-manual.html": [
"a0b0c97ec5312027ff0152536458071254235d01",
"manual"
@@ -435735,10 +436495,6 @@
"ee18f8a672534b478ca15990026638a73588fcf4",
"testharness"
],
- "console/console-time-label-conversion.any.js": [
- "5e2ca9e9dca88c6de32408b461f3f4c54c586031",
- "testharness"
- ],
"content-security-policy/META.yml": [
"5819f0331b11875efb46ad15e02d28f59770cc9d",
"support"
@@ -436880,7 +437636,7 @@
"testharness"
],
"content-security-policy/reporting-api/reporting-api-doesnt-send-reports-without-violation.https.sub.html.sub.headers": [
- "65081c84f2f9a69ae0d9407e7ce7ec1d2aff9e2f",
+ "e02c27c5d75e315e787ca0923ccdf9b8bfdc95a7",
"support"
],
"content-security-policy/reporting-api/reporting-api-report-only-sends-reports-on-violation.https.sub.html": [
@@ -436888,7 +437644,7 @@
"testharness"
],
"content-security-policy/reporting-api/reporting-api-report-only-sends-reports-on-violation.https.sub.html.sub.headers": [
- "6f50f9873944cd8a050eee7ff86c1c5c79f837a6",
+ "21a26cf60992dea5dc9b8f6d134559a32a69efbc",
"support"
],
"content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-1.https.sub.html": [
@@ -436896,7 +437652,7 @@
"testharness"
],
"content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-1.https.sub.html.sub.headers": [
- "098e7ecf9e4b22af2526b97bc21837630074ab52",
+ "4bddc6a5f54193b57e91b0ed981797849cd72b62",
"support"
],
"content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-2.https.sub.html": [
@@ -436904,7 +437660,7 @@
"testharness"
],
"content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-2.https.sub.html.sub.headers": [
- "80b6e9e46d32fdf4add93ff104d4d8de2f15b292",
+ "694161355a5dd2e24ca94f98ca98ce073cd82537",
"support"
],
"content-security-policy/reporting-api/reporting-api-sends-reports-on-violation.https.sub.html": [
@@ -436912,7 +437668,7 @@
"testharness"
],
"content-security-policy/reporting-api/reporting-api-sends-reports-on-violation.https.sub.html.sub.headers": [
- "2fac5fdd70da5df3b6778dde3865c7d348541f63",
+ "766bb03f5fc72d58cb67309cbbb18a8da74b6aec",
"support"
],
"content-security-policy/reporting-api/reporting-api-works-on-frame-src.https.sub.html": [
@@ -436920,7 +437676,7 @@
"testharness"
],
"content-security-policy/reporting-api/reporting-api-works-on-frame-src.https.sub.html.sub.headers": [
- "bbd38e08374180c8c9469d1b62f75b864c77862f",
+ "b590a452008e8c32c2758dd36be9fa46c5cbc37f",
"support"
],
"content-security-policy/reporting/multiple-report-policies.html": [
@@ -440199,6 +440955,10 @@
"44f94feef0ef941a7ac86e1c466dc75e729ba647",
"reftest"
],
+ "css/CSS2/abspos/remove-block-between-inline-and-abspos.html": [
+ "79f37a2375f2fbcb133b3926cd7c77a6696eb4aa",
+ "reftest"
+ ],
"css/CSS2/abspos/table-caption-is-containing-block-001.html": [
"d416e3d830bf172326723ed469d6a5f02de7e9e1",
"reftest"
@@ -458567,6 +459327,10 @@
"357427f1d71d7137c1ba4c386ae25acc7712928e",
"reftest"
],
+ "css/CSS2/floats/remove-block-between-inline-and-float.html": [
+ "3d605f7fcda537953ed52f99772c88bad49e1062",
+ "reftest"
+ ],
"css/CSS2/floats/zero-space-between-floats-001.html": [
"59cd6c4ac06a611570a3ec21bac7289345b184f7",
"testharness"
@@ -523251,6 +524015,14 @@
"5a7a51802925bda01fbb62c8635a0e3205683e51",
"reftest"
],
+ "css/css-pseudo/first-letter-block-to-inline-ref.html": [
+ "1c8ca71127b09dc729377b71b102bed8095aa249",
+ "support"
+ ],
+ "css/css-pseudo/first-letter-block-to-inline.html": [
+ "7bc7db3195b26fb32ca3b01a5834a90af66987a8",
+ "reftest"
+ ],
"css/css-pseudo/first-letter-property-whitelist.html": [
"38d0844f6ef10d214b7d23af45d02c8093d9c00e",
"testharness"
@@ -549520,7 +550292,7 @@
"testharness"
],
"css/cssom-view/cssom-view-window-screen-interface.html": [
- "ed3dc5f811d0e0920689b051da26c6b3c34b9a54",
+ "f3d03ad7297974965a5cd584df941b095f9cddeb",
"testharness"
],
"css/cssom-view/dom-element-scroll.html": [
@@ -549619,10 +550391,6 @@
"ec5b756e980676c8707bcb2d7d91b7c977158e0d",
"testharness"
],
- "css/cssom-view/media-query-list-interface.xht": [
- "62f0fdd48d1a4194d439ee22829b3346bed9a154",
- "testharness"
- ],
"css/cssom-view/mouseEvent.html": [
"d64c45f021a5c6db7b65575288a91e28a25a2982",
"testharness"
@@ -549907,10 +550675,6 @@
"7f3440e65abbe692e3c28f1f1d04671054ecc815",
"testharness"
],
- "css/cssom-view/window-interface.xht": [
- "b51ac4828be890736faee8ce42fd95c4bbb844ef",
- "testharness"
- ],
"css/cssom-view/window-screen-height-immutable.html": [
"3193a200624217a260e17660006e9ce31a52814c",
"testharness"
@@ -564192,7 +564956,7 @@
"testharness"
],
"dom/nodes/selectors.js": [
- "d23a6e88e198f4f0f4495d6fd2775408d0635371",
+ "be39e37d8486cc0a31bed9e1f1ee1176fa83b5d0",
"support"
],
"dom/ranges/Range-attributes.html": [
@@ -567691,6 +568455,14 @@
"057973ef7f86c3628948c54d5697fb565e6d0a96",
"support"
],
+ "feature-policy/resources/feature-policy-usb-worker.html": [
+ "66c45d83b3ff35d9fb02c52a138b60d393ac42f1",
+ "support"
+ ],
+ "feature-policy/resources/feature-policy-usb-worker.js": [
+ "06ff374448653063d8dfe1b0bc9d26cc4ac1baa0",
+ "support"
+ ],
"feature-policy/resources/feature-policy-usb.html": [
"96ae900bcde19a4ffcab30f1d01b393e07936e99",
"support"
@@ -568687,6 +569459,66 @@
"465d933f4e52ef4e5a4bd0de40873410195843cd",
"testharness"
],
+ "fetch/cross-origin-resource-policy/fetch-in-iframe.html": [
+ "4d836bed1e90a2d14b1651c0f3229b3f3d0b6b91",
+ "testharness"
+ ],
+ "fetch/cross-origin-resource-policy/fetch.html": [
+ "6a881615d9df0750b640298725be56e60cd5804c",
+ "testharness"
+ ],
+ "fetch/cross-origin-resource-policy/iframe-loads.html": [
+ "8429fdb1695fc73c853dc37bf29544b8139d5396",
+ "testharness"
+ ],
+ "fetch/cross-origin-resource-policy/image-loads.html": [
+ "6e81ede4b474b2516ec735d4d8f99694b4124773",
+ "testharness"
+ ],
+ "fetch/cross-origin-resource-policy/resources/green.png": [
+ "ef91d21307a12b2cfaf33a90dffe16aa1cba42c9",
+ "support"
+ ],
+ "fetch/cross-origin-resource-policy/resources/hello.py": [
+ "0d8e30350c97fd6a040b14348929cf7e87e0e406",
+ "support"
+ ],
+ "fetch/cross-origin-resource-policy/resources/iframe.py": [
+ "d8f4af86d37d2f257b4166a1f7d3001d55eeda69",
+ "support"
+ ],
+ "fetch/cross-origin-resource-policy/resources/iframeFetch.html": [
+ "d66a9c958288a97469e8cfa75eba973e9f35e190",
+ "support"
+ ],
+ "fetch/cross-origin-resource-policy/resources/image.py": [
+ "1eba6cc92e4bc3f0d83814c0ead1ba6b23aa5182",
+ "support"
+ ],
+ "fetch/cross-origin-resource-policy/resources/redirect.py": [
+ "eb237d6f61e042db8454efad97a7ca58ea90eba9",
+ "support"
+ ],
+ "fetch/cross-origin-resource-policy/resources/script.py": [
+ "330a0ae1420b41e63bd639fa24f75e64e4528bcc",
+ "support"
+ ],
+ "fetch/cross-origin-resource-policy/scheme-restriction.any.js": [
+ "e1221ddd258f4d699dad395284f7a2cb0a719888",
+ "testharness"
+ ],
+ "fetch/cross-origin-resource-policy/scheme-restriction.https.window.js": [
+ "e0272587c66b6c220dce1a5a055d49628c84d0fd",
+ "testharness"
+ ],
+ "fetch/cross-origin-resource-policy/script-loads.html": [
+ "cd28267293f2d20ee78d6b946fe6b8793edf1bae",
+ "testharness"
+ ],
+ "fetch/cross-origin-resource-policy/syntax.any.js": [
+ "77377a2a82a22bf9ff637a1e3b918eda6cb28858",
+ "testharness"
+ ],
"fetch/data-urls/README.md": [
"868cb170fa0c5626008fef77e37dee16e76b10d5",
"support"
@@ -590019,8 +590851,8 @@
"c11d6b875af47f6134c98a23a7d2ce4fe4baa8c2",
"wdspec"
],
- "input-device-capabilities/OWNERS": [
- "d4e4ff1ad12e54c45e32ff0b4938fe9a9b1f0f4d",
+ "input-device-capabilities/META.yml": [
+ "9781a4d75e1dcda28688def7a44f1776a1344776",
"support"
],
"input-device-capabilities/interfaces.html": [
@@ -590259,6 +591091,10 @@
"7fec46d25cf175390524b681cdbec7b0b76c89b9",
"support"
],
+ "interfaces/pointerevents-extension.idl": [
+ "26055736a27852501eba7da7f0cab7c57eceb652",
+ "support"
+ ],
"interfaces/pointerevents.idl": [
"29ca4e05813256592af7e9804e8135aaffdcc995",
"support"
@@ -596795,6 +597631,10 @@
"d6478260afe1ae812374b7e9178f90697e148f61",
"testharness"
],
+ "offscreen-canvas/green-100x50.png": [
+ "de18139c6fb9e1ef54ca8fd35a9f47ee213172a5",
+ "support"
+ ],
"offscreen-canvas/image-smoothing/image.smoothing.html": [
"2c18b7a9bd01ee8fbfd74d3556f1609b7c3de1a7",
"testharness"
@@ -598971,6 +599811,422 @@
"126f4504f7a7aabe0724f6b1e49b7b6c6c5ac3a8",
"testharness"
],
+ "offscreen-canvas/text/2d.text.align.default.html": [
+ "0f03b74a423e4046f977e064990189d9369363e4",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.align.default.worker.js": [
+ "3b923cedd2e519c310599827d2d27ccec971f067",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.align.invalid.html": [
+ "2ef2f370d5685657abbf426b22c408df1cf7a909",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.align.invalid.worker.js": [
+ "f02bf2bee2b1058746d4860ccc6f6074d32d8f17",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.align.valid.html": [
+ "fb2804ae631143d79f51445c0d21d24c29baba4a",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.align.valid.worker.js": [
+ "b110900fc3397da210d85435b9fd044e36044fe8",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.baseline.default.html": [
+ "15123f24a6bd2ce91da69a699dce0e6e732160ea",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.baseline.default.worker.js": [
+ "c64b323eaab96a25c3d998d56d24d71194ed11d5",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.baseline.invalid.html": [
+ "666e5a38b9b29846def2d4973e47d8c5370ef174",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.baseline.invalid.worker.js": [
+ "6367302e1bc2cb8c033e6260efb802325f7eca1b",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.baseline.valid.html": [
+ "ec223c711f463b11de7f87113120730bf508e6e6",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.baseline.valid.worker.js": [
+ "2edca0451c17d32641a56f2bc3291a0f82b5aec9",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.center.html": [
+ "075aba3a36ddf818389a466610b83d5b32ca2cca",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.center.worker.js": [
+ "a64a6f1ca7d1d156a3338c44c6b68da05004993a",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.end.ltr.html": [
+ "ace6eade83e8387ee79336d7ee916080a322a507",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.end.ltr.worker.js": [
+ "bec18ab1877b5779b949a687956dfdd7afb181b5",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.end.rtl.html": [
+ "909158a5cdaf163fcfc3118c17aa60b683a4c0f6",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.end.rtl.worker.js": [
+ "90305645fc74504a19490961529c6ab2d010bfd2",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.left.html": [
+ "6ef2b6307975ff4403d86d2ac1274cf7034f1fce",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.left.worker.js": [
+ "faa688af0bbc8bbf050385a8ca26350a448604d5",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.right.html": [
+ "77b5f05efbbee3497883a5f24891d0791e4232c2",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.right.worker.js": [
+ "762f0297da3f72998b3edf25cbcc88ef29ff09fb",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.start.ltr.html": [
+ "8e981ab37b06c5b73b95bee27ad8b31d08a227b6",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.start.ltr.worker.js": [
+ "cb8dabd5c4db7d31fabc014ea984c6525c74101a",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.start.rtl.html": [
+ "2ac30666d9786ac16cb1f44839b009e94f5bdcb6",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.align.start.rtl.worker.js": [
+ "4a917b65cf8c7d6efaaafb55a57904e73c02fb51",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.alphabetic.html": [
+ "98aaeeaa5f7eed3d89443e83eebbbbc5ee349f13",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.alphabetic.worker.js": [
+ "c8749c719d3b51ca3d7420506a50097d07de9d18",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.bottom.html": [
+ "86d9559a8064398036835090683335ba6da362e9",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.bottom.worker.js": [
+ "259bf3095025b5fda39dc9f37d1cca1283bbd6b1",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.hanging.html": [
+ "24ece1ead594df694ce984447b34495052052b7f",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.hanging.worker.js": [
+ "03245b8773cf0d783242f5e6b87883e09fda8e18",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.ideographic.html": [
+ "8d3df854174a3b31f4b641a2ba19d25284abecf2",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.ideographic.worker.js": [
+ "c512f15ea50b8f663778fe727503e276a07eebaf",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.middle.html": [
+ "cd4d3c469262051208ab77b07211751aa745f356",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.middle.worker.js": [
+ "75f4334744ac4072bb5f16b8e30a8682822bf396",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.top.html": [
+ "c3e659200d75672e6dcc9fb6c28810c6020e6da7",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.baseline.top.worker.js": [
+ "0ac575fbcc07af258153a8b60f9d7325b5efb655",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.basic-manual.html": [
+ "e716712df480c959042d97befa40a3fdae7e4a65",
+ "manual"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.basic-manual.worker.js": [
+ "ee9dab8283c7386bdd92b1509fbba690d6136eea",
+ "manual"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.basic.png": [
+ "994c4f1bf8377dbce0c1af8805f2c1166044d521",
+ "support"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.html": [
+ "d608d2b08c593677d0127be36748775759a45147",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.worker.js": [
+ "6e520919cdc24a9162c506d1a089115cce61f81b",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.html": [
+ "db24c5bad46382d5a01f69cf5f593ee92df0fc74",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.worker.js": [
+ "a2edc7eec240c3910b04c659913ff65c1bf781d3",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.html": [
+ "bb4f0ad1ff7b6cdb1581b7783e9a3366db556fc2",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.worker.js": [
+ "da9dd0e360dfcf5ebb1c92d73a8c4d4d163f9f8e",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html": [
+ "2ccfc824ed8626fa73f1e1f6e9fa00de26372d7c",
+ "manual"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.worker.js": [
+ "ce5394e1d049562c55b82d31498d2102733cbe91",
+ "manual"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.large.png": [
+ "994c4f1bf8377dbce0c1af8805f2c1166044d521",
+ "support"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.html": [
+ "cf3b7eab36b3e3e88308cfca2dd902b4a83948e5",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.worker.js": [
+ "fa7bf0f400a981ad2ab24dfafdecaaa4112df0c4",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.html": [
+ "eace6e3a9737c7168767fe076d9d073450084a4a",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.worker.js": [
+ "3a31baff14975ea11bc1a85f73feed5a10253cbd",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.html": [
+ "609e35604340223ff3b0a523f60c425b4e20a517",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.worker.js": [
+ "a2cc87ea10bd31925a453e772501680db9331999",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.rtl-manual.html": [
+ "0e86f2f9c376d7be73b59b0566777033e1961b2f",
+ "manual"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.rtl-manual.worker.js": [
+ "f75091da621b188f0d907b0109ba755e03bf51b7",
+ "manual"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.rtl.png": [
+ "994c4f1bf8377dbce0c1af8805f2c1166044d521",
+ "support"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.unaffected.html": [
+ "08c5cb00927184947c48e34785dcea79f1c9242e",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fill.unaffected.worker.js": [
+ "dd75c38e75c4fffaec936aecca7ffcfebffef4c0",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fontface.html": [
+ "406dca361b9d49ed1ab3ab974ffb2b61c72e656e",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fontface.notinpage.html": [
+ "0e7003fdb4e8fa91a46ce38e59cf428002ef9fdd",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fontface.notinpage.worker.js": [
+ "2fecc82c2ba6eb8a7c08165090001318b70b3c2f",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fontface.repeat.html": [
+ "ce98e5bf83be9b33d31d992e603433c08564a755",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fontface.repeat.worker.js": [
+ "831fe6ec1f83373ecde78490e1a151023615b980",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.fontface.worker.js": [
+ "b27d08fa064682967f479bfd897b13e1bf3a9da8",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.kern.consistent-manual.html": [
+ "01bcff19c99a71b645d2e6945e8fb8281f8955d2",
+ "manual"
+ ],
+ "offscreen-canvas/text/2d.text.draw.kern.consistent-manual.worker.js": [
+ "858c0142d77e507844ce0e3e491f1ae91891bce6",
+ "manual"
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.basic.html": [
+ "5e47b181d06bd0759bad5235d1d1136c695e4026",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.basic.worker.js": [
+ "af97e3713a5933e81381d64be1b6732211f82080",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.end.html": [
+ "62bf2c231cce285bb2ce59b5e693f600ebaac6f8",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.end.worker.js": [
+ "b4359cf1b5bd3133c5ea9bdbede49b77dab215a2",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.html": [
+ "76ef0f14c003df20a6c537343827f59f40426ddd",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.worker.js": [
+ "5050d1672837608ace2eb538868a49fa9d4e8551",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.other.html": [
+ "78edf9b8c18c6bed5618f9098295b40d06f69795",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.other.worker.js": [
+ "d47f1e453f97bcbc14598f544fbe62cf71907232",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.space.html": [
+ "2a0f34a7cb060d8a5bfb8f047313cdae06e8d654",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.space.worker.js": [
+ "aa44b04ab86d3832989ac9cf4f4afe67ebcbb84c",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.start.html": [
+ "ff8bc0c1cbd1544553ac518c6514cc9209c9babb",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.space.collapse.start.worker.js": [
+ "91bb3b7c5f46c03e765096c6ab56952bf07221ec",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.stroke.basic-manual.html": [
+ "a09a7d06c95de71f7c398eeb8ba86795b51420d8",
+ "manual"
+ ],
+ "offscreen-canvas/text/2d.text.draw.stroke.basic-manual.worker.js": [
+ "10d57dc95232df8e9b9ffa6ffb09b7afdfada7b7",
+ "manual"
+ ],
+ "offscreen-canvas/text/2d.text.draw.stroke.basic.png": [
+ "1e85aad73026ce90363714e1e3a9f028ca26d8d4",
+ "support"
+ ],
+ "offscreen-canvas/text/2d.text.draw.stroke.unaffected.html": [
+ "6c84e6d7f9e1a3dc8cf7b6ef5566b7610696ebd1",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.draw.stroke.unaffected.worker.js": [
+ "e1701c3dfb0ba6f224dbba03a2a4a76a094e22d4",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.font.default.html": [
+ "a98dfbeb969e49e16223ccf7f3dd502db76508a2",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.font.default.worker.js": [
+ "8e9586b95cb6e7b97d96cf774a50822aca35f766",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.basic.html": [
+ "2fff7c32ea143644835103459d8b5e878e96adae",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.basic.worker.js": [
+ "9188a9d8b7ba689530a381c63a474916441a429c",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.complex.html": [
+ "693ae3ed12e8406e057353dfed6fc674291371ce",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.complex.worker.js": [
+ "256c24cd52c9dc39638d3ebc62a6f4aee63d5771",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.invalid.html": [
+ "a787440718f848f0a8bc7287830ef21de712c5ff",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.invalid.worker.js": [
+ "e739eec435898759d4b84800ab3aa387837882c0",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.system.html": [
+ "5c7cde7b2c1a61cdfd350d8f8138fc9c0f0bc9c6",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.system.worker.js": [
+ "824a4414ab9d7d84bbb5a6bfdaa9612a11248c8d",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.tiny.html": [
+ "bfc6cc1661ce5a1abf99281110b91368becc095f",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.font.parse.tiny.worker.js": [
+ "a0b347ed0d1b99f0896cff1e5da2afb39cb3728b",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.measure.width.basic.html": [
+ "8f9708539c6135c8c4b39675355de29c489387a5",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.measure.width.basic.worker.js": [
+ "65ad87719af9eb8856d270aef314297c481acb9a",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.measure.width.empty.html": [
+ "56532c174e0d56e743ce73b7dff3f48d8f551086",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.measure.width.empty.worker.js": [
+ "cdce07e82cbf743a7efe4b3869b423e7c114f9fd",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.measure.width.space.html": [
+ "d39369ef48d14cdd98b3a8824c3def660530700e",
+ "testharness"
+ ],
+ "offscreen-canvas/text/2d.text.measure.width.space.worker.js": [
+ "d4cc19770fb7d885e1681f0b29733d98f2693459",
+ "testharness"
+ ],
"offscreen-canvas/the-canvas-state/2d.state.saverestore.bitmap.html": [
"e5d7d40f76ad24edaeff50d79f02bfdbd40e63d4",
"testharness"
@@ -599532,15 +600788,15 @@
"support"
],
"offscreen-canvas/tools/name2dir.yaml": [
- "ed640afbc6614fa9b53e6061192544b0fdc4f51e",
+ "ac9ba9b8718cc68da51b32cc92fef2ad7cab075a",
"support"
],
"offscreen-canvas/tools/templates.yaml": [
- "d8959532cf7948a99fb99b086ed22eb13f1870db",
+ "d2839fc39d5da4af8745ac09f47258256b72eac0",
"support"
],
"offscreen-canvas/tools/tests2d.yaml": [
- "0e1cf2837f41da2e37a0a4786fba207a104e2e0b",
+ "ecd17e9a6dd3743de6df149a20f541d17ebe09d5",
"support"
],
"offscreen-canvas/transformations/2d.transformation.order.html": [
@@ -600567,8 +601823,8 @@
"dc978fd8669d67118109fcab245010fdd7d799b0",
"testharness"
],
- "permissions/OWNERS": [
- "fec8c86a6652ad9871d914c0c5119a2158172c11",
+ "permissions/META.yml": [
+ "b6a9ae71c3b0b86061a91320ff6d6b59447d7f62",
"support"
],
"permissions/interfaces.any.js": [
@@ -600600,7 +601856,7 @@
"testharness"
],
"picture-in-picture/picture-in-picture-window.html": [
- "e1dee4bfd55491d150c786e193c52148e91b525e",
+ "628cc1c6d8d2c83a6f3e466bc66a26ea76b85ff2",
"testharness"
],
"picture-in-picture/request-picture-in-picture.html": [
@@ -600628,7 +601884,7 @@
"manual"
],
"pointerevents/extension/idlharness.html": [
- "1337bbb65f4748a7d5a076cbe73e4aa48a2a1eb8",
+ "70f3fc4fce01d7acb4611aa870d7f95a1d734dbc",
"testharness"
],
"pointerevents/extension/pointerevent_coalesced_events_attributes-manual.html": [
@@ -620704,7 +621960,7 @@
"testharness"
],
"webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html": [
- "0ef05c242d8f987d521c0e9ce474d0f9a46bee28",
+ "480a05cc2a25f50ccc61771f6b149c7090432d07",
"testharness"
],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/.gitkeep": [
@@ -620736,7 +621992,7 @@
"support"
],
"webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html": [
- "3e8b55e707434899be9af13334d935368579f1dc",
+ "e8b85f97399b430c338e75a90b32d07277d6ef0c",
"testharness"
],
"webaudio/the-audio-api/the-audiolistener-interface/.gitkeep": [
@@ -620828,7 +622084,7 @@
"testharness"
],
"webaudio/the-audio-api/the-audioparam-interface/automation-rate-testing.js": [
- "abd017009aff151436f4f17ea51fe94e20c1cf6a",
+ "90314b367161c720ccbb880e53d65bedc209d0bd",
"support"
],
"webaudio/the-audio-api/the-audioparam-interface/automation-rate.html": [
@@ -620852,7 +622108,7 @@
"testharness"
],
"webaudio/the-audio-api/the-audioparam-interface/k-rate-constant-source.html": [
- "094368fb4cff58ea97aa8e1b365a359aed3dc6af",
+ "1cf2706025fe92649f859608b195387346cdb1fd",
"testharness"
],
"webaudio/the-audio-api/the-audioparam-interface/k-rate-delay.html": [
@@ -620868,7 +622124,7 @@
"testharness"
],
"webaudio/the-audio-api/the-audioparam-interface/k-rate-panner.html": [
- "8f679c80f0cbd8d91b699e3024eeae9fb9410916",
+ "0a6da33c2aa03a7d34a517c7b52023f3b4178ec5",
"testharness"
],
"webaudio/the-audio-api/the-audioparam-interface/k-rate-stereo-panner.html": [
@@ -623768,7 +625024,7 @@
"testharness"
],
"websockets/opening-handshake/003-sets-origin.worker.js": [
- "b5a23172a68b23ac5ec5384b6c3a96c1b9ec0a20",
+ "c9fe02b260e6271c4b026fb94c1517a0a512d500",
"testharness"
],
"websockets/opening-handshake/003.html": [
@@ -624127,6 +625383,14 @@
"6e6050f742e0da58fc94a5c0a0aa75f16dfcede9",
"support"
],
+ "webusb/resources/usb-allowed-by-feature-policy-worker.js": [
+ "05b1cecd77688ef9942bb1d563a2d8ef47df0ad7",
+ "support"
+ ],
+ "webusb/resources/usb-disabled-by-feature-policy-worker.js": [
+ "b8c11fa9ff9e33168bb8ef6e7c18f98d27a77838",
+ "support"
+ ],
"webusb/resources/usb-helpers.js": [
"7a5878c9f4c472bafa8f3db026573feba8e746b0",
"support"
@@ -624140,15 +625404,15 @@
"support"
],
"webusb/usb-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
- "fda5a143afa30b86a318b3ab74baed513a5275bb",
+ "bb86e36bfa4fcc9ba022a589565bfaba1584d4dc",
"testharness"
],
"webusb/usb-allowed-by-feature-policy-attribute.https.sub.html": [
- "9e891075241bb843a283193506250285e93740e2",
+ "6080cc1f628040b3c5b3c01668588429f10e7b49",
"testharness"
],
"webusb/usb-allowed-by-feature-policy.https.sub.html": [
- "dce5c37e64183ea3d698ef8cc5b751c506a495ed",
+ "ff891b8b3366f96cd378d0167047a022add35406",
"testharness"
],
"webusb/usb-allowed-by-feature-policy.https.sub.html.headers": [
@@ -624160,7 +625424,7 @@
"testharness"
],
"webusb/usb-disabled-by-feature-policy.https.sub.html": [
- "414b0b8087cbfa333e205a7b42d838c5f8108cf7",
+ "0000c10f217eb0e53013578d83cfa2ac37147fea",
"testharness"
],
"webusb/usb-disabled-by-feature-policy.https.sub.html.headers": [
@@ -627828,7 +629092,7 @@
"testharness"
],
"workers/modules/dedicated-worker-import-referrer.html": [
- "c6a618329eac51a8d6bbf0f7aece906145f49a33",
+ "309df42ef9329addc1fc59e2d3c0443454e14ad7",
"testharness"
],
"workers/modules/dedicated-worker-import.html": [
diff --git a/tests/wpt/metadata/css/CSS2/abspos/remove-block-between-inline-and-abspos.html.ini b/tests/wpt/metadata/css/CSS2/abspos/remove-block-between-inline-and-abspos.html.ini
new file mode 100644
index 00000000000..5b3acc7302a
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/abspos/remove-block-between-inline-and-abspos.html.ini
@@ -0,0 +1,2 @@
+[remove-block-between-inline-and-abspos.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/CSS2/floats/remove-block-between-inline-and-float.html.ini b/tests/wpt/metadata/css/CSS2/floats/remove-block-between-inline-and-float.html.ini
new file mode 100644
index 00000000000..5ef5e72a276
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/floats/remove-block-between-inline-and-float.html.ini
@@ -0,0 +1,2 @@
+[remove-block-between-inline-and-float.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/css-fonts/variations/font-weight-matching.html.ini b/tests/wpt/metadata/css/css-fonts/variations/font-weight-matching.html.ini
index af9fe422a34..7c80799aece 100644
--- a/tests/wpt/metadata/css/css-fonts/variations/font-weight-matching.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/variations/font-weight-matching.html.ini
@@ -29,9 +29,6 @@
[Test @font-face matching for weight 1000]
expected: FAIL
- [Test @font-face matching for weight 420]
- expected: FAIL
-
[Test @font-face matching for weight 99]
expected: FAIL
diff --git a/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini b/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini
new file mode 100644
index 00000000000..26435e28b09
--- /dev/null
+++ b/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini
@@ -0,0 +1,2 @@
+[vh_not_refreshing_on_chrome.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini b/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini
new file mode 100644
index 00000000000..5577b7596a8
--- /dev/null
+++ b/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini
@@ -0,0 +1,4 @@
+[fetch-in-iframe.html]
+ [Untitled]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch.html.ini b/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch.html.ini
new file mode 100644
index 00000000000..cb5045f9fbb
--- /dev/null
+++ b/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch.html.ini
@@ -0,0 +1,4 @@
+[fetch.html]
+ [Untitled]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/fetch/cross-origin-resource-policy/iframe-loads.html.ini b/tests/wpt/metadata/fetch/cross-origin-resource-policy/iframe-loads.html.ini
new file mode 100644
index 00000000000..06cf11618ea
--- /dev/null
+++ b/tests/wpt/metadata/fetch/cross-origin-resource-policy/iframe-loads.html.ini
@@ -0,0 +1,4 @@
+[iframe-loads.html]
+ [Untitled]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/fetch/cross-origin-resource-policy/image-loads.html.ini b/tests/wpt/metadata/fetch/cross-origin-resource-policy/image-loads.html.ini
new file mode 100644
index 00000000000..e28824f5560
--- /dev/null
+++ b/tests/wpt/metadata/fetch/cross-origin-resource-policy/image-loads.html.ini
@@ -0,0 +1,19 @@
+[image-loads.html]
+ [Same-origin image load with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
+ expected: FAIL
+
+ [Same-origin image load with a 'Cross-Origin-Resource-Policy: same-site' response header.]
+ expected: FAIL
+
+ [Cross-origin cors image load with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
+ expected: FAIL
+
+ [Cross-origin cors image load with a 'Cross-Origin-Resource-Policy: same-site' response header.]
+ expected: FAIL
+
+ [Cross-origin no-cors image load with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
+ expected: FAIL
+
+ [Cross-origin no-cors image load with a 'Cross-Origin-Resource-Policy: same-site' response header.]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/fetch/cross-origin-resource-policy/scheme-restriction.any.js.ini b/tests/wpt/metadata/fetch/cross-origin-resource-policy/scheme-restriction.any.js.ini
new file mode 100644
index 00000000000..92ed8a87544
--- /dev/null
+++ b/tests/wpt/metadata/fetch/cross-origin-resource-policy/scheme-restriction.any.js.ini
@@ -0,0 +1,9 @@
+[scheme-restriction.any.html]
+ [Cross-Origin-Resource-Policy: same-site blocks retrieving HTTPS from HTTP]
+ expected: FAIL
+
+
+[scheme-restriction.any.worker.html]
+ [Cross-Origin-Resource-Policy: same-site blocks retrieving HTTPS from HTTP]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js.ini b/tests/wpt/metadata/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js.ini
new file mode 100644
index 00000000000..a72f7e5947d
--- /dev/null
+++ b/tests/wpt/metadata/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js.ini
@@ -0,0 +1,4 @@
+[scheme-restriction.https.window.html]
+ [Cross-Origin-Resource-Policy does not block Mixed Content <img>]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/fetch/cross-origin-resource-policy/script-loads.html.ini b/tests/wpt/metadata/fetch/cross-origin-resource-policy/script-loads.html.ini
new file mode 100644
index 00000000000..1a9132484c8
--- /dev/null
+++ b/tests/wpt/metadata/fetch/cross-origin-resource-policy/script-loads.html.ini
@@ -0,0 +1,19 @@
+[script-loads.html]
+ [Same-origin script load with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
+ expected: FAIL
+
+ [Same-origin script load with a 'Cross-Origin-Resource-Policy: same-site' response header.]
+ expected: FAIL
+
+ [Cross-origin cors script load with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
+ expected: FAIL
+
+ [Cross-origin cors script load with a 'Cross-Origin-Resource-Policy: same-site' response header.]
+ expected: FAIL
+
+ [Cross-origin no-cors script load with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
+ expected: FAIL
+
+ [Cross-origin no-cors script load with a 'Cross-Origin-Resource-Policy: same-site' response header.]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html.ini
index 5b38c37b086..78879bad5f1 100644
--- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html.ini
+++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html.ini
@@ -1,4 +1,5 @@
[javascript-url-abort-return-value-undefined.tentative.html]
+ expected: TIMEOUT
[Not aborting fetch for javascript:undefined navigation]
- expected: FAIL
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini b/tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini
index 20865f493ec..9579b42287e 100644
--- a/tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini
+++ b/tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini
@@ -30,3 +30,6 @@
[Set HTTP URL frame location.protocol to data]
expected: FAIL
+ [Set HTTP URL frame location.protocol to x]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/websockets/opening-handshake/003-sets-origin.worker.js.ini b/tests/wpt/metadata/websockets/opening-handshake/003-sets-origin.worker.js.ini
deleted file mode 100644
index fcd41eea9f9..00000000000
--- a/tests/wpt/metadata/websockets/opening-handshake/003-sets-origin.worker.js.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[003-sets-origin.worker.html]
- type: testharness
- expected: TIMEOUT
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html.ini
index 594360ffb15..fbdc89a8f0d 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html.ini
@@ -1,4 +1,4 @@
-[shader-uniform-packing-restrictions.html]
+[context-creation-and-destruction.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-creation.html.ini
index fb8852c9e7a..393e42df192 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-creation.html.ini
@@ -1,4 +1,4 @@
-[shader-with-non-reserved-words.html]
+[context-creation.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html.ini
new file mode 100644
index 00000000000..b2918fac56f
--- /dev/null
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html.ini
@@ -0,0 +1,2 @@
+[context-eviction-with-garbage-collection.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html.ini
new file mode 100644
index 00000000000..84c7aa47561
--- /dev/null
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html.ini
@@ -0,0 +1,5 @@
+[context-release-upon-reload.html]
+ expected: TIMEOUT
+ [Overall test]
+ expected: NOTRUN
+
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html.ini
new file mode 100644
index 00000000000..7aab2f5f662
--- /dev/null
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html.ini
@@ -0,0 +1,5 @@
+[context-release-with-workers.html]
+ expected: TIMEOUT
+ [Overall test]
+ expected: NOTRUN
+
diff --git a/tests/wpt/web-platform-tests/common/canvas-tests.js b/tests/wpt/web-platform-tests/common/canvas-tests.js
index bf13d4a349c..732f2a435b8 100644
--- a/tests/wpt/web-platform-tests/common/canvas-tests.js
+++ b/tests/wpt/web-platform-tests/common/canvas-tests.js
@@ -50,10 +50,14 @@ function _assertPixelApprox(canvas, x,y, r,g,b,a, pos, colour, tolerance)
assert_approx_equals(c[3], a, tolerance, 'Alpha channel of the pixel at (' + x + ', ' + y + ')');
}
+let _deferred = false;
+
+function deferTest() {
+ _deferred = true;
+}
+
function _addTest(testFn)
{
- var deferred = false;
- window.deferTest = function () { deferred = true; };
on_event(window, "load", function()
{
t.step(function() {
@@ -62,7 +66,7 @@ function _addTest(testFn)
t.step(testFn, window, canvas, ctx);
});
- if (!deferred) {
+ if (!_deferred) {
t.done();
}
});
diff --git a/tests/wpt/web-platform-tests/common/get-host-info.sub.js b/tests/wpt/web-platform-tests/common/get-host-info.sub.js
index c0ad19bc7a3..35acad33a8f 100644
--- a/tests/wpt/web-platform-tests/common/get-host-info.sub.js
+++ b/tests/wpt/web-platform-tests/common/get-host-info.sub.js
@@ -6,6 +6,7 @@ function get_host_info() {
var ORIGINAL_HOST = '{{host}}';
var REMOTE_HOST = (ORIGINAL_HOST === 'localhost') ? '127.0.0.1' : ('www1.' + ORIGINAL_HOST);
var OTHER_HOST = '{{domains[www2]}}';
+ var NOTSAMESITE_HOST = (ORIGINAL_HOST === 'localhost') ? '127.0.0.1' : ('not-' + ORIGINAL_HOST);
return {
HTTP_PORT: HTTP_PORT,
@@ -19,6 +20,7 @@ function get_host_info() {
HTTPS_ORIGIN_WITH_CREDS: 'https://foo:bar@' + ORIGINAL_HOST + ':' + HTTPS_PORT,
HTTP_ORIGIN_WITH_DIFFERENT_PORT: 'http://' + ORIGINAL_HOST + ':' + HTTP_PORT2,
HTTP_REMOTE_ORIGIN: 'http://' + REMOTE_HOST + ':' + HTTP_PORT,
+ HTTP_NOTSAMESITE_ORIGIN: 'http://' + NOTSAMESITE_HOST + ':' + HTTP_PORT,
HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT: 'http://' + REMOTE_HOST + ':' + HTTP_PORT2,
HTTPS_REMOTE_ORIGIN: 'https://' + REMOTE_HOST + ':' + HTTPS_PORT,
HTTPS_REMOTE_ORIGIN_WITH_CREDS: 'https://foo:bar@' + REMOTE_HOST + ':' + HTTPS_PORT,
diff --git a/tests/wpt/web-platform-tests/console/console-counting-label-conversion.any.js b/tests/wpt/web-platform-tests/console/console-counting-label-conversion.any.js
deleted file mode 100644
index bbc77f011b7..00000000000
--- a/tests/wpt/web-platform-tests/console/console-counting-label-conversion.any.js
+++ /dev/null
@@ -1,55 +0,0 @@
-"use strict";
-// https://console.spec.whatwg.org/#count
-// https://console.spec.whatwg.org/#countreset
-
-// TODO(domfarolino): make this a link to
-// https://console.spec.whatwg/org/#counting pending
-// the resolution of https://github.com/whatwg/console/issues/135
-
-// TODO(domfarolino): DRY up the label conversion tests for count/countReset/time/timeEnd
-// by probably making a helper function that passes in the console method to perform the
-// conversion with so we're not duplicating everything
-
-test(() => {
- let countLabelToStringCalled = false;
-
- console.count({
- toString() {
- countLabelToStringCalled = true;
- }
- });
-
- assert_true(countLabelToStringCalled, "toString() must be called on count()'s label when label is an object");
-}, "console.count()'s label gets converted to string via label.toString() when label is an object");
-
-test(() => {
- assert_throws({name: "Error"}, () => {
- console.count({
- toString() {
- throw new Error("conversion error");
- }
- });
- }, "count() must re-throw any exceptions thrown by label.toString() conversion");
-}, "console.count() throws exceptions generated by erroneous label.toString() conversion");
-
-test(() => {
- let countLabelToStringCalled = false;
-
- console.countReset({
- toString() {
- countLabelToStringCalled = true;
- }
- });
-
- assert_true(countLabelToStringCalled, "toString() must be called on countReset()'s label when label is an object");
-}, "console.countReset()'s label gets converted to string via label.toString() when label is an object");
-
-test(() => {
- assert_throws({name: "Error"}, () => {
- console.countReset({
- toString() {
- throw new Error("conversion error");
- }
- });
- }, "countReset() must re-throw any exceptions thrown by label.toString() conversion");
-}, "console.countReset() throws exceptions generated by erroneous label.toString() conversion");
diff --git a/tests/wpt/web-platform-tests/console/console-label-conversion.any.js b/tests/wpt/web-platform-tests/console/console-label-conversion.any.js
new file mode 100644
index 00000000000..1fb269d4061
--- /dev/null
+++ b/tests/wpt/web-platform-tests/console/console-label-conversion.any.js
@@ -0,0 +1,29 @@
+"use strict";
+// https://console.spec.whatwg/org/#counting
+// https://console.spec.whatwg/org/#timing
+
+const methods = ['count', 'countReset', 'time', 'timeLog', 'timeEnd'];
+
+for (const method of methods) {
+ test(() => {
+ let labelToStringCalled = false;
+
+ console[method]({
+ toString() {
+ labelToStringCalled = true;
+ }
+ });
+
+ assert_true(labelToStringCalled, `${method}() must call toString() on label when label is an object`);
+ }, `console.${method}()'s label gets converted to string via label.toString() when label is an object`);
+
+ test(() => {
+ assert_throws({name: 'Error'}, () => {
+ console[method]({
+ toString() {
+ throw new Error('conversion error');
+ }
+ });
+ }, `${method} must re-throw any exceptions thrown by label.toString() conversion`);
+ }, `console.${method}() throws exceptions generated by erroneous label.toString() conversion`);
+}
diff --git a/tests/wpt/web-platform-tests/console/console-time-label-conversion.any.js b/tests/wpt/web-platform-tests/console/console-time-label-conversion.any.js
deleted file mode 100644
index 5004a7476c2..00000000000
--- a/tests/wpt/web-platform-tests/console/console-time-label-conversion.any.js
+++ /dev/null
@@ -1,46 +0,0 @@
-"use strict";
-// https://console.spec.whatwg.org/#timing
-
-test(() => {
- let timeLabelToStringCalled = false;
-
- console.time({
- toString() {
- timeLabelToStringCalled = true;
- }
- });
-
- assert_true(timeLabelToStringCalled, "toString() must be called on time()'s label when label is an object");
-}, "console.time()'s label gets converted to string via label.toString() when label is an object");
-
-test(() => {
- let timeEndLabelToStringCalled = false;
-
- console.timeEnd({
- toString() {
- timeEndLabelToStringCalled = true;
- }
- });
-
- assert_true(timeEndLabelToStringCalled, "toString() must be called on timeEnd()'s label when label is an object");
-}, "console.timeEnd()'s label gets converted to string via label.toString() when label is an object");
-
-test(() => {
- assert_throws({name: "Error"}, () => {
- console.time({
- toString() {
- throw new Error("conversion error");
- }
- });
- }, "time() must re-throw any exceptions thrown by label.toString() conversion");
-}, "console.time() throws exceptions generated by erroneous label.toString() conversion");
-
-test(() => {
- assert_throws({name: "Error"}, () => {
- console.timeEnd({
- toString() {
- throw new Error("conversion error");
- }
- });
- }, "timeEnd() must re-throw any exceptions thrown by label.toString() conversion");
-}, "console.timeEnd() throws exceptions generated by erroneous label.toString() conversion");
diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-doesnt-send-reports-without-violation.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-doesnt-send-reports-without-violation.https.sub.html.sub.headers
index 011c1b0929f..054d332035a 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-doesnt-send-reports-without-violation.https.sub.html.sub.headers
+++ b/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-doesnt-send-reports-without-violation.https.sub.html.sub.headers
@@ -3,5 +3,5 @@ Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0, false
Pragma: no-cache
Set-Cookie: reporting-api-doesnt-send-reports-without-violation={{$id:uuid()}}; Path=/content-security-policy/reporting-api
-Report-To: { "group": "csp-group", "max-age": 10886400, "endpoints": [{ "url": "https://{{host}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID={{$id}}" }] }
+Report-To: { "group": "csp-group", "max_age": 10886400, "endpoints": [{ "url": "https://{{host}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID={{$id}}" }] }
Content-Security-Policy: script-src 'self' 'unsafe-inline'; img-src 'self'; report-to csp-group
diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-only-sends-reports-on-violation.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-only-sends-reports-on-violation.https.sub.html.sub.headers
index 948b7403e8f..973c20e23f8 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-only-sends-reports-on-violation.https.sub.html.sub.headers
+++ b/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-only-sends-reports-on-violation.https.sub.html.sub.headers
@@ -3,5 +3,5 @@ Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0, false
Pragma: no-cache
Set-Cookie: reporting-api-report-only-sends-reports-on-violation={{$id:uuid()}}; Path=/content-security-policy/reporting-api
-Report-To: { "group": "csp-group", "max-age": 10886400, "endpoints": [{ "url": "https://{{host}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID={{$id}}" }] }
+Report-To: { "group": "csp-group", "max_age": 10886400, "endpoints": [{ "url": "https://{{host}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID={{$id}}" }] }
Content-Security-Policy-Report-Only: script-src 'self' 'unsafe-inline'; img-src 'none'; report-to csp-group
diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-1.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-1.https.sub.html.sub.headers
index 55bf5b7a364..b6504f6275b 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-1.https.sub.html.sub.headers
+++ b/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-1.https.sub.html.sub.headers
@@ -4,4 +4,4 @@ Cache-Control: post-check=0, pre-check=0, false
Pragma: no-cache
Set-Cookie: reporting-api-report-to-overrides-report-uri-1={{$id:uuid()}}; Path=/content-security-policy/reporting-api
Content-Security-Policy: script-src 'self' 'unsafe-inline'; img-src 'none'; report-uri "/content-security-policy/support/report.py?op=put&reportID={{$id}}"; report-to csp-group
-Report-To: { "group": "csp-group", "max-age": 10886400, "endpoints": [{ "url": "https://{{host}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID={{$id:uuid()}}" }] }
+Report-To: { "group": "csp-group", "max_age": 10886400, "endpoints": [{ "url": "https://{{host}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID={{$id:uuid()}}" }] }
diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-2.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-2.https.sub.html.sub.headers
index ecef63f821d..98541e1cc16 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-2.https.sub.html.sub.headers
+++ b/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-2.https.sub.html.sub.headers
@@ -4,4 +4,4 @@ Cache-Control: post-check=0, pre-check=0, false
Pragma: no-cache
Set-Cookie: reporting-api-report-to-overrides-report-uri-2={{$id:uuid()}}; Path=/content-security-policy/reporting-api
Content-Security-Policy: script-src 'self' 'unsafe-inline'; img-src 'none'; report-to csp-group; report-uri "/content-security-policy/support/report.py?op=put&reportID={{$id}}"
-Report-To: { "group": "csp-group", "max-age": 10886400, "endpoints": [{ "url": "https://{{host}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID={{$id:uuid()}}" }] }
+Report-To: { "group": "csp-group", "max_age": 10886400, "endpoints": [{ "url": "https://{{host}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID={{$id:uuid()}}" }] }
diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-sends-reports-on-violation.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-sends-reports-on-violation.https.sub.html.sub.headers
index 4567e316b12..b57b94031ac 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-sends-reports-on-violation.https.sub.html.sub.headers
+++ b/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-sends-reports-on-violation.https.sub.html.sub.headers
@@ -3,5 +3,5 @@ Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0, false
Pragma: no-cache
Set-Cookie: reporting-api-sends-reports-on-violation={{$id:uuid()}}; Path=/content-security-policy/reporting-api
-Report-To: { "group": "csp-group", "max-age": 10886400, "endpoints": [{ "url": "https://{{host}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID={{$id}}" }] }
+Report-To: { "group": "csp-group", "max_age": 10886400, "endpoints": [{ "url": "https://{{host}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID={{$id}}" }] }
Content-Security-Policy: script-src 'self' 'unsafe-inline'; img-src 'none'; report-to csp-group
diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-works-on-frame-src.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-works-on-frame-src.https.sub.html.sub.headers
index a0fd2e9756e..13d0ce65c96 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-works-on-frame-src.https.sub.html.sub.headers
+++ b/tests/wpt/web-platform-tests/content-security-policy/reporting-api/reporting-api-works-on-frame-src.https.sub.html.sub.headers
@@ -2,5 +2,5 @@ Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: reporting-api-works-on-frame-src={{$id:uuid()}}; Path=/content-security-policy/reporting-api
-Report-To: { "group": "csp-group", "max-age": 10886400, "endpoints": [{ "url": "https://{{host}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID={{$id}}" }] }
+Report-To: { "group": "csp-group", "max_age": 10886400, "endpoints": [{ "url": "https://{{host}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID={{$id}}" }] }
Content-Security-Policy: script-src 'self' 'unsafe-inline'; frame-src 'none'; report-to csp-group
diff --git a/tests/wpt/web-platform-tests/css/CSS2/abspos/remove-block-between-inline-and-abspos.html b/tests/wpt/web-platform-tests/css/CSS2/abspos/remove-block-between-inline-and-abspos.html
new file mode 100644
index 00000000000..977f063bcaf
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/abspos/remove-block-between-inline-and-abspos.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<title>Removing block between inline and float should put the two on the same line</title>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#absolute-positioning" title="9.6 Absolute positioning">
+<link rel="match" href="../../reference/ref-filled-green-200px-square.html">
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<!-- This is a block with block children, so inlines need to be wrapped inside
+ anonymous blocks. A float and out-of-flow positioned box is neutral here,
+ in that it can either live among block children OR among inline
+ children. If it is (or becomes) sibling of an inline child, though, it
+ should be wrapped inside the same anonymous block as the inline, or layout
+ will be wrong. -->
+<div style="width:200px; background:red;">
+ <div style="height:50px; background:green;"></div>
+ <div style="display:inline-block; vertical-align:top; width:100px; height:150px; background:green;"></div>
+ <div id="removeMe" style="height:100px;"></div>
+ <span style="position:absolute; width:100px; height:150px; background:green;"></span>
+</div>
+<script>
+ document.body.offsetTop; // Trigger layout.
+ document.getElementById("removeMe").style.display = "none";
+</script>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/remove-block-between-inline-and-float.html b/tests/wpt/web-platform-tests/css/CSS2/floats/remove-block-between-inline-and-float.html
new file mode 100644
index 00000000000..21235d550dc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/remove-block-between-inline-and-float.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<title>Removing block between inline and float should put the two on the same line</title>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#floats" title="9.5 Floats">
+<link rel="match" href="../../reference/ref-filled-green-200px-square.html">
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<!-- This is a block with block children, so inlines need to be wrapped inside
+ anonymous blocks. A float and out-of-flow positioned box is neutral here,
+ in that it can either live among block children OR among inline
+ children. If it is (or becomes) sibling of an inline child, though, it
+ should be wrapped inside the same anonymous block as the inline, or layout
+ will be wrong. -->
+<div style="width:200px; background:red;">
+ <div style="height:50px; background:green;"></div>
+ <div style="display:inline-block; vertical-align:top; width:100px; height:150px; background:green;"></div>
+ <div id="removeMe" style="height:100px;"></div>
+ <div style="float:left; width:100px; height:150px; background:green;"></div>
+</div>
+<script>
+ document.body.offsetTop; // Trigger layout.
+ document.getElementById("removeMe").style.display = "none";
+</script>
diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/first-letter-block-to-inline-ref.html b/tests/wpt/web-platform-tests/css/css-pseudo/first-letter-block-to-inline-ref.html
new file mode 100644
index 00000000000..5c777f1a92e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-pseudo/first-letter-block-to-inline-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<span style="color:green">This text should be green.</span>
diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/first-letter-block-to-inline.html b/tests/wpt/web-platform-tests/css/css-pseudo/first-letter-block-to-inline.html
new file mode 100644
index 00000000000..94f27e6a666
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-pseudo/first-letter-block-to-inline.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<title>CSS Test: ::first-letter stops applying to element becoming inline.</title>
+<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org">
+<link rel="match" href="first-letter-block-to-inline-ref.html">
+<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-letter-pseudo">
+<style>
+ #outer.block::first-letter { color: red }
+ #outer.block { display: block }
+</style>
+<span id="outer" class="block">
+ <span id="inner">This text should be green.</span>
+</span>
+<script>
+ outer.offsetTop;
+ outer.className = "";
+ inner.style.color = "green";
+</script>
diff --git a/tests/wpt/web-platform-tests/css/cssom-view/cssom-view-window-screen-interface.html b/tests/wpt/web-platform-tests/css/cssom-view/cssom-view-window-screen-interface.html
index 7abd2e591e9..29802ac7129 100644
--- a/tests/wpt/web-platform-tests/css/cssom-view/cssom-view-window-screen-interface.html
+++ b/tests/wpt/web-platform-tests/css/cssom-view/cssom-view-window-screen-interface.html
@@ -13,15 +13,6 @@
<div id="myDiv"></div>
<div id="log"></div>
<script>
- /*test readonly*/
- test(function(){assert_readonly(window.screen, "availWidth");}, "Screen.availWidth is readonly");
- test(function(){assert_readonly(window.screen, "availHeight");}, "Screen.availHeight is readonly");
- test(function(){assert_readonly(window.screen, "width");}, "Screen.width is readonly");
- test(function(){assert_readonly(window.screen, "height");}, "Screen.height is readonly");
- test(function(){assert_readonly(window.screen, "colorDepth");}, "Screen.colorDepth is readonly");
- test(function(){assert_readonly(window.screen, "pixelDepth");}, "Screen.pixelDepth is readonly");
-
-
test(function(){assert_true(window.screen.width >= 0 && window.screen.width < 6000000);},
"window.screen.width >= 0 && window.screen.width < 6000000");
test(function(){assert_true(window.screen.height >= 0 && window.screen.height < 6000000);},
diff --git a/tests/wpt/web-platform-tests/css/cssom-view/media-query-list-interface.xht b/tests/wpt/web-platform-tests/css/cssom-view/media-query-list-interface.xht
deleted file mode 100644
index 98bdaae6ec4..00000000000
--- a/tests/wpt/web-platform-tests/css/cssom-view/media-query-list-interface.xht
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>CSSOM MediaQueryList Test: Properties and Functions</title>
- <link rel="author" title="Joe Balancio" href="mailto:jlbalancio@gmail.com" />
- <link rel="help" href="http://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface" />
- <link rel="help" href="http://www.w3.org/TR/cssom-view/#the-mediaquerylist-interface" />
- <meta name="flags" content="dom" />
- <meta name="assert" content="All properties exist and are readonly. All functions exist and are instances of Function" />
- <script src="/resources/testharness.js" type="text/javascript" />
- <script src="/resources/testharnessreport.js" type="text/javascript" />
- </head>
- <body>
- <noscript>Test not run - javascript required.</noscript>
- <div id="log" />
- <script type="text/javascript"><![CDATA[
- var mediaQueryList;
- test(
- function(){
- assert_own_property(window, "matchMedia");
- mediaQueryList = window.matchMedia('foo');
- }, 'window_exposes_matchmedia', {
- assert: ['window.matchMedia is exposed by window. If this fails, the rest of the test fails.']
- }
- );
- /*
- MediaQueryList Functions
- */
- test(
- function(){
- assert_inherits(mediaQueryList, "addListener");
- assert_inherits(mediaQueryList, "removeListener");
- }, 'mediaquerylist_inherited_functions', {
- assert: ['MediaQueryList functions are inherited']
- }
- );
-
- test(
- function(){
- assert_true(mediaQueryList.addListener instanceof Function);
- assert_true(mediaQueryList.removeListener instanceof Function);
- }, 'mediaquerylist_functions', {
- assert: ['MediaQueryList functions are instances of Function']
- }
- );
-
- /*
- MediaQueryList Properties
- */
- test(
- function() {
- assert_inherits(mediaQueryList, 'media');
- assert_inherits(mediaQueryList, 'matches');
- }, 'mediaquerylist_properties', {
- assert: ['MediaQueryList properties are inherited']
- }
- );
- test(
- function() {
- assert_readonly(mediaQueryList, 'media');
- assert_readonly(mediaQueryList, 'matches');
- }, 'mediaquerylist_properties_readonly', {
- assert: ['MediaQueryList properties are readonly']
- }
- );
- ]]>
- </script>
- </body>
-</html>
diff --git a/tests/wpt/web-platform-tests/css/cssom-view/window-interface.xht b/tests/wpt/web-platform-tests/css/cssom-view/window-interface.xht
deleted file mode 100644
index 163124b6e78..00000000000
--- a/tests/wpt/web-platform-tests/css/cssom-view/window-interface.xht
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>CSSOM Window Test: Properties and Functions</title>
- <link rel="author" title="Joe Balancio" href="mailto:jlbalancio@gmail.com" />
- <link rel="help" href="http://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface" />
- <meta name="flags" content="dom" />
- <meta name="assert" content="All properties exist and are readonly. All functions exist and are instances of Function" />
- <script src="/resources/testharness.js" type="text/javascript" />
- <script src="/resources/testharnessreport.js" type="text/javascript" />
- </head>
- <body>
- <noscript>Test not run - javascript required.</noscript>
- <div id="log" />
- <script type="text/javascript"><![CDATA[
- /*
- Window Functions
- */
- test(
- function(){
- assert_own_property(window, "matchMedia");
- assert_own_property(window, "scroll");
- assert_own_property(window, "scrollTo");
- assert_own_property(window, "scrollBy");
- }, 'window_exposed_functions', {
- assert: ['window functions are exposed']
- }
- );
-
- test(
- function(){
- assert_true(window.matchMedia instanceof Function);
- assert_true(window.scroll instanceof Function);
- assert_true(window.scrollTo instanceof Function);
- assert_true(window.scrollBy instanceof Function);
- }, 'window_functions', {
- assert: ['window functions are instances of Function']
- }
- );
-
- /*
- Window Properties
- */
- test(
- function() {
- assert_own_property(window, 'screen');
- assert_own_property(window, 'innerWidth');
- assert_own_property(window, 'innerHeight');
- assert_own_property(window, 'scrollX');
- assert_own_property(window, 'pageXOffset');
- assert_own_property(window, 'scrollY');
- assert_own_property(window, 'pageYOffset');
- assert_own_property(window, 'screenX');
- assert_own_property(window, 'screenY');
- assert_own_property(window, 'outerWidth');
- assert_own_property(window, 'outerHeight');
- }, 'window_properties', {
- assert: ['window properties are owned by window']
- }
- );
- test(
- function() {
- assert_readonly(window, 'screen');
- assert_readonly(window, 'innerWidth');
- assert_readonly(window, 'innerHeight');
- assert_readonly(window, 'scrollX');
- assert_readonly(window, 'pageXOffset');
- assert_readonly(window, 'scrollY');
- assert_readonly(window, 'pageYOffset');
- assert_readonly(window, 'screenX');
- assert_readonly(window, 'screenY');
- assert_readonly(window, 'outerWidth');
- assert_readonly(window, 'outerHeight');
- }, 'window_properties_readonly', {
- assert: ['window properties are readonly']
- }
- );
- ]]>
- </script>
- </body>
-</html>
diff --git a/tests/wpt/web-platform-tests/dom/nodes/selectors.js b/tests/wpt/web-platform-tests/dom/nodes/selectors.js
index 529eb1ed384..587779b7da0 100644
--- a/tests/wpt/web-platform-tests/dom/nodes/selectors.js
+++ b/tests/wpt/web-platform-tests/dom/nodes/selectors.js
@@ -70,7 +70,7 @@ var validSelectors = [
{name: "Type selector, matching body element", selector: "body", expect: [] /*no matches*/, exclude: ["document"], level: 1, testType: TEST_QSA},
// Universal Selector
- // Testing "*" for entire an entire context node is handled separately.
+ {name: "Universal selector, matching all elements", selector: "*", expect: ["universal", "universal-p1", "universal-code1", "universal-hr1", "universal-pre1", "universal-span1", "universal-p2", "universal-a1", "universal-address1", "universal-code2", "universal-a2"], level: 2, testType: TEST_MATCH},
{name: "Universal selector, matching all children of element with specified ID", selector: "#universal>*", expect: ["universal-p1", "universal-hr1", "universal-pre1", "universal-p2", "universal-address1"], level: 2, testType: TEST_QSA | TEST_MATCH},
{name: "Universal selector, matching all grandchildren of element with specified ID", selector: "#universal>*>*", expect: ["universal-code1", "universal-span1", "universal-a1", "universal-code2"], level: 2, testType: TEST_QSA | TEST_MATCH},
{name: "Universal selector, matching all children of empty element with specified ID", selector: "#empty>*", expect: [] /*no matches*/, level: 2, testType: TEST_QSA},
@@ -449,10 +449,6 @@ var validSelectors = [
var scopedSelectors = [
//{name: "", selector: "", ctx: "", ref: "", expect: [], level: 1, testType: TEST_FIND | TEST_MATCH},
- // Universal Selector
- {name: "Universal selector, matching all descendants of the specified reference element", selector: "*", ctx: "#universal", expect: ["universal-p1", "universal-code1", "universal-hr1", "universal-pre1", "universal-span1",
- "universal-p2", "universal-a1", "universal-address1", "universal-code2", "universal-a2"], unexpected: ["universal", "empty"], level: 2, testType: TEST_FIND | TEST_MATCH},
-
// Attribute Selectors
// - presence [att]
{name: "Attribute presence selector, matching align attribute with value", selector: ".attr-presence-div1[align]", ctx: "#attr-presence", expect: ["attr-presence-div1"], level: 2, testType: TEST_FIND | TEST_MATCH},
diff --git a/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.html b/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.html
new file mode 100644
index 00000000000..fa8a2d70eb8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.html
@@ -0,0 +1,10 @@
+<script>
+'use strict';
+
+let worker = new Worker('feature-policy-usb-worker.js');
+
+worker.onmessage = event => {
+ window.parent.postMessage(event.data, '*');
+};
+worker.postMessage({ type: 'ready' });
+</script> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.js b/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.js
new file mode 100644
index 00000000000..c294f14f3c6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.js
@@ -0,0 +1,14 @@
+'use strict';
+
+// Dedicated worker
+if (typeof postMessage === 'function') {
+ onmessage = event => {
+ switch(event.data.type) {
+ case 'ready':
+ navigator.usb.getDevices().then(
+ () => postMessage({ enabled: true }),
+ error => postMessage ({ enabled: false }));
+ break;
+ }
+ };
+} \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-iframe.html b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-iframe.html
new file mode 100644
index 00000000000..cc6a3a81bcf
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-iframe.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/get-host-info.sub.js"></script>
+</head>
+<body>
+ <script>
+const host = get_host_info();
+const remoteBaseURL = host.HTTP_REMOTE_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
+const notSameSiteBaseURL = host.HTTP_NOTSAMESITE_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
+const localBaseURL = host.HTTP_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
+
+function with_iframe(url)
+{
+ return new Promise(function(resolve) {
+ var frame = document.createElement('iframe');
+ frame.src = url;
+ frame.onload = function() { resolve(frame); };
+ document.body.appendChild(frame);
+ });
+}
+
+function loadIFrameAndFetch(iframeURL, fetchURL, expectedFetchResult, title)
+{
+ promise_test(async () => {
+ const frame = await with_iframe(iframeURL);
+ let receiveMessage;
+ const promise = new Promise((resolve, reject) => {
+ receiveMessage = (event) => {
+ if (event.data !== expectedFetchResult) {
+ reject("Received unexpected message " + event.data);
+ return;
+ }
+ resolve();
+ }
+ window.addEventListener("message", receiveMessage, false);
+ });
+ frame.contentWindow.postMessage(fetchURL, "*");
+ return promise.finally(() => {
+ frame.remove();
+ window.removeEventListener("message", receiveMessage, false);
+ });
+ }, title);
+}
+
+// This above data URL should be equivalent to resources/iframeFetch.html
+var dataIFrameURL = "data:text/html;base64,PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KICAgIDxzY3JpcHQ+CiAgICAgICAgZnVuY3Rpb24gcHJvY2Vzc01lc3NhZ2UoZXZlbnQpCiAgICAgICAgewogICAgICAgICAgICBmZXRjaChldmVudC5kYXRhLCB7IG1vZGU6ICJuby1jb3JzIiB9KS50aGVuKCgpID0+IHsKICAgICAgICAgICAgICAgIHBhcmVudC5wb3N0TWVzc2FnZSgib2siLCAiKiIpOwogICAgICAgICAgICB9LCAoKSA9PiB7CiAgICAgICAgICAgICAgICBwYXJlbnQucG9zdE1lc3NhZ2UoImtvIiwgIioiKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIiwgcHJvY2Vzc01lc3NhZ2UsIGZhbHNlKTsKICAgIDwvc2NyaXB0Pgo8L2hlYWQ+Cjxib2R5PgogICAgPGgzPlRoZSBpZnJhbWUgbWFraW5nIGEgc2FtZSBvcmlnaW4gZmV0Y2ggY2FsbC48L2gzPgo8L2JvZHk+CjwvaHRtbD4K";
+
+loadIFrameAndFetch(dataIFrameURL, localBaseURL + "resources/hello.py?corp=same-origin", "ko",
+ "Cross-origin fetch in a data: iframe load fails if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+loadIFrameAndFetch(dataIFrameURL, localBaseURL + "resources/hello.py?corp=same-site", "ko",
+ "Cross-origin fetch in a data: iframe load fails if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+loadIFrameAndFetch(remoteBaseURL + "resources/iframeFetch.html", localBaseURL + "resources/hello.py?corp=same-origin", "ko",
+ "Cross-origin fetch in a cross origin iframe load fails if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+loadIFrameAndFetch(notSameSiteBaseURL + "resources/iframeFetch.html", localBaseURL + "resources/hello.py?corp=same-site", "ko",
+ "Cross-origin fetch in a cross origin iframe load fails if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+loadIFrameAndFetch(remoteBaseURL + "resources/iframeFetch.html", remoteBaseURL + "resources/hello.py?corp=same-origin", "ok",
+ "Same-origin fetch in a cross origin iframe load succeeds if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+ </script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/fetch.html b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/fetch.html
new file mode 100644
index 00000000000..7cf8d60050a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/fetch.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/get-host-info.sub.js"></script>
+</head>
+<body>
+ <script>
+const host = get_host_info();
+const localBaseURL = host.HTTP_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
+const sameSiteBaseURL = "http://" + host.ORIGINAL_HOST + ":" + host.HTTP_PORT2 + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
+const notSameSiteBaseURL = host.HTTP_NOTSAMESITE_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
+const httpsBaseURL = host.HTTPS_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
+
+promise_test(async () => {
+ const response = await fetch("./resources/hello.py?corp=same-origin");
+ assert_equals(await response.text(), "hello");
+}, "Same-origin fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+promise_test(async () => {
+ const response = await fetch("./resources/hello.py?corp=same-site");
+ assert_equals(await response.text(), "hello");
+}, "Same-origin fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+promise_test(async (test) => {
+ const response = await fetch(notSameSiteBaseURL + "resources/hello.py?corp=same-origin");
+ assert_equals(await response.text(), "hello");
+}, "Cross-origin cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+promise_test(async (test) => {
+ const response = await fetch(notSameSiteBaseURL + "resources/hello.py?corp=same-site");
+ assert_equals(await response.text(), "hello");
+}, "Cross-origin cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+promise_test((test) => {
+ const remoteURL = notSameSiteBaseURL + "resources/hello.py?corp=same-origin";
+ return promise_rejects(test, new TypeError, fetch(remoteURL, { mode : "no-cors" }));
+}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+promise_test((test) => {
+ const remoteURL = notSameSiteBaseURL + "resources/hello.py?corp=same-site";
+ return promise_rejects(test, new TypeError, fetch(remoteURL, { mode: "no-cors" }));
+}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+promise_test((test) => {
+ const remoteURL = httpsBaseURL + "resources/hello.py?corp=same-site";
+ return fetch(remoteURL, { mode: "no-cors" });
+}, "Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+promise_test((test) => {
+ const remoteURL = httpsBaseURL + "resources/hello.py?corp=same-origin";
+ return promise_rejects(test, new TypeError, fetch(remoteURL, { mode : "no-cors" }));
+}, "Cross-origin no-cors fetch to a same-site URL with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+promise_test(async (test) => {
+ const remoteSameSiteURL = sameSiteBaseURL + "resources/hello.py?corp=same-site";
+
+ await fetch(remoteSameSiteURL, { mode: "no-cors" });
+
+ return promise_rejects(test, new TypeError, fetch(sameSiteBaseURL + "resources/hello.py?corp=same-origin", { mode: "no-cors" }));
+}, "Valid cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+promise_test((test) => {
+ const finalURL = notSameSiteBaseURL + "resources/hello.py?corp=same-origin";
+ return promise_rejects(test, new TypeError, fetch("resources/redirect.py?redirectTo=" + encodeURIComponent(finalURL), { mode: "no-cors" }));
+}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a redirection.");
+
+promise_test((test) => {
+ const finalURL = localBaseURL + "resources/hello.py?corp=same-origin";
+ return fetch(notSameSiteBaseURL + "resources/redirect.py?redirectTo=" + encodeURIComponent(finalURL), { mode: "no-cors" });
+}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' response header after a cross-origin redirection.");
+
+promise_test(async (test) => {
+ const finalURL = localBaseURL + "resources/hello.py?corp=same-origin";
+
+ await fetch(finalURL, { mode: "no-cors" });
+
+ return promise_rejects(test, new TypeError, fetch(notSameSiteBaseURL + "resources/redirect.py?corp=same-origin&redirectTo=" + encodeURIComponent(finalURL), { mode: "no-cors" }));
+}, "Cross-origin no-cors fetch with a 'Cross-Origin-Resource-Policy: same-origin' redirect response header.");
+ </script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/iframe-loads.html b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/iframe-loads.html
new file mode 100644
index 00000000000..63902c302b7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/iframe-loads.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/get-host-info.sub.js"></script>
+</head>
+<body>
+ <script>
+const host = get_host_info();
+const remoteBaseURL = host.HTTP_REMOTE_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
+const localBaseURL = host.HTTP_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
+
+function with_iframe(url) {
+ return new Promise(function(resolve) {
+ var frame = document.createElement('iframe');
+ frame.src = url;
+ frame.onload = function() { resolve(frame); };
+ document.body.appendChild(frame);
+ });
+}
+
+promise_test(async() => {
+ const url = remoteBaseURL + "resources/iframe.py?corp=same-origin";
+
+ await new Promise((resolve, reject) => {
+ return fetch(url, { mode: "no-cors" }).then(reject, resolve);
+ });
+
+ const iframe = await with_iframe(url);
+ return new Promise((resolve, reject) => {
+ window.addEventListener("message", (event) => {
+ if (event.data !== "pong") {
+ reject(event.data);
+ return;
+ }
+ resolve();
+ }, false);
+ iframe.contentWindow.postMessage("ping", "*");
+ }).finally(() => {
+ iframe.remove();
+ });
+}, "Load an iframe that has Cross-Origin-Resource-Policy header");
+ </script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/image-loads.html b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/image-loads.html
new file mode 100644
index 00000000000..8a0458f107a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/image-loads.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/get-host-info.sub.js"></script>
+</head>
+<body>
+ <div id="testDiv"></div>
+ <script>
+const host = get_host_info();
+const notSameSiteBaseURL = host.HTTP_NOTSAMESITE_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
+const ok = true;
+const ko = false;
+const noCors = false;
+
+function loadImage(url, shoudLoad, corsMode, title)
+{
+ promise_test(() => {
+ const img = new Image();
+ if (corsMode)
+ img.crossOrigin = corsMode;
+ img.src = url;
+ return new Promise((resolve, reject) => {
+ img.onload = shoudLoad ? resolve : reject;
+ img.onerror = shoudLoad ? reject : resolve;
+ testDiv.appendChild(img);
+ }).finally(() => {
+ testDiv.innerHTML = "";
+ });
+ }, title);
+}
+
+loadImage("./resources/image.py?corp=same-origin", ok, noCors,
+ "Same-origin image load with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+loadImage("./resources/image.py?corp=same-site", ok, noCors,
+ "Same-origin image load with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+loadImage(notSameSiteBaseURL + "resources/image.py?corp=same-origin&acao=*", ok, "anonymous",
+ "Cross-origin cors image load with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+loadImage(notSameSiteBaseURL + "resources/image.py?corp=same-site&acao=*", ok, "anonymous",
+ "Cross-origin cors image load with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+loadImage(notSameSiteBaseURL + "resources/image.py?corp=same-origin&acao=*", ko, noCors,
+ "Cross-origin no-cors image load with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+loadImage(notSameSiteBaseURL + "resources/image.py?corp=same-site&acao=*", ko, noCors,
+ "Cross-origin no-cors image load with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+ </script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/green.png b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/green.png
new file mode 100644
index 00000000000..28a1faab377
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/green.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/hello.py b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/hello.py
new file mode 100644
index 00000000000..2b7cb6c6fc9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/hello.py
@@ -0,0 +1,6 @@
+def main(request, response):
+ headers = [("Cross-Origin-Resource-Policy", request.GET['corp'])]
+ if 'origin' in request.headers:
+ headers.append(('Access-Control-Allow-Origin', request.headers['origin']))
+
+ return 200, headers, "hello"
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/iframe.py b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/iframe.py
new file mode 100644
index 00000000000..5872842c673
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/iframe.py
@@ -0,0 +1,5 @@
+def main(request, response):
+ headers = [("Content-Type", "text/html"),
+ ("Cross-Origin-Resource-Policy", request.GET['corp'])]
+ return 200, headers, "<body><h3>The iframe</h3><script>window.onmessage = () => { parent.postMessage('pong', '*'); }</script></body>"
+
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/iframeFetch.html b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/iframeFetch.html
new file mode 100644
index 00000000000..257185805d9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/iframeFetch.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script>
+ function processMessage(event)
+ {
+ fetch(event.data, { mode: "no-cors" }).then(() => {
+ parent.postMessage("ok", "*");
+ }, () => {
+ parent.postMessage("ko", "*");
+ });
+ }
+ window.addEventListener("message", processMessage, false);
+ </script>
+</head>
+<body>
+ <h3>The iframe making a same origin fetch call.</h3>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/image.py b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/image.py
new file mode 100644
index 00000000000..ad9295cf682
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/image.py
@@ -0,0 +1,20 @@
+import os.path
+
+def main(request, response):
+ type = request.GET.first("type", None)
+
+ body = open(os.path.join(os.path.dirname(__file__), "green.png"), "rb").read()
+
+ response.add_required_headers = False
+ response.writer.write_status(200)
+
+ if 'corp' in request.GET:
+ response.writer.write_header("cross-origin-resource-policy", request.GET['corp'])
+ if 'acao' in request.GET:
+ response.writer.write_header("access-control-allow-origin", request.GET['acao'])
+ response.writer.write_header("content-length", len(body))
+ if(type != None):
+ response.writer.write_header("content-type", type)
+ response.writer.end_headers()
+
+ response.writer.write(body)
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/redirect.py b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/redirect.py
new file mode 100644
index 00000000000..73793b07427
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/redirect.py
@@ -0,0 +1,6 @@
+def main(request, response):
+ headers = [("Location", request.GET['redirectTo'])]
+ if 'corp' in request.GET:
+ headers.append(('Cross-Origin-Resource-Policy', request.GET['corp']))
+
+ return 302, headers, ""
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/script.py b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/script.py
new file mode 100644
index 00000000000..c9bd6b9c9ee
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/script.py
@@ -0,0 +1,6 @@
+def main(request, response):
+ headers = [("Cross-Origin-Resource-Policy", request.GET['corp'])]
+ if 'origin' in request.headers:
+ headers.append(('Access-Control-Allow-Origin', request.headers['origin']))
+
+ return 200, headers, ""
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.any.js b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.any.js
new file mode 100644
index 00000000000..192572e2842
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.any.js
@@ -0,0 +1,7 @@
+// META: script=/common/get-host-info.sub.js
+
+promise_test(t => {
+ return promise_rejects(t,
+ new TypeError(),
+ fetch(get_host_info().HTTPS_REMOTE_ORIGIN + "/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-site", { mode: "no-cors" }));
+}, "Cross-Origin-Resource-Policy: same-site blocks retrieving HTTPS from HTTP");
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js
new file mode 100644
index 00000000000..4c745718741
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js
@@ -0,0 +1,13 @@
+// META: script=/common/get-host-info.sub.js
+
+promise_test(t => {
+ const img = new Image();
+ img.src = get_host_info().HTTP_REMOTE_ORIGIN + "/fetch/cross-origin-resource-policy/resources/image.py?corp=same-site";
+ return new Promise((resolve, reject) => {
+ img.onload = resolve;
+ img.onerror = reject;
+ document.body.appendChild(img);
+ }).finally(() => {
+ img.remove();
+ });
+}, "Cross-Origin-Resource-Policy does not block Mixed Content <img>");
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/script-loads.html b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/script-loads.html
new file mode 100644
index 00000000000..5850e0109f1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/script-loads.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/get-host-info.sub.js"></script>
+</head>
+<body>
+ <div id="testDiv"></div>
+ <script>
+const host = get_host_info();
+const notSameSiteBaseURL = host.HTTP_NOTSAMESITE_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
+const ok = true;
+const ko = false;
+const noCors = false;
+
+function loadScript(url, shoudLoad, corsMode, title)
+{
+ promise_test(() => {
+ const script = document.createElement("script");
+ if (corsMode)
+ script.crossOrigin = corsMode;
+ script.src = url;
+ return new Promise((resolve, reject) => {
+ script.onload = shoudLoad ? resolve : reject;
+ script.onerror = shoudLoad ? reject : resolve;
+ testDiv.appendChild(script);
+ });
+ }, title);
+}
+
+loadScript("./resources/script.py?corp=same-origin", ok, noCors,
+ "Same-origin script load with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+loadScript("./resources/script.py?corp=same-site", ok, noCors,
+ "Same-origin script load with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+loadScript(notSameSiteBaseURL + "resources/script.py?corp=same-origin&acao=*", ok, "anonymous",
+ "Cross-origin cors script load with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+loadScript(notSameSiteBaseURL + "resources/script.py?corp=same-site&acao=*", ok, "anonymous",
+ "Cross-origin cors script load with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+
+loadScript(notSameSiteBaseURL + "resources/script.py?corp=same-origin&acao=*", ko, noCors,
+ "Cross-origin no-cors script load with a 'Cross-Origin-Resource-Policy: same-origin' response header.");
+
+loadScript(notSameSiteBaseURL + "resources/script.py?corp=same-site&acao=*", ko, noCors,
+ "Cross-origin no-cors script load with a 'Cross-Origin-Resource-Policy: same-site' response header.");
+ </script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/syntax.any.js b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/syntax.any.js
new file mode 100644
index 00000000000..cf5b06d5c4f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/syntax.any.js
@@ -0,0 +1,18 @@
+// META: script=/common/get-host-info.sub.js
+
+const crossOriginURL = get_host_info().HTTP_REMOTE_ORIGIN + "/fetch/cross-origin-resource-policy/resources/hello.py?corp=";
+
+[
+ "same",
+ "same, same-origin",
+ "SAME-ORIGIN",
+ "Same-Origin",
+ "same-origin, <>",
+ "same-origin, same-origin"
+].forEach(incorrectHeaderValue => {
+ // Note: an incorrect value results in a successful load, so this test is only meaningful in
+ // implementations with support for the header.
+ promise_test(t => {
+ return fetch(crossOriginURL + encodeURIComponent(incorrectHeaderValue), { mode: "no-cors" });
+ }, "Parsing Cross-Origin-Resource-Policy: " + incorrectHeaderValue);
+});
diff --git a/tests/wpt/web-platform-tests/input-device-capabilities/META.yml b/tests/wpt/web-platform-tests/input-device-capabilities/META.yml
new file mode 100644
index 00000000000..2d6845a47e5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/input-device-capabilities/META.yml
@@ -0,0 +1,3 @@
+suggested_reviewers:
+ - SummerLW
+ - NavidZ
diff --git a/tests/wpt/web-platform-tests/input-device-capabilities/OWNERS b/tests/wpt/web-platform-tests/input-device-capabilities/OWNERS
deleted file mode 100644
index 097ba63e510..00000000000
--- a/tests/wpt/web-platform-tests/input-device-capabilities/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-@SummerLW
-@NavidZ
diff --git a/tests/wpt/web-platform-tests/interfaces/pointerevents-extension.idl b/tests/wpt/web-platform-tests/interfaces/pointerevents-extension.idl
new file mode 100644
index 00000000000..63a05a58dd6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/interfaces/pointerevents-extension.idl
@@ -0,0 +1,8 @@
+dictionary PointerEventInit : MouseEventInit {
+ sequence<PointerEvent> coalescedEvents;
+};
+
+[Constructor(DOMString type, optional PointerEventInit eventInitDict)]
+interface PointerEvent : MouseEvent {
+ sequence<PointerEvent> getCoalescedEvents();
+};
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/green-100x50.png b/tests/wpt/web-platform-tests/offscreen-canvas/green-100x50.png
new file mode 100644
index 00000000000..2733836c998
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/green-100x50.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.default.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.default.html
new file mode 100644
index 00000000000..91f6ed3f6af
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.default.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.align.default</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.align.default</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.default.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.default.worker.js
new file mode 100644
index 00000000000..7f59ae9b510
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.default.worker.js
@@ -0,0 +1,20 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.align.default
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.invalid.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.invalid.html
new file mode 100644
index 00000000000..bed45de4dbe
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.invalid.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.align.invalid</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.align.invalid</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'bogus';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'END';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'end ';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'end\0';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.invalid.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.invalid.worker.js
new file mode 100644
index 00000000000..a2697856cb3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.invalid.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.align.invalid
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'bogus';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'END';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'end ';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'start';
+ctx.textAlign = 'end\0';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.valid.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.valid.html
new file mode 100644
index 00000000000..d96bdbf023d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.valid.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.align.valid</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.align.valid</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textAlign = 'start';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'end';
+_assertSame(ctx.textAlign, 'end', "ctx.textAlign", "'end'");
+
+ctx.textAlign = 'left';
+_assertSame(ctx.textAlign, 'left', "ctx.textAlign", "'left'");
+
+ctx.textAlign = 'right';
+_assertSame(ctx.textAlign, 'right', "ctx.textAlign", "'right'");
+
+ctx.textAlign = 'center';
+_assertSame(ctx.textAlign, 'center', "ctx.textAlign", "'center'");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.valid.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.valid.worker.js
new file mode 100644
index 00000000000..478d4543ae1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.align.valid.worker.js
@@ -0,0 +1,33 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.align.valid
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textAlign = 'start';
+_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'");
+
+ctx.textAlign = 'end';
+_assertSame(ctx.textAlign, 'end', "ctx.textAlign", "'end'");
+
+ctx.textAlign = 'left';
+_assertSame(ctx.textAlign, 'left', "ctx.textAlign", "'left'");
+
+ctx.textAlign = 'right';
+_assertSame(ctx.textAlign, 'right', "ctx.textAlign", "'right'");
+
+ctx.textAlign = 'center';
+_assertSame(ctx.textAlign, 'center', "ctx.textAlign", "'center'");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.default.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.default.html
new file mode 100644
index 00000000000..f2fe1101451
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.default.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.baseline.default</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.baseline.default</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.default.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.default.worker.js
new file mode 100644
index 00000000000..a475fa341f9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.default.worker.js
@@ -0,0 +1,20 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.baseline.default
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.invalid.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.invalid.html
new file mode 100644
index 00000000000..0ff3b18dd52
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.invalid.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.baseline.invalid</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.baseline.invalid</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'bogus';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'MIDDLE';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'middle ';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'middle\0';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.invalid.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.invalid.worker.js
new file mode 100644
index 00000000000..377799b50bf
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.invalid.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.baseline.invalid
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'bogus';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'MIDDLE';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'middle ';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'top';
+ctx.textBaseline = 'middle\0';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.valid.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.valid.html
new file mode 100644
index 00000000000..cd635ec4867
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.valid.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.baseline.valid</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.baseline.valid</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textBaseline = 'top';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'hanging';
+_assertSame(ctx.textBaseline, 'hanging', "ctx.textBaseline", "'hanging'");
+
+ctx.textBaseline = 'middle';
+_assertSame(ctx.textBaseline, 'middle', "ctx.textBaseline", "'middle'");
+
+ctx.textBaseline = 'alphabetic';
+_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'");
+
+ctx.textBaseline = 'ideographic';
+_assertSame(ctx.textBaseline, 'ideographic', "ctx.textBaseline", "'ideographic'");
+
+ctx.textBaseline = 'bottom';
+_assertSame(ctx.textBaseline, 'bottom', "ctx.textBaseline", "'bottom'");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.valid.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.valid.worker.js
new file mode 100644
index 00000000000..1440c38cffc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.baseline.valid.worker.js
@@ -0,0 +1,36 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.baseline.valid
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.textBaseline = 'top';
+_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'");
+
+ctx.textBaseline = 'hanging';
+_assertSame(ctx.textBaseline, 'hanging', "ctx.textBaseline", "'hanging'");
+
+ctx.textBaseline = 'middle';
+_assertSame(ctx.textBaseline, 'middle', "ctx.textBaseline", "'middle'");
+
+ctx.textBaseline = 'alphabetic';
+_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'");
+
+ctx.textBaseline = 'ideographic';
+_assertSame(ctx.textBaseline, 'ideographic', "ctx.textBaseline", "'ideographic'");
+
+ctx.textBaseline = 'bottom';
+_assertSame(ctx.textBaseline, 'bottom', "ctx.textBaseline", "'bottom'");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.center.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.center.html
new file mode 100644
index 00000000000..48e0cb36d8b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.center.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.center</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.center</h1>
+<p class="desc">textAlign center is the center of the em squares (not the bounding box)</p>
+
+
+<script>
+var t = async_test("textAlign center is the center of the em squares (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'center';
+ ctx.fillText('DD', 50, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.center.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.center.worker.js
new file mode 100644
index 00000000000..88d77c1e189
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.center.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.center
+// Description:textAlign center is the center of the em squares (not the bounding box)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign center is the center of the em squares (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'center';
+ ctx.fillText('DD', 50, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.ltr.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.ltr.html
new file mode 100644
index 00000000000..6356b3be89f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.ltr.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.end.ltr</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.end.ltr</h1>
+<p class="desc">textAlign end with ltr is the right edge</p>
+
+
+<script>
+var t = async_test("textAlign end with ltr is the right edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'end';
+ ctx.fillText('DD', 100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.ltr.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.ltr.worker.js
new file mode 100644
index 00000000000..58e6ffae955
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.ltr.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.end.ltr
+// Description:textAlign end with ltr is the right edge
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign end with ltr is the right edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'end';
+ ctx.fillText('DD', 100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.rtl.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.rtl.html
new file mode 100644
index 00000000000..b60a85cbaa3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.rtl.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.end.rtl</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.end.rtl</h1>
+<p class="desc">textAlign end with rtl is the left edge</p>
+
+
+<script>
+var t = async_test("textAlign end with rtl is the left edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'end';
+ ctx.fillText('DD', 0, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.rtl.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.rtl.worker.js
new file mode 100644
index 00000000000..66f03acaa75
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.end.rtl.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.end.rtl
+// Description:textAlign end with rtl is the left edge
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign end with rtl is the left edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'end';
+ ctx.fillText('DD', 0, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.left.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.left.html
new file mode 100644
index 00000000000..164b02af434
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.left.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.left</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.left</h1>
+<p class="desc">textAlign left is the left of the first em square (not the bounding box)</p>
+
+
+<script>
+var t = async_test("textAlign left is the left of the first em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'left';
+ ctx.fillText('DD', 0, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.left.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.left.worker.js
new file mode 100644
index 00000000000..725762a8adc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.left.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.left
+// Description:textAlign left is the left of the first em square (not the bounding box)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign left is the left of the first em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'left';
+ ctx.fillText('DD', 0, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.right.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.right.html
new file mode 100644
index 00000000000..5621161d4aa
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.right.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.right</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.right</h1>
+<p class="desc">textAlign right is the right of the last em square (not the bounding box)</p>
+
+
+<script>
+var t = async_test("textAlign right is the right of the last em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'right';
+ ctx.fillText('DD', 100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.right.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.right.worker.js
new file mode 100644
index 00000000000..70a39a3186a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.right.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.right
+// Description:textAlign right is the right of the last em square (not the bounding box)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign right is the right of the last em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'right';
+ ctx.fillText('DD', 100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.ltr.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.ltr.html
new file mode 100644
index 00000000000..130474e7369
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.ltr.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.start.ltr</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.start.ltr</h1>
+<p class="desc">textAlign start with ltr is the left edge</p>
+
+
+<script>
+var t = async_test("textAlign start with ltr is the left edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'start';
+ ctx.fillText('DD', 0, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.ltr.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.ltr.worker.js
new file mode 100644
index 00000000000..ebc06542e31
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.ltr.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.start.ltr
+// Description:textAlign start with ltr is the left edge
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign start with ltr is the left edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'start';
+ ctx.fillText('DD', 0, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.rtl.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.rtl.html
new file mode 100644
index 00000000000..05372ee25ae
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.rtl.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.align.start.rtl</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.align.start.rtl</h1>
+<p class="desc">textAlign start with rtl is the right edge</p>
+
+
+<script>
+var t = async_test("textAlign start with rtl is the right edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'start';
+ ctx.fillText('DD', 100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.rtl.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.rtl.worker.js
new file mode 100644
index 00000000000..dc551e4abf2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.align.start.rtl.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.align.start.rtl
+// Description:textAlign start with rtl is the right edge
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textAlign start with rtl is the right edge");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'start';
+ ctx.fillText('DD', 100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.html
new file mode 100644
index 00000000000..2413fe55ed2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.baseline.alphabetic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.baseline.alphabetic</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'alphabetic';
+ ctx.fillText('CC', 0, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.worker.js
new file mode 100644
index 00000000000..2683272aa67
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.alphabetic.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.baseline.alphabetic
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'alphabetic';
+ ctx.fillText('CC', 0, 37.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.bottom.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.bottom.html
new file mode 100644
index 00000000000..5fa9418338f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.bottom.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.baseline.bottom</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.baseline.bottom</h1>
+<p class="desc">textBaseline bottom is the bottom of the em square (not the bounding box)</p>
+
+
+<script>
+var t = async_test("textBaseline bottom is the bottom of the em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'bottom';
+ ctx.fillText('CC', 0, 50);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.bottom.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.bottom.worker.js
new file mode 100644
index 00000000000..3ba60c966be
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.bottom.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.baseline.bottom
+// Description:textBaseline bottom is the bottom of the em square (not the bounding box)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textBaseline bottom is the bottom of the em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'bottom';
+ ctx.fillText('CC', 0, 50);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.hanging.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.hanging.html
new file mode 100644
index 00000000000..e3f9cf34df2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.hanging.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.baseline.hanging</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.baseline.hanging</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'hanging';
+ ctx.fillText('CC', 0, 12.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.hanging.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.hanging.worker.js
new file mode 100644
index 00000000000..b4773e8ab8d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.hanging.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.baseline.hanging
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'hanging';
+ ctx.fillText('CC', 0, 12.5);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.ideographic.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.ideographic.html
new file mode 100644
index 00000000000..59865c3bcb8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.ideographic.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.baseline.ideographic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.baseline.ideographic</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'ideographic';
+ ctx.fillText('CC', 0, 31.25);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.ideographic.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.ideographic.worker.js
new file mode 100644
index 00000000000..ada7fe9c5b6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.ideographic.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.baseline.ideographic
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'ideographic';
+ ctx.fillText('CC', 0, 31.25);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.middle.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.middle.html
new file mode 100644
index 00000000000..71799da7bf3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.middle.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.baseline.middle</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.baseline.middle</h1>
+<p class="desc">textBaseline middle is the middle of the em square (not the bounding box)</p>
+
+
+<script>
+var t = async_test("textBaseline middle is the middle of the em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'middle';
+ ctx.fillText('CC', 0, 25);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.middle.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.middle.worker.js
new file mode 100644
index 00000000000..12c768a70dd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.middle.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.baseline.middle
+// Description:textBaseline middle is the middle of the em square (not the bounding box)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textBaseline middle is the middle of the em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'middle';
+ ctx.fillText('CC', 0, 25);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.top.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.top.html
new file mode 100644
index 00000000000..2fcce4ac32f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.top.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.baseline.top</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.baseline.top</h1>
+<p class="desc">textBaseline top is the top of the em square (not the bounding box)</p>
+
+
+<script>
+var t = async_test("textBaseline top is the top of the em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'top';
+ ctx.fillText('CC', 0, 0);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.top.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.top.worker.js
new file mode 100644
index 00000000000..078255acf6c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.baseline.top.worker.js
@@ -0,0 +1,34 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.baseline.top
+// Description:textBaseline top is the top of the em square (not the bounding box)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("textBaseline top is the top of the em square (not the bounding box)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'top';
+ ctx.fillText('CC', 0, 0);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,45, 0,255,0,255, "95,45", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.basic-manual.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.basic-manual.html
new file mode 100644
index 00000000000..ed267be901a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.basic-manual.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.basic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.basic</h1>
+<p class="desc">fillText draws filled text</p>
+
+
+<script>
+var t = async_test("fillText draws filled text");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('PASS', 5, 35);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.basic-manual.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.basic-manual.worker.js
new file mode 100644
index 00000000000..bd7f7e2638b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.basic-manual.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.basic
+// Description:fillText draws filled text
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText draws filled text");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('PASS', 5, 35);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.basic.png b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.basic.png
new file mode 100644
index 00000000000..70d7b046cb2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.basic.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.html
new file mode 100644
index 00000000000..f66b7357619
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.NaN</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.NaN</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+
+<script>
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, NaN);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.worker.js
new file mode 100644
index 00000000000..49a4f6bd5d1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.NaN.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.NaN
+// Description:fillText handles maxWidth correctly
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, NaN);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.html
new file mode 100644
index 00000000000..c74895563df
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.bound</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.bound</h1>
+<p class="desc">fillText handles maxWidth based on line size, not bounding box size</p>
+
+
+<script>
+var t = async_test("fillText handles maxWidth based on line size, not bounding box size");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('DD', 0, 37.5, 100);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.worker.js
new file mode 100644
index 00000000000..fdbab5b986b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.bound.worker.js
@@ -0,0 +1,31 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.bound
+// Description:fillText handles maxWidth based on line size, not bounding box size
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText handles maxWidth based on line size, not bounding box size");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('DD', 0, 37.5, 100);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.html
new file mode 100644
index 00000000000..936de46cc59
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.fontface</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.fontface</h1>
+<p class="desc">fillText works on @font-face fonts</p>
+
+
+<script>
+var t = async_test("fillText works on @font-face fonts");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillText('EEEE', -50, 37.5, 40);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.worker.js
new file mode 100644
index 00000000000..3a5b4b742d4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.fontface.worker.js
@@ -0,0 +1,31 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.fontface
+// Description:fillText works on @font-face fonts
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText works on @font-face fonts");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillText('EEEE', -50, 37.5, 40);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html
new file mode 100644
index 00000000000..e463d4e5520
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.large</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.large</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+
+<script>
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('PASS', 5, 35, 200);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.worker.js
new file mode 100644
index 00000000000..e99e56eb566
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.worker.js
@@ -0,0 +1,24 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.large
+// Description:fillText handles maxWidth correctly
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('PASS', 5, 35, 200);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large.png b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large.png
new file mode 100644
index 00000000000..70d7b046cb2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.html
new file mode 100644
index 00000000000..c5947d8882f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.negative</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.negative</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+
+<script>
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, -1);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.worker.js
new file mode 100644
index 00000000000..5302fde8342
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.negative.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.negative
+// Description:fillText handles maxWidth correctly
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, -1);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.html
new file mode 100644
index 00000000000..04cb3edf69e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.small</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.small</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+
+<script>
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', -100, 35, 90);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.worker.js
new file mode 100644
index 00000000000..73c49240521
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.small.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.small
+// Description:fillText handles maxWidth correctly
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', -100, 35, 90);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.html
new file mode 100644
index 00000000000..77c9d05d84a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.zero</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.maxWidth.zero</h1>
+<p class="desc">fillText handles maxWidth correctly</p>
+
+
+<script>
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, 0);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.worker.js
new file mode 100644
index 00000000000..d3229177512
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.zero.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.maxWidth.zero
+// Description:fillText handles maxWidth correctly
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText handles maxWidth correctly");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('fail fail fail fail fail', 5, 35, 0);
+_assertGreen(ctx, 100, 50);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.html
new file mode 100644
index 00000000000..fa61f29d4d6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.rtl</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.rtl</h1>
+<p class="desc">fillText respects Right-To-Left Override characters</p>
+
+
+<script>
+var t = async_test("fillText respects Right-To-Left Override characters");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.worker.js
new file mode 100644
index 00000000000..f5bd24718fb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.rtl-manual.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.rtl
+// Description:fillText respects Right-To-Left Override characters
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText respects Right-To-Left Override characters");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#0f0';
+ctx.strokeStyle = '#f00';
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.rtl.png b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.rtl.png
new file mode 100644
index 00000000000..70d7b046cb2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.rtl.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.unaffected.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.unaffected.html
new file mode 100644
index 00000000000..5d2ee756de0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.unaffected.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fill.unaffected</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fill.unaffected</h1>
+<p class="desc">fillText does not start a new path or subpath</p>
+
+
+<script>
+var t = async_test("fillText does not start a new path or subpath");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('FAIL', 5, 35);
+
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+
+_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.unaffected.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.unaffected.worker.js
new file mode 100644
index 00000000000..8be9c0bde33
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.unaffected.worker.js
@@ -0,0 +1,35 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fill.unaffected
+// Description:fillText does not start a new path or subpath
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("fillText does not start a new path or subpath");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+
+ctx.font = '35px Arial, sans-serif';
+ctx.fillText('FAIL', 5, 35);
+
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+
+_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.html
new file mode 100644
index 00000000000..f66be6ccf7c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fontface</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fontface</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '67px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('AA', 0, 50);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.notinpage.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.notinpage.html
new file mode 100644
index 00000000000..5e088c64de8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.notinpage.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fontface.notinpage</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fontface.notinpage</h1>
+<p class="desc">@font-face fonts should work even if they are not used in the page</p>
+
+
+<script>
+var t = async_test("@font-face fonts should work even if they are not used in the page");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '67px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('AA', 0, 50);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.notinpage.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.notinpage.worker.js
new file mode 100644
index 00000000000..66e65408d7a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.notinpage.worker.js
@@ -0,0 +1,31 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fontface.notinpage
+// Description:@font-face fonts should work even if they are not used in the page
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("@font-face fonts should work even if they are not used in the page");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '67px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('AA', 0, 50);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.repeat.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.repeat.html
new file mode 100644
index 00000000000..922f74e0741
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.repeat.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.fontface.repeat</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.fontface.repeat</h1>
+<p class="desc">Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)</p>
+
+
+<script>
+var t = async_test("Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.font = '67px CanvasTest';
+ctx.fillStyle = '#0f0';
+ctx.fillText('AA', 0, 50);
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillText('AA', 0, 50);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.repeat.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.repeat.worker.js
new file mode 100644
index 00000000000..c15ee9ad857
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.repeat.worker.js
@@ -0,0 +1,32 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fontface.repeat
+// Description:Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+ctx.font = '67px CanvasTest';
+ctx.fillStyle = '#0f0';
+ctx.fillText('AA', 0, 50);
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillText('AA', 0, 50);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.worker.js
new file mode 100644
index 00000000000..13637c7cb12
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fontface.worker.js
@@ -0,0 +1,31 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.fontface
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '67px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('AA', 0, 50);
+ _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 95,5, 0,255,0,255, "95,5", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.html
new file mode 100644
index 00000000000..da70c505df2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.kern.consistent</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.kern.consistent</h1>
+<p class="desc">Stroked and filled text should have exactly the same kerning so it overlaps</p>
+
+
+<script>
+var t = async_test("Stroked and filled text should have exactly the same kerning so it overlaps");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 3;
+ctx.font = '20px Arial, sans-serif';
+ctx.fillText('VAVAVAVAVAVAVA', -50, 25);
+ctx.fillText('ToToToToToToTo', -50, 45);
+ctx.strokeText('VAVAVAVAVAVAVA', -50, 25);
+ctx.strokeText('ToToToToToToTo', -50, 45);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.worker.js
new file mode 100644
index 00000000000..46808a8b472
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.kern.consistent-manual.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.kern.consistent
+// Description:Stroked and filled text should have exactly the same kerning so it overlaps
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Stroked and filled text should have exactly the same kerning so it overlaps");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.fillStyle = '#f00';
+ctx.strokeStyle = '#0f0';
+ctx.lineWidth = 3;
+ctx.font = '20px Arial, sans-serif';
+ctx.fillText('VAVAVAVAVAVAVA', -50, 25);
+ctx.fillText('ToToToToToToTo', -50, 45);
+ctx.strokeText('VAVAVAVAVAVAVA', -50, 25);
+ctx.strokeText('ToToToToToToTo', -50, 45);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.basic.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.basic.html
new file mode 100644
index 00000000000..60a388dee2c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.basic.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.space.basic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.space.basic</h1>
+<p class="desc">U+0020 is rendered the correct size (1em wide)</p>
+
+
+<script>
+var t = async_test("U+0020 is rendered the correct size (1em wide)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('E EE', -100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.basic.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.basic.worker.js
new file mode 100644
index 00000000000..3d539e9ea96
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.basic.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.space.basic
+// Description:U+0020 is rendered the correct size (1em wide)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("U+0020 is rendered the correct size (1em wide)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('E EE', -100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.end.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.end.html
new file mode 100644
index 00000000000..0d44a0df95f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.end.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.space.collapse.end</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.space.collapse.end</h1>
+<p class="desc">Space characters at the end of a line are collapsed (per CSS)</p>
+
+
+<script>
+var t = async_test("Space characters at the end of a line are collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'right';
+ ctx.fillText('EE ', 100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.end.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.end.worker.js
new file mode 100644
index 00000000000..609bfaecff6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.end.worker.js
@@ -0,0 +1,30 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.end
+// Description:Space characters at the end of a line are collapsed (per CSS)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Space characters at the end of a line are collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'right';
+ ctx.fillText('EE ', 100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.html
new file mode 100644
index 00000000000..a596c51c2b7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.space.collapse.nonspace</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.space.collapse.nonspace</h1>
+<p class="desc">Non-space characters are not converted to U+0020 and collapsed</p>
+
+
+<script>
+var t = async_test("Non-space characters are not converted to U+0020 and collapsed");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('E\x0b EE', -150, 37.5);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.worker.js
new file mode 100644
index 00000000000..8822dbfac18
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.nonspace.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.nonspace
+// Description:Non-space characters are not converted to U+0020 and collapsed
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Non-space characters are not converted to U+0020 and collapsed");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('E\x0b EE', -150, 37.5);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.other.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.other.html
new file mode 100644
index 00000000000..d7db23cb4ee
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.other.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.space.collapse.other</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.space.collapse.other</h1>
+<p class="desc">Space characters are converted to U+0020, and collapsed (per CSS)</p>
+
+
+<script>
+var t = async_test("Space characters are converted to U+0020, and collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('E \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dEE', -100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.other.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.other.worker.js
new file mode 100644
index 00000000000..c6602350d81
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.other.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.other
+// Description:Space characters are converted to U+0020, and collapsed (per CSS)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Space characters are converted to U+0020, and collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('E \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dEE', -100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.space.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.space.html
new file mode 100644
index 00000000000..4c1a5a4c852
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.space.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.space.collapse.space</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.space.collapse.space</h1>
+<p class="desc">Space characters are converted to U+0020, and collapsed (per CSS)</p>
+
+
+<script>
+var t = async_test("Space characters are converted to U+0020, and collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('E EE', -100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.space.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.space.worker.js
new file mode 100644
index 00000000000..98d6924481f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.space.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.space
+// Description:Space characters are converted to U+0020, and collapsed (per CSS)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Space characters are converted to U+0020, and collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('E EE', -100, 37.5);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.start.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.start.html
new file mode 100644
index 00000000000..1a73b941d36
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.start.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.space.collapse.start</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.space.collapse.start</h1>
+<p class="desc">Space characters at the start of a line are collapsed (per CSS)</p>
+
+
+<script>
+var t = async_test("Space characters at the start of a line are collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText(' EE', 0, 37.5);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.start.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.start.worker.js
new file mode 100644
index 00000000000..eded1a88070
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.space.collapse.start.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.space.collapse.start
+// Description:Space characters at the start of a line are collapsed (per CSS)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Space characters at the start of a line are collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '50px CanvasTest';
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText(' EE', 0, 37.5);
+ _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2);
+ _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2);
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.html
new file mode 100644
index 00000000000..35cb1a5c809
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.stroke.basic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.stroke.basic</h1>
+<p class="desc">strokeText draws stroked text</p>
+
+
+<script>
+var t = async_test("strokeText draws stroked text");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.fillStyle = '#f00';
+ctx.lineWidth = 1;
+ctx.font = '35px Arial, sans-serif';
+ctx.strokeText('PASS', 5, 35);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.worker.js
new file mode 100644
index 00000000000..a09a1eaeea5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.basic-manual.worker.js
@@ -0,0 +1,26 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.stroke.basic
+// Description:strokeText draws stroked text
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("strokeText draws stroked text");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#000';
+ctx.fillRect(0, 0, 100, 50);
+ctx.strokeStyle = '#0f0';
+ctx.fillStyle = '#f00';
+ctx.lineWidth = 1;
+ctx.font = '35px Arial, sans-serif';
+ctx.strokeText('PASS', 5, 35);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.basic.png b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.basic.png
new file mode 100644
index 00000000000..fb3b5b830d3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.basic.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.unaffected.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.unaffected.html
new file mode 100644
index 00000000000..1cac65cd437
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.unaffected.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.draw.stroke.unaffected</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.draw.stroke.unaffected</h1>
+<p class="desc">strokeText does not start a new path or subpath</p>
+
+
+<script>
+var t = async_test("strokeText does not start a new path or subpath");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+
+ctx.font = '35px Arial, sans-serif';
+ctx.strokeStyle = '#f00';
+ctx.strokeText('FAIL', 5, 35);
+
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+
+_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.unaffected.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.unaffected.worker.js
new file mode 100644
index 00000000000..7921f8a5900
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.stroke.unaffected.worker.js
@@ -0,0 +1,36 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.draw.stroke.unaffected
+// Description:strokeText does not start a new path or subpath
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("strokeText does not start a new path or subpath");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.fillStyle = '#f00';
+ctx.fillRect(0, 0, 100, 50);
+
+ctx.moveTo(0, 0);
+ctx.lineTo(100, 0);
+
+ctx.font = '35px Arial, sans-serif';
+ctx.strokeStyle = '#f00';
+ctx.strokeText('FAIL', 5, 35);
+
+ctx.lineTo(100, 50);
+ctx.lineTo(0, 50);
+ctx.fillStyle = '#0f0';
+ctx.fill();
+
+_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+_assertPixel(offscreenCanvas, 5,45, 0,255,0,255, "5,45", "0,255,0,255");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.default.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.default.html
new file mode 100644
index 00000000000..736c1ab9e27
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.default.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.font.default</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.font.default</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+_assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.default.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.default.worker.js
new file mode 100644
index 00000000000..cad656e25d0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.default.worker.js
@@ -0,0 +1,20 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.font.default
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+_assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.basic.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.basic.html
new file mode 100644
index 00000000000..b369e0e39d1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.basic.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.font.parse.basic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.font.parse.basic</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '20px serif';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20PX SERIF';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.basic.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.basic.worker.js
new file mode 100644
index 00000000000..2a3d93d7c90
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.basic.worker.js
@@ -0,0 +1,24 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.font.parse.basic
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '20px serif';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20PX SERIF';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.complex.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.complex.html
new file mode 100644
index 00000000000..a45f73729df
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.complex.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.font.parse.complex</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.font.parse.complex</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif';
+_assertSame(ctx.font, 'italic small-caps 12px "Unknown Font", sans-serif', "ctx.font", "'italic small-caps 12px \"Unknown Font\", sans-serif'");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.complex.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.complex.worker.js
new file mode 100644
index 00000000000..62cc6ede272
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.complex.worker.js
@@ -0,0 +1,21 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.font.parse.complex
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif';
+_assertSame(ctx.font, 'italic small-caps 12px "Unknown Font", sans-serif', "ctx.font", "'italic small-caps 12px \"Unknown Font\", sans-serif'");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.invalid.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.invalid.html
new file mode 100644
index 00000000000..bd610ff3348
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.invalid.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.font.parse.invalid</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.font.parse.invalid</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '20px serif';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = 'bogus';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = 'inherit';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px {bogus}';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px initial';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px default';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px inherit';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '1em serif; background: green; margin: 10px';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.invalid.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.invalid.worker.js
new file mode 100644
index 00000000000..72815988ade
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.invalid.worker.js
@@ -0,0 +1,49 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.font.parse.invalid
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '20px serif';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = 'bogus';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = 'inherit';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px {bogus}';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px initial';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px default';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '10px inherit';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+ctx.font = '20px serif';
+ctx.font = '1em serif; background: green; margin: 10px';
+_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.system.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.system.html
new file mode 100644
index 00000000000..a3dd448aab5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.system.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.font.parse.system</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.font.parse.system</h1>
+<p class="desc">System fonts must be computed to explicit values</p>
+
+
+<script>
+var t = async_test("System fonts must be computed to explicit values");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = 'message-box';
+_assertDifferent(ctx.font, 'message-box', "ctx.font", "'message-box'");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.system.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.system.worker.js
new file mode 100644
index 00000000000..0b5bcfc26c3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.system.worker.js
@@ -0,0 +1,21 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.font.parse.system
+// Description:System fonts must be computed to explicit values
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("System fonts must be computed to explicit values");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = 'message-box';
+_assertDifferent(ctx.font, 'message-box', "ctx.font", "'message-box'");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.tiny.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.tiny.html
new file mode 100644
index 00000000000..350ad23c15e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.tiny.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.font.parse.tiny</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.font.parse.tiny</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '1px sans-serif';
+_assertSame(ctx.font, '1px sans-serif', "ctx.font", "'1px sans-serif'");
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.tiny.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.tiny.worker.js
new file mode 100644
index 00000000000..11a96dcd745
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.font.parse.tiny.worker.js
@@ -0,0 +1,21 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.font.parse.tiny
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.font = '1px sans-serif';
+_assertSame(ctx.font, '1px sans-serif', "ctx.font", "'1px sans-serif'");
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.basic.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.basic.html
new file mode 100644
index 00000000000..a01c1099ebc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.basic.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.measure.width.basic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.measure.width.basic</h1>
+<p class="desc"></p>
+
+
+<script>
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ _assertSame(ctx.measureText('A').width, 50, "ctx.measureText('A').width", "50");
+ _assertSame(ctx.measureText('AA').width, 100, "ctx.measureText('AA').width", "100");
+ _assertSame(ctx.measureText('ABCD').width, 200, "ctx.measureText('ABCD').width", "200");
+
+ ctx.font = '100px CanvasTest';
+ _assertSame(ctx.measureText('A').width, 100, "ctx.measureText('A').width", "100");
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.basic.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.basic.worker.js
new file mode 100644
index 00000000000..b4ca23b2a40
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.basic.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.measure.width.basic
+// Description:
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ _assertSame(ctx.measureText('A').width, 50, "ctx.measureText('A').width", "50");
+ _assertSame(ctx.measureText('AA').width, 100, "ctx.measureText('AA').width", "100");
+ _assertSame(ctx.measureText('ABCD').width, 200, "ctx.measureText('ABCD').width", "200");
+
+ ctx.font = '100px CanvasTest';
+ _assertSame(ctx.measureText('A').width, 100, "ctx.measureText('A').width", "100");
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.empty.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.empty.html
new file mode 100644
index 00000000000..6173d183ca2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.empty.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.measure.width.empty</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.measure.width.empty</h1>
+<p class="desc">The empty string has zero width</p>
+
+
+<script>
+var t = async_test("The empty string has zero width");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0");
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.empty.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.empty.worker.js
new file mode 100644
index 00000000000..d9c71afafa6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.empty.worker.js
@@ -0,0 +1,24 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.measure.width.empty
+// Description:The empty string has zero width
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("The empty string has zero width");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0");
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.space.html b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.space.html
new file mode 100644
index 00000000000..b4cdc8b0c6b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.space.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.text.measure.width.space</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+
+<h1>2d.text.measure.width.space</h1>
+<p class="desc">Space characters are converted to U+0020 and collapsed (per CSS)</p>
+
+
+<script>
+var t = async_test("Space characters are converted to U+0020 and collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
+ _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
+ _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d \\x09\\x0a\\x0c\\x0dB').width", "150");
+ _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200");
+
+ _assertSame(ctx.measureText(' AB').width, 100, "ctx.measureText(' AB').width", "100");
+ _assertSame(ctx.measureText('AB ').width, 100, "ctx.measureText('AB ').width", "100");
+}), 500);
+
+t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.space.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.space.worker.js
new file mode 100644
index 00000000000..5fc91b84882
--- /dev/null
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.measure.width.space.worker.js
@@ -0,0 +1,30 @@
+// DO NOT EDIT! This test has been generated by tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.text.measure.width.space
+// Description:Space characters are converted to U+0020 and collapsed (per CSS)
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/common/canvas-tests.js");
+
+var t = async_test("Space characters are converted to U+0020 and collapsed (per CSS)");
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
+ _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
+ _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d \\x09\\x0a\\x0c\\x0dB').width", "150");
+ _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200");
+
+ _assertSame(ctx.measureText(' AB').width, 100, "ctx.measureText(' AB').width", "100");
+ _assertSame(ctx.measureText('AB ').width, 100, "ctx.measureText('AB ').width", "100");
+}), 500);
+
+t.done();
+
+});
+done();
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/tools/name2dir.yaml b/tests/wpt/web-platform-tests/offscreen-canvas/tools/name2dir.yaml
index 9c6e05453af..6c51e2b8d40 100644
--- a/tests/wpt/web-platform-tests/offscreen-canvas/tools/name2dir.yaml
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/tools/name2dir.yaml
@@ -13,6 +13,7 @@
2d.imageData: "pixel-manipulation"
2d.line: "line-styles"
2d.path: "path-objects"
+2d.text: "text"
2d.coordinatespace: "conformance-requirements"
2d.missingargs: "conformance-requirements"
2d.voidreturn: "conformance-requirements"
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/tools/templates.yaml b/tests/wpt/web-platform-tests/offscreen-canvas/tools/templates.yaml
index 35740965b0c..e66f17dedd7 100644
--- a/tests/wpt/web-platform-tests/offscreen-canvas/tools/templates.yaml
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/tools/templates.yaml
@@ -44,4 +44,3 @@ w3cworker: |
});
done();
-
diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/tools/tests2d.yaml b/tests/wpt/web-platform-tests/offscreen-canvas/tools/tests2d.yaml
index f542d3c8716..aa82071ff8a 100644
--- a/tests/wpt/web-platform-tests/offscreen-canvas/tools/tests2d.yaml
+++ b/tests/wpt/web-platform-tests/offscreen-canvas/tools/tests2d.yaml
@@ -9216,3 +9216,990 @@
offscreenCanvas.height = n;
@assert offscreenCanvas.width === n;
@assert offscreenCanvas.height === n;
+
+- name: 2d.text.font.parse.basic
+ testing:
+ - 2d.text.font.parse
+ - 2d.text.font.get
+ code: |
+ ctx.font = '20px serif';
+ @assert ctx.font === '20px serif';
+
+ ctx.font = '20PX SERIF';
+ @assert ctx.font === '20px serif'; @moz-todo
+
+- name: 2d.text.font.parse.tiny
+ testing:
+ - 2d.text.font.parse
+ - 2d.text.font.get
+ code: |
+ ctx.font = '1px sans-serif';
+ @assert ctx.font === '1px sans-serif';
+
+- name: 2d.text.font.parse.complex
+ testing:
+ - 2d.text.font.parse
+ - 2d.text.font.get
+ - 2d.text.font.lineheight
+ code: |
+ ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif';
+ @assert ctx.font === 'italic small-caps 12px "Unknown Font", sans-serif'; @moz-todo
+
+ # TODO:
+ # 2d.text.font.parse.size.absolute
+ # xx-small x-small small medium large x-large xx-large
+ # 2d.text.font.parse.size.relative
+ # smaller larger
+ # 2d.text.font.parse.size.length.relative
+ # em ex px
+ # 2d.text.font.parse.size.length.absolute
+ # in cm mm pt pc
+
+- name: 2d.text.font.parse.system
+ desc: System fonts must be computed to explicit values
+ testing:
+ - 2d.text.font.parse
+ - 2d.text.font.get
+ - 2d.text.font.systemfonts
+ code: |
+ ctx.font = 'message-box';
+ @assert ctx.font !== 'message-box';
+
+- name: 2d.text.font.parse.invalid
+ testing:
+ - 2d.text.font.invalid
+ code: |
+ ctx.font = '20px serif';
+ @assert ctx.font === '20px serif';
+
+ ctx.font = '20px serif';
+ ctx.font = 'bogus';
+ @assert ctx.font === '20px serif';
+
+ ctx.font = '20px serif';
+ ctx.font = 'inherit';
+ @assert ctx.font === '20px serif';
+
+ ctx.font = '20px serif';
+ ctx.font = '10px {bogus}';
+ @assert ctx.font === '20px serif';
+
+ ctx.font = '20px serif';
+ ctx.font = '10px initial';
+ @assert ctx.font === '20px serif'; @moz-todo
+
+ ctx.font = '20px serif';
+ ctx.font = '10px default';
+ @assert ctx.font === '20px serif'; @moz-todo
+
+ ctx.font = '20px serif';
+ ctx.font = '10px inherit';
+ @assert ctx.font === '20px serif';
+
+ ctx.font = '20px serif';
+ ctx.font = '1em serif; background: green; margin: 10px';
+ @assert ctx.font === '20px serif';
+
+- name: 2d.text.font.default
+ testing:
+ - 2d.text.font.default
+ code: |
+ @assert ctx.font === '10px sans-serif';
+
+
+
+- name: 2d.text.align.valid
+ testing:
+ - 2d.text.align.get
+ - 2d.text.align.set
+ code: |
+ ctx.textAlign = 'start';
+ @assert ctx.textAlign === 'start';
+
+ ctx.textAlign = 'end';
+ @assert ctx.textAlign === 'end';
+
+ ctx.textAlign = 'left';
+ @assert ctx.textAlign === 'left';
+
+ ctx.textAlign = 'right';
+ @assert ctx.textAlign === 'right';
+
+ ctx.textAlign = 'center';
+ @assert ctx.textAlign === 'center';
+
+- name: 2d.text.align.invalid
+ testing:
+ - 2d.text.align.invalid
+ code: |
+ ctx.textAlign = 'start';
+ ctx.textAlign = 'bogus';
+ @assert ctx.textAlign === 'start';
+
+ ctx.textAlign = 'start';
+ ctx.textAlign = 'END';
+ @assert ctx.textAlign === 'start';
+
+ ctx.textAlign = 'start';
+ ctx.textAlign = 'end ';
+ @assert ctx.textAlign === 'start';
+
+ ctx.textAlign = 'start';
+ ctx.textAlign = 'end\0';
+ @assert ctx.textAlign === 'start';
+
+- name: 2d.text.align.default
+ testing:
+ - 2d.text.align.default
+ code: |
+ @assert ctx.textAlign === 'start';
+
+
+- name: 2d.text.baseline.valid
+ testing:
+ - 2d.text.baseline.get
+ - 2d.text.baseline.set
+ code: |
+ ctx.textBaseline = 'top';
+ @assert ctx.textBaseline === 'top';
+
+ ctx.textBaseline = 'hanging';
+ @assert ctx.textBaseline === 'hanging';
+
+ ctx.textBaseline = 'middle';
+ @assert ctx.textBaseline === 'middle';
+
+ ctx.textBaseline = 'alphabetic';
+ @assert ctx.textBaseline === 'alphabetic';
+
+ ctx.textBaseline = 'ideographic';
+ @assert ctx.textBaseline === 'ideographic';
+
+ ctx.textBaseline = 'bottom';
+ @assert ctx.textBaseline === 'bottom';
+
+- name: 2d.text.baseline.invalid
+ testing:
+ - 2d.text.baseline.invalid
+ code: |
+ ctx.textBaseline = 'top';
+ ctx.textBaseline = 'bogus';
+ @assert ctx.textBaseline === 'top';
+
+ ctx.textBaseline = 'top';
+ ctx.textBaseline = 'MIDDLE';
+ @assert ctx.textBaseline === 'top';
+
+ ctx.textBaseline = 'top';
+ ctx.textBaseline = 'middle ';
+ @assert ctx.textBaseline === 'top';
+
+ ctx.textBaseline = 'top';
+ ctx.textBaseline = 'middle\0';
+ @assert ctx.textBaseline === 'top';
+
+- name: 2d.text.baseline.default
+ testing:
+ - 2d.text.baseline.default
+ code: |
+ @assert ctx.textBaseline === 'alphabetic';
+
+- name: 2d.text.draw.fill.basic
+ desc: fillText draws filled text
+ manual:
+ testing:
+ - 2d.text.draw
+ - 2d.text.draw.fill
+ code: |
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.font = '35px Arial, sans-serif';
+ ctx.fillText('PASS', 5, 35);
+ expected: &passfill |
+ size 100 50
+ cr.set_source_rgb(0, 0, 0)
+ cr.rectangle(0, 0, 100, 50)
+ cr.fill()
+ cr.set_source_rgb(0, 1, 0)
+ cr.select_font_face("Arial")
+ cr.set_font_size(35)
+ cr.translate(5, 35)
+ cr.text_path("PASS")
+ cr.fill()
+
+- name: 2d.text.draw.fill.unaffected
+ desc: fillText does not start a new path or subpath
+ testing:
+ - 2d.text.draw.fill
+ code: |
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+
+ ctx.font = '35px Arial, sans-serif';
+ ctx.fillText('FAIL', 5, 35);
+
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ @assert pixel 50,25 == 0,255,0,255;
+ @assert pixel 5,45 == 0,255,0,255;
+ expected: green
+
+- name: 2d.text.draw.fill.rtl
+ desc: fillText respects Right-To-Left Override characters
+ manual:
+ testing:
+ - 2d.text.draw
+ code: |
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.font = '35px Arial, sans-serif';
+ ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35);
+ expected: *passfill
+
+- name: 2d.text.draw.fill.maxWidth.large
+ desc: fillText handles maxWidth correctly
+ manual:
+ testing:
+ - 2d.text.draw.maxwidth
+ code: |
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.font = '35px Arial, sans-serif';
+ ctx.fillText('PASS', 5, 35, 200);
+ expected: *passfill
+
+- name: 2d.text.draw.fill.maxWidth.small
+ desc: fillText handles maxWidth correctly
+ testing:
+ - 2d.text.draw.maxwidth
+ code: |
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.font = '35px Arial, sans-serif';
+ ctx.fillText('fail fail fail fail fail', -100, 35, 90);
+ _assertGreen(ctx, 100, 50);
+ expected: green
+
+- name: 2d.text.draw.fill.maxWidth.zero
+ desc: fillText handles maxWidth correctly
+ testing:
+ - 2d.text.draw.maxwidth
+ code: |
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.font = '35px Arial, sans-serif';
+ ctx.fillText('fail fail fail fail fail', 5, 35, 0);
+ _assertGreen(ctx, 100, 50);
+ expected: green
+
+- name: 2d.text.draw.fill.maxWidth.negative
+ desc: fillText handles maxWidth correctly
+ testing:
+ - 2d.text.draw.maxwidth
+ code: |
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.font = '35px Arial, sans-serif';
+ ctx.fillText('fail fail fail fail fail', 5, 35, -1);
+ _assertGreen(ctx, 100, 50);
+ expected: green
+
+- name: 2d.text.draw.fill.maxWidth.NaN
+ desc: fillText handles maxWidth correctly
+ testing:
+ - 2d.text.draw.maxwidth
+ code: |
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.font = '35px Arial, sans-serif';
+ ctx.fillText('fail fail fail fail fail', 5, 35, NaN);
+ _assertGreen(ctx, 100, 50);
+ expected: green
+
+- name: 2d.text.draw.stroke.basic
+ desc: strokeText draws stroked text
+ manual:
+ testing:
+ - 2d.text.draw
+ - 2d.text.draw.stroke
+ code: |
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.fillStyle = '#f00';
+ ctx.lineWidth = 1;
+ ctx.font = '35px Arial, sans-serif';
+ ctx.strokeText('PASS', 5, 35);
+ expected: |
+ size 100 50
+ cr.set_source_rgb(0, 0, 0)
+ cr.rectangle(0, 0, 100, 50)
+ cr.fill()
+ cr.set_source_rgb(0, 1, 0)
+ cr.select_font_face("Arial")
+ cr.set_font_size(35)
+ cr.set_line_width(1)
+ cr.translate(5, 35)
+ cr.text_path("PASS")
+ cr.stroke()
+
+- name: 2d.text.draw.stroke.unaffected
+ desc: strokeText does not start a new path or subpath
+ testing:
+ - 2d.text.draw.stroke
+ code: |
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+
+ ctx.font = '35px Arial, sans-serif';
+ ctx.strokeStyle = '#f00';
+ ctx.strokeText('FAIL', 5, 35);
+
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ @assert pixel 50,25 == 0,255,0,255;
+ @assert pixel 5,45 == 0,255,0,255;
+ expected: green
+
+- name: 2d.text.draw.kern.consistent
+ desc: Stroked and filled text should have exactly the same kerning so it overlaps
+ manual:
+ testing:
+ - 2d.text.draw
+ code: |
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 3;
+ ctx.font = '20px Arial, sans-serif';
+ ctx.fillText('VAVAVAVAVAVAVA', -50, 25);
+ ctx.fillText('ToToToToToToTo', -50, 45);
+ ctx.strokeText('VAVAVAVAVAVAVA', -50, 25);
+ ctx.strokeText('ToToToToToToTo', -50, 45);
+ expected: green
+
+# CanvasTest is:
+# A = (0, 0) to (1em, 0.75em) (above baseline)
+# B = (0, 0) to (1em, -0.25em) (below baseline)
+# C = (0, -0.25em) to (1em, 0.75em) (the em square) plus some Xs above and below
+# D = (0, -0.25em) to (1em, 0.75em) (the em square) plus some Xs left and right
+# E = (0, -0.25em) to (1em, 0.75em) (the em square)
+# space = empty, 1em wide
+#
+# At 50px, "E" will fill the canvas vertically
+# At 67px, "A" will fill the canvas vertically
+#
+# Ideographic baseline is 0.125em above alphabetic
+# Mathematical baseline is 0.375em above alphabetic
+# Hanging baseline is 0.500em above alphabetic
+
+- name: 2d.text.draw.fill.maxWidth.fontface
+ desc: fillText works on @font-face fonts
+ testing:
+ - 2d.text.draw.maxwidth
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillText('EEEE', -50, 37.5, 40);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.fill.maxWidth.bound
+ desc: fillText handles maxWidth based on line size, not bounding box size
+ testing:
+ - 2d.text.draw.maxwidth
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('DD', 0, 37.5, 100);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.fontface
+ testing:
+ - 2d.text.font.fontface
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '67px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('AA', 0, 50);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.fontface.repeat
+ desc: Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)
+ testing:
+ - 2d.text.font.fontface
+ fonts:
+ - CanvasTest
+ fonthack: 0
+ code: |
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.font = '67px CanvasTest';
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('AA', 0, 50);
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillText('AA', 0, 50);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.fontface.notinpage
+ desc: "@font-face fonts should work even if they are not used in the page"
+ testing:
+ - 2d.text.font.fontface
+ fonts:
+ - CanvasTest
+ fonthack: 0
+ code: |
+ ctx.font = '67px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('AA', 0, 50);
+ @assert pixel 5,5 ==~ 0,255,0,255; @moz-todo
+ @assert pixel 95,5 ==~ 0,255,0,255; @moz-todo
+ @assert pixel 25,25 ==~ 0,255,0,255; @moz-todo
+ @assert pixel 75,25 ==~ 0,255,0,255; @moz-todo
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.baseline.top
+ desc: textBaseline top is the top of the em square (not the bounding box)
+ testing:
+ - 2d.text.baseline.top
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'top';
+ ctx.fillText('CC', 0, 0);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255;
+ @assert pixel 95,45 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.baseline.bottom
+ desc: textBaseline bottom is the bottom of the em square (not the bounding box)
+ testing:
+ - 2d.text.baseline.bottom
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'bottom';
+ ctx.fillText('CC', 0, 50);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255;
+ @assert pixel 95,45 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.baseline.middle
+ desc: textBaseline middle is the middle of the em square (not the bounding box)
+ testing:
+ - 2d.text.baseline.middle
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'middle';
+ ctx.fillText('CC', 0, 25);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255;
+ @assert pixel 95,45 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.baseline.alphabetic
+ testing:
+ - 2d.text.baseline.alphabetic
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'alphabetic';
+ ctx.fillText('CC', 0, 37.5);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255;
+ @assert pixel 95,45 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.baseline.ideographic
+ testing:
+ - 2d.text.baseline.ideographic
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'ideographic';
+ ctx.fillText('CC', 0, 31.25);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255; @moz-todo
+ @assert pixel 95,45 ==~ 0,255,0,255; @moz-todo
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.baseline.hanging
+ testing:
+ - 2d.text.baseline.hanging
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textBaseline = 'hanging';
+ ctx.fillText('CC', 0, 12.5);
+ @assert pixel 5,5 ==~ 0,255,0,255; @moz-todo
+ @assert pixel 95,5 ==~ 0,255,0,255; @moz-todo
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255;
+ @assert pixel 95,45 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.align.left
+ desc: textAlign left is the left of the first em square (not the bounding box)
+ testing:
+ - 2d.text.align.left
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'left';
+ ctx.fillText('DD', 0, 37.5);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255;
+ @assert pixel 95,45 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.align.right
+ desc: textAlign right is the right of the last em square (not the bounding box)
+ testing:
+ - 2d.text.align.right
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'right';
+ ctx.fillText('DD', 100, 37.5);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255;
+ @assert pixel 95,45 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.align.start.ltr
+ desc: textAlign start with ltr is the left edge
+ testing:
+ - 2d.text.align.left
+ fonts:
+ - CanvasTest
+ canvas: width="100" height="50" dir="ltr"
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'start';
+ ctx.fillText('DD', 0, 37.5);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255;
+ @assert pixel 95,45 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.align.start.rtl
+ desc: textAlign start with rtl is the right edge
+ testing:
+ - 2d.text.align.right
+ - 2d.text.draw.direction
+ fonts:
+ - CanvasTest
+ canvas: width="100" height="50" dir="rtl"
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'start';
+ ctx.fillText('DD', 100, 37.5);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255;
+ @assert pixel 95,45 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.align.end.ltr
+ desc: textAlign end with ltr is the right edge
+ testing:
+ - 2d.text.align.right
+ fonts:
+ - CanvasTest
+ canvas: width="100" height="50" dir="ltr"
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'end';
+ ctx.fillText('DD', 100, 37.5);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255;
+ @assert pixel 95,45 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.align.end.rtl
+ desc: textAlign end with rtl is the left edge
+ testing:
+ - 2d.text.align.left
+ - 2d.text.draw.direction
+ fonts:
+ - CanvasTest
+ canvas: width="100" height="50" dir="rtl"
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'end';
+ ctx.fillText('DD', 0, 37.5);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255;
+ @assert pixel 95,45 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.align.center
+ desc: textAlign center is the center of the em squares (not the bounding box)
+ testing:
+ - 2d.text.align.center
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'center';
+ ctx.fillText('DD', 50, 37.5);
+ @assert pixel 5,5 ==~ 0,255,0,255;
+ @assert pixel 95,5 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ @assert pixel 5,45 ==~ 0,255,0,255;
+ @assert pixel 95,45 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+
+- name: 2d.text.draw.space.basic
+ desc: U+0020 is rendered the correct size (1em wide)
+ testing:
+ - 2d.text.draw.spaces
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('E EE', -100, 37.5);
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.space.collapse.space
+ desc: Space characters are converted to U+0020, and collapsed (per CSS)
+ testing:
+ - 2d.text.draw.spaces
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('E EE', -100, 37.5);
+ @assert pixel 25,25 ==~ 0,255,0,255; @moz-todo
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.space.collapse.other
+ desc: Space characters are converted to U+0020, and collapsed (per CSS)
+ testing:
+ - 2d.text.draw.spaces
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('E \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dEE', -100, 37.5);
+ @assert pixel 25,25 ==~ 0,255,0,255; @moz-todo
+ @assert pixel 75,25 ==~ 0,255,0,255; @moz-todo
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.space.collapse.nonspace
+ desc: Non-space characters are not converted to U+0020 and collapsed
+ testing:
+ - 2d.text.draw.spaces
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText('E\x0b EE', -150, 37.5);
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.space.collapse.start
+ desc: Space characters at the start of a line are collapsed (per CSS)
+ testing:
+ - 2d.text.draw.spaces
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillText(' EE', 0, 37.5);
+ @assert pixel 25,25 ==~ 0,255,0,255; @moz-todo
+ @assert pixel 75,25 ==~ 0,255,0,255;
+ }), 500);
+ expected: green
+
+- name: 2d.text.draw.space.collapse.end
+ desc: Space characters at the end of a line are collapsed (per CSS)
+ testing:
+ - 2d.text.draw.spaces
+ fonts:
+ - CanvasTest
+ code: |
+ ctx.font = '50px CanvasTest';
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.textAlign = 'right';
+ ctx.fillText('EE ', 100, 37.5);
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255; @moz-todo
+ }), 500);
+ expected: green
+
+- name: 2d.text.measure.width.basic
+ testing:
+ - 2d.text.measure
+ fonts:
+ - CanvasTest
+ code: |
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ @assert ctx.measureText('A').width === 50;
+ @assert ctx.measureText('AA').width === 100;
+ @assert ctx.measureText('ABCD').width === 200;
+
+ ctx.font = '100px CanvasTest';
+ @assert ctx.measureText('A').width === 100;
+ }), 500);
+
+- name: 2d.text.measure.width.empty
+ desc: The empty string has zero width
+ testing:
+ - 2d.text.measure
+ fonts:
+ - CanvasTest
+ code: |
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ @assert ctx.measureText("").width === 0;
+ }), 500);
+
+- name: 2d.text.measure.width.space
+ desc: Space characters are converted to U+0020 and collapsed (per CSS)
+ testing:
+ - 2d.text.measure.spaces
+ fonts:
+ - CanvasTest
+ code: |
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ @assert ctx.measureText('A B').width === 150;
+ @assert ctx.measureText('A B').width === 150; @moz-todo
+ @assert ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width === 150; @moz-todo
+ @assert ctx.measureText('A \x0b B').width >= 200;
+
+ @assert ctx.measureText(' AB').width === 100; @moz-todo
+ @assert ctx.measureText('AB ').width === 100; @moz-todo
+ }), 500);
+
+# TODO: shadows, alpha, composite, clip
diff --git a/tests/wpt/web-platform-tests/permissions/META.yml b/tests/wpt/web-platform-tests/permissions/META.yml
new file mode 100644
index 00000000000..cf7504920a4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/permissions/META.yml
@@ -0,0 +1,4 @@
+suggested_reviewers:
+ - jyasskin
+ - mounirlamouri
+ - marcoscaceres
diff --git a/tests/wpt/web-platform-tests/permissions/OWNERS b/tests/wpt/web-platform-tests/permissions/OWNERS
deleted file mode 100644
index 7259a0abd3d..00000000000
--- a/tests/wpt/web-platform-tests/permissions/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-@jyasskin
-@mounirlamouri
-@marcoscaceres
diff --git a/tests/wpt/web-platform-tests/picture-in-picture/picture-in-picture-window.html b/tests/wpt/web-platform-tests/picture-in-picture/picture-in-picture-window.html
index 82d64577294..693a13717e2 100644
--- a/tests/wpt/web-platform-tests/picture-in-picture/picture-in-picture-window.html
+++ b/tests/wpt/web-platform-tests/picture-in-picture/picture-in-picture-window.html
@@ -34,6 +34,34 @@ promise_test(async t => {
promise_test(async t => {
const video = await loadVideo();
+
+ video.addEventListener('leavepictureinpicture', t.step_func_done(event => {
+ assert_unreached('leavepictureinpicture event should not fire.')
+ }));
+
+ let enterCounts = 0;
+ video.addEventListener('enterpictureinpicture', event => {
+ enterCounts++;
+ });
+
+ return requestPictureInPictureWithTrustedClick(video)
+ .then(pipWindow1 => {
+ pipWindow1.onresize = function foo() {};
+ return requestPictureInPictureWithTrustedClick(video)
+ .then(pipWindow2 => {
+ assert_equals(pipWindow1, pipWindow2);
+ assert_equals(pipWindow1.width, pipWindow2.width);
+ assert_equals(pipWindow1.height, pipWindow2.height);
+ assert_equals(pipWindow1.onresize, pipWindow2.onresize);
+ assert_equals(enterCounts, 1);
+ });
+ });
+}, 'Picture-in-Picture window is unchanged after entering ' +
+ 'Picture-in-Picture for video already in Picture-in-Picture');
+
+promise_test(async t => {
+ const video = await loadVideo();
+
return requestPictureInPictureWithTrustedClick(video)
.then(pipWindow => {
return document.exitPictureInPicture()
diff --git a/tests/wpt/web-platform-tests/pointerevents/extension/idlharness.html b/tests/wpt/web-platform-tests/pointerevents/extension/idlharness.html
index e2835f8327f..40a441cf6c7 100644
--- a/tests/wpt/web-platform-tests/pointerevents/extension/idlharness.html
+++ b/tests/wpt/web-platform-tests/pointerevents/extension/idlharness.html
@@ -35,22 +35,11 @@ interface MouseEvent {
};
</pre>
-
-<pre id='idl'>
-dictionary PointerEventInit : MouseEventInit {
- sequence<PointerEvent> coalescedEvents;
-};
-
-[Constructor(DOMString type, optional PointerEventInit eventInitDict)]
-interface PointerEvent : MouseEvent {
- sequence<PointerEvent> getCoalescedEvents();
-};
-
-</pre>
<script>
promise_test(async function () {
const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
const uievents = await fetch('/interfaces/uievents.idl').then(r => r.text());
+ const idl = await fetch('/interfaces/pointerevents-extension.idl').then(r => r.text());
const idl_array = new IdlArray();
idl_array.add_untested_idls(dom, { only: ['EventInit'] });
@@ -61,7 +50,7 @@ promise_test(async function () {
});
idl_array.add_untested_idls(
document.getElementById("untested_idl").textContent);
- idl_array.add_idls(document.getElementById("idl").textContent);
+ idl_array.add_idls(idl);
idl_array.test();
}, 'pointerevents extension interfaces');
</script>
diff --git a/tests/wpt/web-platform-tests/resources/idlharness.js b/tests/wpt/web-platform-tests/resources/idlharness.js
index 8200f959a2d..b3450053ce0 100644
--- a/tests/wpt/web-platform-tests/resources/idlharness.js
+++ b/tests/wpt/web-platform-tests/resources/idlharness.js
@@ -257,7 +257,10 @@ IdlArray.prototype.add_dependency_idls = function(raw_idls, options)
const all_deps = new Set();
Object.values(this.inheritance).forEach(v => all_deps.add(v));
- Object.values(this.implements).forEach(v => all_deps.add(v));
+ Object.entries(this.implements).forEach(([k, v]) => {
+ all_deps.add(k);
+ all_deps.add(v);
+ });
// NOTE: If 'A includes B' for B that we care about, then A is also a dep.
Object.keys(this.includes).forEach(k => {
all_deps.add(k);
diff --git a/tests/wpt/web-platform-tests/resources/test/tests/functional/idlharness/IdlInterface/test_to_json_operation.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/idlharness/IdlInterface/test_to_json_operation.html
index 3d05e9aca9c..ba8cd78abb9 100644
--- a/tests/wpt/web-platform-tests/resources/test/tests/functional/idlharness/IdlInterface/test_to_json_operation.html
+++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/idlharness/IdlInterface/test_to_json_operation.html
@@ -167,7 +167,7 @@
"status_string": "FAIL"
},
{
- "message": "assert_true: {\"type\":\"return-type\",\"sequence\":false,\"generic\":null,\"nullable\":false,\"union\":false,\"idlType\":\"DOMException\"} is not an appropriate return value for the toJSON operation of N expected true got false",
+ "message": "assert_true: {\"type\":\"return-type\",\"generic\":null,\"nullable\":false,\"union\":false,\"idlType\":\"DOMException\",\"extAttrs\":[]} is not an appropriate return value for the toJSON operation of N expected true got false",
"name": "Test toJSON operation of N",
"properties": {},
"status_string": "FAIL"
diff --git a/tests/wpt/web-platform-tests/resources/test/tests/unit/basic.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/basic.html
index 7998a2ab8b7..7eef4a8fa5b 100644
--- a/tests/wpt/web-platform-tests/resources/test/tests/unit/basic.html
+++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/basic.html
@@ -24,7 +24,12 @@
assert_equals(typeof WebIDL2.parse, "function");
}, 'WebIDL2 namespace should have a parse method');
test(function() {
- assert_throws(new TypeError(), function() { WebIDL2.parse("I'm a syntax error"); });
+ try {
+ WebIDL2.parse("I'm a syntax error");
+ throw new Error("Web IDL didn't throw");
+ } catch (e) {
+ assert_true(e.constructor.name === "WebIDLParseError");
+ }
}, 'WebIDL2 parse method should bail on incorrect WebIDL');
test(function() {
assert_equals(typeof WebIDL2.parse("interface Foo {};"), "object");
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/.gitmodules b/tests/wpt/web-platform-tests/resources/webidl2/.gitmodules
deleted file mode 100644
index a3f5485cd33..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "test/widlproc"]
- path = test/widlproc
- url = https://github.com/dontcallmedom/widlproc.git
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/CHANGELOG.md b/tests/wpt/web-platform-tests/resources/webidl2/CHANGELOG.md
index 1596d71684a..91e22275e07 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/CHANGELOG.md
+++ b/tests/wpt/web-platform-tests/resources/webidl2/CHANGELOG.md
@@ -1,5 +1,13 @@
# Change Log
+## [v10.2.1](https://github.com/w3c/webidl2.js/tree/v10.2.1) (2018-03-09)
+[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.2.0...v10.2.1)
+
+**Merged pull requests:**
+
+- Optimise tokenisation and whitespace skipping [\#139](https://github.com/w3c/webidl2.js/pull/139) ([ricea](https://github.com/ricea))
+- refactor: small syntax changes [\#137](https://github.com/w3c/webidl2.js/pull/137) ([saschanaz](https://github.com/saschanaz))
+
## [v10.2.0](https://github.com/w3c/webidl2.js/tree/v10.2.0) (2018-01-30)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.1.0...v10.2.0)
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/README.md b/tests/wpt/web-platform-tests/resources/webidl2/README.md
index 8791360d1c1..9a8f3f8e9c1 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/README.md
+++ b/tests/wpt/web-platform-tests/resources/webidl2/README.md
@@ -45,23 +45,6 @@ In the browser:
</script>
```
-### Advanced Parsing
-
-`parse()` can optionally accept a second parameter, an options object, which can be used to
-modify parsing behavior.
-
-The following options are recognized:
-```JS
-{
- allowNestedTypedefs: false
-}
-```
-
-And their meanings are as follows:
-
-* `allowNestedTypedefs`: Boolean indicating whether the parser should accept `typedef`s as valid members of `interface`s.
-This is non-standard syntax and therefore the default is `false`.
-
### Errors
When there is a syntax error in the WebIDL, it throws an exception object with the following
@@ -93,17 +76,18 @@ attached to a field called `idlType`:
```JS
{
- "sequence": false,
+ "type": "attribute-type",
"generic": null,
- "idlType": "void",
+ "idlType": "unsigned short",
"nullable": false,
"union": false,
+ "extAttrs": [...]
}
```
Where the fields are as follows:
-* `sequence`: Boolean indicating if it is a sequence. Same as `generic === "sequence"`.
+* `type`: String indicating where this type is used. Can be `null` if not applicable.
* `generic`: String indicating the generic type (e.g. "Promise", "sequence"). `null`
otherwise.
* `idlType`: Can be different things depending on context. In most cases, this will just
@@ -113,6 +97,7 @@ Where the fields are as follows:
description for the type in the sequence, the eventual value of the promise, etc.
* `nullable`: Boolean indicating whether this is nullable or not.
* `union`: Boolean indicating whether this is a union type or not.
+* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Interface
@@ -211,11 +196,13 @@ A callback looks like this:
"type": "callback",
"name": "AsyncOperationCallback",
"idlType": {
+ "type": "return-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"arguments": [...],
"extAttrs": []
@@ -244,11 +231,13 @@ A dictionary looks like this:
"name": "fillPattern",
"required": false,
"idlType": {
+ "type": "dictionary-type",
"sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": [...]
},
"extAttrs": [],
"default": {
@@ -311,17 +300,21 @@ A typedef looks like this:
{
"type": "typedef",
"idlType": {
+ "type": "typedef-type",
"sequence": true,
"generic": "sequence",
"nullable": false,
"union": false,
"idlType": {
+ "type": "typedef-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Point"
- }
+ "idlType": "Point",
+ "extAttrs": [...]
+ },
+ "extAttrs": [...]
},
"name": "PointSequence",
"extAttrs": []
@@ -388,11 +381,13 @@ An operation looks like this:
"static": false,
"stringifier": false,
"idlType": {
+ "type": "return-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "intersection",
"arguments": [{
@@ -400,11 +395,13 @@ An operation looks like this:
"variadic": true,
"extAttrs": [],
"idlType": {
+ "type": "argument-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": [...]
},
"name": "ints"
}],
@@ -437,11 +434,13 @@ An attribute member looks like this:
"inherit": false,
"readonly": false,
"idlType": {
+ "type": "attribute-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "RegExp"
+ "idlType": "RegExp",
+ "extAttrs": [...]
},
"name": "regexp",
"extAttrs": []
@@ -467,7 +466,15 @@ A constant member looks like this:
{
"type": "const",
"nullable": false,
- "idlType": "boolean",
+ "idlType": {
+ "type": "const-type",
+ "sequence": false,
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "boolean"
+ "extAttrs": []
+ },
"name": "DEBUG",
"value": {
"type": "boolean",
@@ -481,7 +488,7 @@ The fields are as follows:
* `type`: Always "const".
* `nullable`: Whether its type is nullable.
-* `idlType`: The type of the constant (a simple type, the type name).
+* `idlType`: An [IDL Type](#idl-type) of the constant that represents a simple type, the type name.
* `name`: The name of the constant.
* `value`: The constant value as described by [Const Values](#default-and-const-values)
* `extAttrs`: A list of [extended attributes](#extended-attributes).
@@ -497,11 +504,13 @@ The arguments (e.g. for an operation) look like this:
"variadic": true,
"extAttrs": [],
"idlType": {
+ "type": "argument-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": [...]
},
"name": "ints"
}]
@@ -546,8 +555,6 @@ The fields are as follows:
* `type`: Always `"extended-attribute"`.
* `rhs`: If there is a right-hand side, this will capture its `type` (which can be
"identifier" or "identifier-list") and its `value`.
-* `typePair`: If the extended attribute is a `MapClass` this will capture the
- map's key type and value type respectively.
### Default and Const Values
@@ -587,14 +594,6 @@ The fields are as follows:
## Testing
-In order to run the tests you need to ensure that the widlproc submodule inside `test` is
-initialized and up to date:
-
-```Bash
-git submodule init
-git submodule update
-```
-
### Running
The test runs with mocha and expect.js. Normally, running mocha in the root directory
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/checker/index.html b/tests/wpt/web-platform-tests/resources/webidl2/checker/index.html
new file mode 100644
index 00000000000..9897d8572f2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/checker/index.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>WebIDL 2 Checker</title>
+
+<script src='../lib/webidl2.js'></script>
+<script>
+let parserResult = undefined;
+
+function formatParserOutput() {
+ const outputEl = document.getElementById('webidl-checker-output');
+ if (parserResult) {
+ const prettyPrintEl = document.getElementById('pretty-print');
+ outputEl.innerText = JSON.stringify(parserResult, null, prettyPrintEl.checked ? 2 : null);
+ } else {
+ outputEl.innerText = '';
+ }
+}
+
+function checkWebIDL(textToCheck) {
+ const validation = document.getElementById('webidl-checker-validation');
+ parserResult = null;
+ try {
+ parserResult = WebIDL2.parse(textToCheck);
+ validation.innerText = 'WebIDL parsed successfully!';
+ } catch (e) {
+ validation.innerText = 'Exception while parsing WebIDL. See JavaScript console for more details.\n\n' + e.toString();
+ // Pass it along to the JavaScript console.
+ throw e;
+ } finally {
+ formatParserOutput();
+ }
+}
+</script>
+<style>
+textarea {
+ font-family: monospace;
+}
+</style>
+</head>
+<body>
+<h2>WebIDL Checker</h2>
+<p>This is an online checker for WebIDL built on the <a href="https://github.com/w3c/webidl2.js">webidl2.js</a> project.</p>
+<p>Enter your WebIDL to check below:</p>
+<textarea id='webidl-to-check' rows='20' cols='80'></textarea>
+<br>
+<input type='button' value='Check WebIDL' onclick='checkWebIDL(document.getElementById("webidl-to-check").value)'>
+<p>Validation results:</p>
+<textarea id='webidl-checker-validation' rows='20' cols='80'></textarea>
+<p>Parser output:</p>
+<textarea id='webidl-checker-output' rows='20' cols='80'></textarea>
+<br>
+<input type='checkbox' id='pretty-print' checked='true' onchange='formatParserOutput()'>Pretty Print
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/lib/webidl2.js b/tests/wpt/web-platform-tests/resources/webidl2/lib/webidl2.js
index a7a61d957b5..ef519c09df6 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/lib/webidl2.js
+++ b/tests/wpt/web-platform-tests/resources/webidl2/lib/webidl2.js
@@ -8,67 +8,132 @@
// against integers early.
"float": /-?(?=[0-9]*\.|[0-9]+[eE])(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y,
"integer": /-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y,
- "identifier": /[A-Z_a-z][0-9A-Z_a-z-]*/y,
+ "identifier": /_?[A-Za-z][0-9A-Z_a-z-]*/y,
"string": /"[^"]*"/y,
"whitespace": /[\t\n\r ]+/y,
"comment": /((\/(\/.*|\*([^*]|\*[^\/])*\*\/)[\t\n\r ]*)+)/y,
- "other": /[^\t\n\r 0-9A-Z_a-z]/y
+ "other": /[^\t\n\r 0-9A-Za-z]/y
};
- function attemptTokenMatch(str, type, re, lastIndex, tokens) {
- re.lastIndex = lastIndex;
- const result = re.exec(str);
- if (result) {
- tokens.push({ type, value: result[0] });
- return re.lastIndex;
- }
- return -1;
- }
+ const stringTypes = [
+ "ByteString",
+ "DOMString",
+ "USVString"
+ ];
+
+ const argumentNameKeywords = [
+ "attribute",
+ "callback",
+ "const",
+ "deleter",
+ "dictionary",
+ "enum",
+ "getter",
+ "includes",
+ "inherit",
+ "interface",
+ "iterable",
+ "maplike",
+ "namespace",
+ "partial",
+ "required",
+ "setlike",
+ "setter",
+ "static",
+ "stringifier",
+ "typedef",
+ "unrestricted"
+ ];
+
+ const nonRegexTerminals = [
+ "FrozenArray",
+ "Infinity",
+ "NaN",
+ "Promise",
+ "boolean",
+ "byte",
+ "double",
+ "false",
+ "float",
+ "implements",
+ "legacyiterable",
+ "long",
+ "mixin",
+ "null",
+ "octet",
+ "optional",
+ "or",
+ "readonly",
+ "record",
+ "sequence",
+ "short",
+ "true",
+ "unsigned",
+ "void"
+ ].concat(argumentNameKeywords, stringTypes);
+
+ const punctuations = [
+ "(",
+ ")",
+ ",",
+ "-Infinity",
+ "...",
+ ":",
+ ";",
+ "<",
+ "=",
+ ">",
+ "?",
+ "[",
+ "]",
+ "{",
+ "}"
+ ];
function tokenise(str) {
const tokens = [];
let lastIndex = 0;
+ let trivia = "";
while (lastIndex < str.length) {
const nextChar = str.charAt(lastIndex);
let result = -1;
- if (/[-0-9.]/.test(nextChar)) {
- result = attemptTokenMatch(str, "float", tokenRe.float, lastIndex,
- tokens);
- if (result === -1) {
- result = attemptTokenMatch(str, "integer", tokenRe.integer, lastIndex,
- tokens);
- }
+
+ if (/[\t\n\r ]/.test(nextChar)) {
+ result = attemptTokenMatch("whitespace", { noFlushTrivia: true });
+ } else if (nextChar === '/') {
+ result = attemptTokenMatch("comment", { noFlushTrivia: true });
+ }
+
+ if (result !== -1) {
+ trivia += tokens.pop().value;
+ } else if (/[-0-9.]/.test(nextChar)) {
+ result = attemptTokenMatch("float");
if (result === -1) {
- // '-' and '.' can also match "other".
- result = attemptTokenMatch(str, "other", tokenRe.other,
- lastIndex, tokens);
+ result = attemptTokenMatch("integer");
}
} else if (/[A-Z_a-z]/.test(nextChar)) {
- result = attemptTokenMatch(str, "identifier", tokenRe.identifier,
- lastIndex, tokens);
- } else if (nextChar === '"') {
- result = attemptTokenMatch(str, "string", tokenRe.string,
- lastIndex, tokens);
- if (result === -1) {
- // '"' can also match "other".
- result = attemptTokenMatch(str, "other", tokenRe.other,
- lastIndex, tokens);
+ result = attemptTokenMatch("identifier");
+ const token = tokens[tokens.length - 1];
+ if (result !== -1 && nonRegexTerminals.includes(token.value)) {
+ token.type = token.value;
}
- } else if (/[\t\n\r ]/.test(nextChar)) {
- result = attemptTokenMatch(str, "whitespace", tokenRe.whitespace,
- lastIndex, tokens);
- } else if (nextChar === '/') {
- // The parser expects comments to be labelled as "whitespace".
- result = attemptTokenMatch(str, "whitespace", tokenRe.comment,
- lastIndex, tokens);
- if (result === -1) {
- // '/' can also match "other".
- result = attemptTokenMatch(str, "other", tokenRe.other,
- lastIndex, tokens);
+ } else if (nextChar === '"') {
+ result = attemptTokenMatch("string");
+ }
+
+ for (const punctuation of punctuations) {
+ if (str.startsWith(punctuation, lastIndex)) {
+ tokens.push({ type: punctuation, value: punctuation, trivia });
+ trivia = "";
+ lastIndex += punctuation.length;
+ result = lastIndex;
+ break;
}
- } else {
- result = attemptTokenMatch(str, "other", tokenRe.other,
- lastIndex, tokens);
+ }
+
+ // other as the last try
+ if (result === -1) {
+ result = attemptTokenMatch("other");
}
if (result === -1) {
throw new Error("Token stream not progressing");
@@ -76,6 +141,20 @@
lastIndex = result;
}
return tokens;
+
+ function attemptTokenMatch(type, { noFlushTrivia } = {}) {
+ const re = tokenRe[type];
+ re.lastIndex = lastIndex;
+ const result = re.exec(str);
+ if (result) {
+ tokens.push({ type, value: result[0], trivia });
+ if (!noFlushTrivia) {
+ trivia = "";
+ }
+ return re.lastIndex;
+ }
+ return -1;
+ }
}
class WebIDLParseError {
@@ -87,11 +166,13 @@
}
toString() {
- return `${this.message}, line ${this.line} (tokens: '${this.input}')\n${JSON.stringify(this.tokens, null, 4)}`;
+ const escapedInput = JSON.stringify(this.input);
+ const tokens = JSON.stringify(this.tokens, null, 4);
+ return `${this.message}, line ${this.line} (tokens: ${escapedInput})\n${tokens}`;
}
}
- function parse(tokens, opt) {
+ function parse(tokens) {
let line = 1;
tokens = tokens.slice();
const names = new Map();
@@ -112,15 +193,24 @@
stringifier: false
});
+ const EMPTY_IDLTYPE = Object.freeze({
+ generic: null,
+ nullable: false,
+ union: false,
+ idlType: null,
+ extAttrs: []
+ });
+
function error(str) {
- let tok = "";
- let numTokens = 0;
const maxTokens = 5;
- while (numTokens < maxTokens && tokens.length > numTokens) {
- tok += tokens[numTokens].value;
- numTokens++;
+ const tok = tokens
+ .slice(consume_position, consume_position + maxTokens)
+ .map(t => t.trivia + t.value).join("");
+ // Count newlines preceding the actual erroneous token
+ if (tokens.length) {
+ line += count(tokens[consume_position].trivia, "\n");
}
-
+
let message;
if (current) {
message = `Got an error during or right after parsing \`${current.partial ? "partial " : ""}${current.type} ${current.name}\`: ${str}`
@@ -141,85 +231,49 @@
return name;
}
- let last_token = null;
+ let consume_position = 0;
- function consume(type, value) {
- if (!tokens.length || tokens[0].type !== type) return;
- if (typeof value === "undefined" || tokens[0].value === value) {
- last_token = tokens.shift();
- if (type === ID && last_token.value.startsWith('_'))
- last_token.value = last_token.value.substring(1);
- return last_token;
- }
+ function probe(type) {
+ return tokens.length > consume_position && tokens[consume_position].type === type;
}
- function count(str, char) {
- let total = 0;
- for (let i = str.indexOf(char); i !== -1; i = str.indexOf(char, i + 1)) {
- ++total;
+ function consume(...candidates) {
+ // TODO: use const when Servo updates its JS engine
+ for (let type of candidates) {
+ if (!probe(type)) continue;
+ const token = tokens[consume_position];
+ consume_position++;
+ line += count(token.trivia, "\n");
+ return token;
}
- return total;
}
- function ws() {
- if (!tokens.length) return;
- if (tokens[0].type === "whitespace") {
- const t = tokens.shift();
- line += count(t.value, '\n');
- return t;
- }
+ function unescape(identifier) {
+ return identifier.startsWith('_') ? identifier.slice(1) : identifier;
}
- const all_ws_re = {
- "ws": /([\t\n\r ]+)/y,
- "line-comment": /\/\/(.*)\r?\n?/y,
- "multiline-comment": /\/\*((?:[^*]|\*[^/])*)\*\//y
- };
- function all_ws(store, pea) { // pea == post extended attribute, tpea = same for types
- const t = { type: "whitespace", value: "" };
- while (true) {
- const w = ws();
- if (!w) break;
- t.value += w.value;
+ function unconsume(position) {
+ while (consume_position > position) {
+ consume_position--;
+ line -= count(tokens[consume_position].trivia, "\n");
}
- if (t.value.length > 0) {
- if (store) {
- let w = t.value;
- let lastIndex = 0;
- while (lastIndex < w.length) {
- let matched = false;
- // Servo doesn't support using "const" in this construction yet.
- // See https://github.com/servo/servo/issues/20231.
- // |type| can be made const once Servo supports it.
- for (let type in all_ws_re) {
- const re = all_ws_re[type];
- re.lastIndex = lastIndex;
- const result = re.exec(w);
- if (result) {
- store.push({ type: type + (pea ? ("-" + pea) : ""), value: result[1] });
- matched = true;
- lastIndex = re.lastIndex;
- break;
- }
- }
- if (!matched)
- throw new Error("Surprising white space construct."); // this shouldn't happen
- }
- }
- return t;
+ }
+
+ function count(str, char) {
+ let total = 0;
+ for (let i = str.indexOf(char); i !== -1; i = str.indexOf(char, i + 1)) {
+ ++total;
}
+ return total;
}
function integer_type() {
let ret = "";
- all_ws();
- if (consume(ID, "unsigned")) ret = "unsigned ";
- all_ws();
- if (consume(ID, "short")) return ret + "short";
- if (consume(ID, "long")) {
+ if (consume("unsigned")) ret = "unsigned ";
+ if (consume("short")) return ret + "short";
+ if (consume("long")) {
ret += "long";
- all_ws();
- if (consume(ID, "long")) return ret + " long";
+ if (consume("long")) return ret + " long";
return ret;
}
if (ret) error("Failed to parse integer type");
@@ -227,91 +281,85 @@
function float_type() {
let ret = "";
- all_ws();
- if (consume(ID, "unrestricted")) ret = "unrestricted ";
- all_ws();
- if (consume(ID, "float")) return ret + "float";
- if (consume(ID, "double")) return ret + "double";
+ if (consume("unrestricted")) ret = "unrestricted ";
+ if (consume("float")) return ret + "float";
+ if (consume("double")) return ret + "double";
if (ret) error("Failed to parse float type");
}
function primitive_type() {
const num_type = integer_type() || float_type();
if (num_type) return num_type;
- all_ws();
- if (consume(ID, "boolean")) return "boolean";
- if (consume(ID, "byte")) return "byte";
- if (consume(ID, "octet")) return "octet";
+ if (consume("boolean")) return "boolean";
+ if (consume("byte")) return "byte";
+ if (consume("octet")) return "octet";
}
function const_value() {
- if (consume(ID, "true")) return { type: "boolean", value: true };
- if (consume(ID, "false")) return { type: "boolean", value: false };
- if (consume(ID, "null")) return { type: "null" };
- if (consume(ID, "Infinity")) return { type: "Infinity", negative: false };
- if (consume(ID, "NaN")) return { type: "NaN" };
- const ret = consume(FLOAT) || consume(INT);
+ if (consume("true")) return { type: "boolean", value: true };
+ if (consume("false")) return { type: "boolean", value: false };
+ if (consume("null")) return { type: "null" };
+ if (consume("Infinity")) return { type: "Infinity", negative: false };
+ if (consume("-Infinity")) return { type: "Infinity", negative: true };
+ if (consume("NaN")) return { type: "NaN" };
+ const ret = consume(FLOAT, INT);
if (ret) return { type: "number", value: ret.value };
- const tok = consume(OTHER, "-");
- if (tok) {
- if (consume(ID, "Infinity")) return { type: "Infinity", negative: true };
- else tokens.unshift(tok);
- }
}
function type_suffix(obj) {
- while (true) {
- all_ws();
- if (consume(OTHER, "?")) {
- if (obj.nullable) error("Can't nullable more than once");
- obj.nullable = true;
- } else return;
+ obj.nullable = !!consume("?");
+ if (probe("?")) error("Can't nullable more than once");
+ }
+
+ function generic_type(typeName) {
+ const name = consume("FrozenArray", "Promise", "sequence", "record");
+ if (!name) {
+ return;
+ }
+ const ret = { generic: name.type };
+ consume("<") || error(`No opening bracket after ${name.type}`);
+ switch (name.type) {
+ case "Promise":
+ if (probe("[")) error("Promise type cannot have extended attribute");
+ ret.idlType = return_type(typeName);
+ break;
+ case "sequence":
+ case "FrozenArray":
+ ret.idlType = type_with_extended_attributes(typeName);
+ break;
+ case "record":
+ if (probe("[")) error("Record key cannot have extended attribute");
+ ret.idlType = [];
+ const keyType = consume(...stringTypes);
+ if (!keyType) error(`Record key must be a string type`);
+ ret.idlType.push(Object.assign({ type: typeName }, EMPTY_IDLTYPE, { idlType: keyType.value }));
+ consume(",") || error("Missing comma after record key type");
+ const valueType = type_with_extended_attributes(typeName) || error("Error parsing generic type record");
+ ret.idlType.push(valueType);
+ break;
+ }
+ if (!ret.idlType) error(`Error parsing generic type ${name.type}`);
+ consume(">") || error(`Missing closing bracket after ${name.type}`);
+ if (name.type === "Promise" && probe("?")) {
+ error("Promise type cannot be nullable");
}
+ type_suffix(ret);
+ return ret;
}
function single_type(typeName) {
+ const ret = Object.assign({ type: typeName || null }, EMPTY_IDLTYPE);
+ const generic = generic_type(typeName);
+ if (generic) {
+ return Object.assign(ret, generic);
+ }
const prim = primitive_type();
- const ret = { type: typeName || null, sequence: false, generic: null, nullable: false, union: false };
let name;
- let value;
if (prim) {
ret.idlType = prim;
- } else if (name = consume(ID)) {
- value = name.value;
- all_ws();
- // Generic types
- if (consume(OTHER, "<")) {
- // backwards compat
- if (value === "sequence") {
- ret.sequence = true;
- }
- ret.generic = value;
- const types = [];
- do {
- all_ws();
- types.push(type_with_extended_attributes(typeName) || error("Error parsing generic type " + value));
- all_ws();
- }
- while (consume(OTHER, ","));
- if (value === "sequence") {
- if (types.length !== 1) error("A sequence must have exactly one subtype");
- } else if (value === "record") {
- if (types.length !== 2) error("A record must have exactly two subtypes");
- if (!/^(DOMString|USVString|ByteString)$/.test(types[0].idlType)) {
- error("Record key must be DOMString, USVString, or ByteString");
- }
- if (types[0].extAttrs) error("Record key cannot have extended attribute");
- } else if (value === "Promise") {
- if (types[0].extAttrs) error("Promise type cannot have extended attribute");
- }
- ret.idlType = types.length === 1 ? types[0] : types;
- all_ws();
- if (!consume(OTHER, ">")) error("Unterminated generic type " + value);
- type_suffix(ret);
- return ret;
- } else {
- ret.idlType = value;
- }
+ } else if (name = consume(ID, ...stringTypes)) {
+ ret.idlType = name.value;
+ if (probe("<")) error(`Unsupported generic type ${name.value}`);
} else {
return;
}
@@ -321,18 +369,16 @@
}
function union_type(typeName) {
- all_ws();
- if (!consume(OTHER, "(")) return;
- const ret = { type: typeName || null, sequence: false, generic: null, nullable: false, union: true, idlType: [] };
- const fst = type_with_extended_attributes() || error("Union type with no content");
- ret.idlType.push(fst);
- while (true) {
- all_ws();
- if (!consume(ID, "or")) break;
- const typ = type_with_extended_attributes() || error("No type after 'or' in union type");
+ if (!consume("(")) return;
+ const ret = Object.assign({ type: typeName || null }, EMPTY_IDLTYPE, { union: true, idlType: [] });
+ do {
+ const typ = type_with_extended_attributes() || error("No type after open parenthesis or 'or' in union type");
ret.idlType.push(typ);
+ } while (consume("or"));
+ if (ret.idlType.length < 2) {
+ error("At least two types are expected in a union type but found less");
}
- if (!consume(OTHER, ")")) error("Unterminated union type");
+ if (!consume(")")) error("Unterminated union type");
type_suffix(ret);
return ret;
}
@@ -348,236 +394,173 @@
return ret;
}
- function argument(store) {
- const ret = { optional: false, variadic: false };
- ret.extAttrs = extended_attrs(store);
- all_ws(store, "pea");
- const opt_token = consume(ID, "optional");
+ function argument() {
+ const start_position = consume_position;
+ const ret = { optional: false, variadic: false, default: null };
+ ret.extAttrs = extended_attrs();
+ const opt_token = consume("optional");
if (opt_token) {
ret.optional = true;
- all_ws();
}
ret.idlType = type_with_extended_attributes("argument-type");
if (!ret.idlType) {
- if (opt_token) tokens.unshift(opt_token);
+ unconsume(start_position);
return;
}
- const type_token = last_token;
- if (!ret.optional) {
- all_ws();
- if (tokens.length >= 3 &&
- tokens[0].type === "other" && tokens[0].value === "." &&
- tokens[1].type === "other" && tokens[1].value === "." &&
- tokens[2].type === "other" && tokens[2].value === "."
- ) {
- tokens.shift();
- tokens.shift();
- tokens.shift();
- ret.variadic = true;
- }
+ if (!ret.optional && consume("...")) {
+ ret.variadic = true;
}
- all_ws();
- const name = consume(ID);
+ const name = consume(ID, ...argumentNameKeywords);
if (!name) {
- if (opt_token) tokens.unshift(opt_token);
- tokens.unshift(type_token);
+ unconsume(start_position);
return;
}
- ret.name = name.value;
+ ret.name = unescape(name.value);
+ ret.escapedName = name.value;
if (ret.optional) {
- all_ws();
- const dflt = default_();
- if (typeof dflt !== "undefined") {
- ret["default"] = dflt;
- }
+ ret.default = default_() || null;
}
return ret;
}
- function argument_list(store) {
+ function argument_list() {
const ret = [];
- const arg = argument(store ? ret : null);
- if (!arg) return;
+ const arg = argument();
+ if (!arg) return ret;
ret.push(arg);
while (true) {
- all_ws(store ? ret : null);
- if (!consume(OTHER, ",")) return ret;
- const nxt = argument(store ? ret : null) || error("Trailing comma in arguments list");
+ if (!consume(",")) return ret;
+ const nxt = argument() || error("Trailing comma in arguments list");
ret.push(nxt);
}
}
- function simple_extended_attr(store) {
- all_ws();
+ function simple_extended_attr() {
const name = consume(ID);
if (!name) return;
const ret = {
name: name.value,
- "arguments": null,
+ arguments: null,
type: "extended-attribute",
rhs: null
};
- all_ws();
- const eq = consume(OTHER, "=");
+ const eq = consume("=");
if (eq) {
- all_ws();
- ret.rhs = consume(ID) ||
- consume(FLOAT) ||
- consume(INT) ||
- consume(STR);
- if (!ret.rhs && consume(OTHER, "(")) {
+ ret.rhs = consume(ID, FLOAT, INT, STR);
+ if (ret.rhs) {
+ // No trivia exposure yet
+ ret.rhs.trivia = undefined;
+ }
+ }
+ if (consume("(")) {
+ if (eq && !ret.rhs) {
// [Exposed=(Window,Worker)]
- const rhs_list = [];
- const id = consume(ID);
- if (id) {
- rhs_list.push(id.value);
- }
- identifiers(rhs_list);
- consume(OTHER, ")") || error("Unexpected token in extended attribute argument list or type pair");
ret.rhs = {
type: "identifier-list",
- value: rhs_list
+ value: identifiers()
};
}
- if (!ret.rhs) return error("No right hand side to extended attribute assignment");
- }
- all_ws();
- if (consume(OTHER, "(")) {
- let args, pair;
- // [Constructor(DOMString str)]
- if (args = argument_list(store)) {
- ret["arguments"] = args;
- }
- // [Constructor()]
else {
- ret["arguments"] = [];
+ // [NamedConstructor=Audio(DOMString src)] or [Constructor(DOMString str)]
+ ret.arguments = argument_list();
}
- all_ws();
- consume(OTHER, ")") || error("Unexpected token in extended attribute argument list");
+ consume(")") || error("Unexpected token in extended attribute argument list");
}
+ if (eq && !ret.rhs) error("No right hand side to extended attribute assignment");
return ret;
}
// Note: we parse something simpler than the official syntax. It's all that ever
// seems to be used
- function extended_attrs(store) {
+ function extended_attrs() {
const eas = [];
- all_ws(store);
- if (!consume(OTHER, "[")) return eas;
- eas[0] = simple_extended_attr(store) || error("Extended attribute with not content");
- all_ws();
- while (consume(OTHER, ",")) {
- if (eas.length) {
- eas.push(simple_extended_attr(store));
- } else {
- eas.push(simple_extended_attr(store) || error("Trailing comma in extended attribute"));
- }
+ if (!consume("[")) return eas;
+ eas[0] = simple_extended_attr() || error("Extended attribute with not content");
+ while (consume(",")) {
+ eas.push(simple_extended_attr() || error("Trailing comma in extended attribute"));
}
- all_ws();
- consume(OTHER, "]") || error("No end of extended attribute");
+ consume("]") || error("No end of extended attribute");
return eas;
}
function default_() {
- all_ws();
- if (consume(OTHER, "=")) {
- all_ws();
+ if (consume("=")) {
const def = const_value();
if (def) {
return def;
- } else if (consume(OTHER, "[")) {
- if (!consume(OTHER, "]")) error("Default sequence value must be empty");
+ } else if (consume("[")) {
+ if (!consume("]")) error("Default sequence value must be empty");
return { type: "sequence", value: [] };
} else {
const str = consume(STR) || error("No value for default");
str.value = str.value.slice(1, -1);
+ // No trivia exposure yet
+ str.trivia = undefined;
return str;
}
}
}
- function const_(store) {
- all_ws(store, "pea");
- if (!consume(ID, "const")) return;
+ function const_() {
+ if (!consume("const")) return;
const ret = { type: "const", nullable: false };
- all_ws();
let typ = primitive_type();
if (!typ) {
typ = consume(ID) || error("No type for const");
typ = typ.value;
}
- ret.idlType = { type: "const-type", idlType: typ };
- all_ws();
- if (consume(OTHER, "?")) {
- ret.nullable = true;
- all_ws();
- }
+ ret.idlType = Object.assign({ type: "const-type" }, EMPTY_IDLTYPE, { idlType: typ });
+ type_suffix(ret);
const name = consume(ID) || error("No name for const");
ret.name = name.value;
- all_ws();
- consume(OTHER, "=") || error("No value assignment for const");
- all_ws();
+ consume("=") || error("No value assignment for const");
const cnt = const_value();
if (cnt) ret.value = cnt;
else error("No value for const");
- all_ws();
- consume(OTHER, ";") || error("Unterminated const");
+ consume(";") || error("Unterminated const");
return ret;
}
function inheritance() {
- all_ws();
- if (consume(OTHER, ":")) {
- all_ws();
+ if (consume(":")) {
const inh = consume(ID) || error("No type in inheritance");
return inh.value;
}
}
- function operation_rest(ret, store) {
- all_ws();
+ function operation_rest(ret) {
if (!ret) ret = {};
const name = consume(ID);
- ret.name = name ? name.value : null;
- all_ws();
- consume(OTHER, "(") || error("Invalid operation");
- ret["arguments"] = argument_list(store) || [];
- all_ws();
- consume(OTHER, ")") || error("Unterminated operation");
- all_ws();
- consume(OTHER, ";") || error("Unterminated operation");
+ ret.name = name ? unescape(name.value) : null;
+ ret.escapedName = name ? name.value : null;
+ consume("(") || error("Invalid operation");
+ ret.arguments = argument_list();
+ consume(")") || error("Unterminated operation");
+ consume(";") || error("Unterminated operation");
return ret;
}
- function callback(store) {
- all_ws(store, "pea");
+ function callback() {
let ret;
- if (!consume(ID, "callback")) return;
- all_ws();
- const tok = consume(ID, "interface");
+ if (!consume("callback")) return;
+ const tok = consume("interface");
if (tok) {
- ret = interface_rest(false, store, "callback interface");
+ ret = interface_rest(false, "callback interface");
return ret;
}
const name = consume(ID) || error("No name for callback");
ret = current = { type: "callback", name: sanitize_name(name.value, "callback") };
- all_ws();
- consume(OTHER, "=") || error("No assignment in callback");
- all_ws();
- ret.idlType = return_type();
- all_ws();
- consume(OTHER, "(") || error("No arguments in callback");
- ret["arguments"] = argument_list(store) || [];
- all_ws();
- consume(OTHER, ")") || error("Unterminated callback");
- all_ws();
- consume(OTHER, ";") || error("Unterminated callback");
+ consume("=") || error("No assignment in callback");
+ ret.idlType = return_type() || error("Missing return type");
+ consume("(") || error("No arguments in callback");
+ ret.arguments = argument_list();
+ consume(")") || error("Unterminated callback");
+ consume(";") || error("Unterminated callback");
return ret;
}
- function attribute(store) {
- all_ws(store, "pea");
- const grabbed = [];
+ function attribute({ noInherit = false, readonly = false } = {}) {
+ const start_position = consume_position;
const ret = {
type: "attribute",
static: false,
@@ -585,137 +568,120 @@
inherit: false,
readonly: false
};
- const w = all_ws();
- if (w) grabbed.push(w);
- if (consume(ID, "inherit")) {
- if (ret.static || ret.stringifier) error("Cannot have a static or stringifier inherit");
+ if (!noInherit && consume("inherit")) {
ret.inherit = true;
- grabbed.push(last_token);
- const w = all_ws();
- if (w) grabbed.push(w);
}
- if (consume(ID, "readonly")) {
+ if (consume("readonly")) {
ret.readonly = true;
- grabbed.push(last_token);
- const w = all_ws();
- if (w) grabbed.push(w);
+ } else if (readonly && probe("attribute")) {
+ error("Attributes must be readonly in this context");
}
const rest = attribute_rest(ret);
if (!rest) {
- tokens = grabbed.concat(tokens);
+ unconsume(start_position);
}
return rest;
}
function attribute_rest(ret) {
- if (!consume(ID, "attribute")) {
+ if (!consume("attribute")) {
return;
}
- all_ws();
ret.idlType = type_with_extended_attributes("attribute-type") || error("No type in attribute");
- if (ret.idlType.sequence) error("Attributes cannot accept sequence types");
+ if (ret.idlType.generic === "sequence") error("Attributes cannot accept sequence types");
if (ret.idlType.generic === "record") error("Attributes cannot accept record types");
- all_ws();
- const name = consume(ID) || error("No name in attribute");
- ret.name = name.value;
- all_ws();
- consume(OTHER, ";") || error("Unterminated attribute");
+ const name = consume(ID, "required") || error("No name in attribute");
+ ret.name = unescape(name.value);
+ ret.escapedName = name.value;
+ consume(";") || error("Unterminated attribute");
return ret;
}
- function return_type() {
- const typ = type("return-type");
- if (!typ) {
- if (consume(ID, "void")) {
- return "void";
- } else error("No return type");
+ function return_type(typeName) {
+ const typ = type(typeName || "return-type");
+ if (typ) {
+ return typ;
+ }
+ if (consume("void")) {
+ return Object.assign({ type: "return-type" }, EMPTY_IDLTYPE, { idlType: "void" });
}
- return typ;
}
- function operation(store) {
- all_ws(store, "pea");
+ function operation({ regular = false } = {}) {
const ret = Object.assign({}, EMPTY_OPERATION);
- while (true) {
- all_ws();
- if (consume(ID, "getter")) ret.getter = true;
- else if (consume(ID, "setter")) ret.setter = true;
- else if (consume(ID, "deleter")) ret.deleter = true;
+ while (!regular) {
+ if (consume("getter")) ret.getter = true;
+ else if (consume("setter")) ret.setter = true;
+ else if (consume("deleter")) ret.deleter = true;
else break;
}
- if (ret.getter || ret.setter || ret.deleter) {
- all_ws();
- ret.idlType = return_type();
- operation_rest(ret, store);
- return ret;
- }
- ret.idlType = return_type();
- all_ws();
- operation_rest(ret, store);
+ ret.idlType = return_type() || error("Missing return type");
+ operation_rest(ret);
return ret;
}
- function static_member(store) {
- all_ws(store, "pea");
- if (!consume(ID, "static")) return;
- all_ws();
- return noninherited_attribute(store, "static") ||
- regular_operation(store, "static") ||
+ function static_member() {
+ if (!consume("static")) return;
+ const member = attribute({ noInherit: true }) ||
+ operation({ regular: true }) ||
error("No body in static member");
+ member.static = true;
+ return member;
}
- function stringifier(store) {
- all_ws(store, "pea");
- if (!consume(ID, "stringifier")) return;
- all_ws();
- if (consume(OTHER, ";")) {
+ function stringifier() {
+ if (!consume("stringifier")) return;
+ if (consume(";")) {
return Object.assign({}, EMPTY_OPERATION, { stringifier: true });
}
- return noninherited_attribute(store, "stringifier") ||
- regular_operation(store, "stringifier") ||
+ const member = attribute({ noInherit: true }) ||
+ operation({ regular: true }) ||
error("Unterminated stringifier");
+ member.stringifier = true;
+ return member;
}
- function identifiers(arr) {
+ function identifiers() {
+ const arr = [];
+ const id = consume(ID);
+ if (id) {
+ arr.push(id.value);
+ }
+ else error("Expected identifiers but not found");
while (true) {
- all_ws();
- if (consume(OTHER, ",")) {
- all_ws();
+ if (consume(",")) {
const name = consume(ID) || error("Trailing comma in identifiers list");
arr.push(name.value);
} else break;
}
+ return arr;
}
function iterable_type() {
- if (consume(ID, "iterable")) return "iterable";
- else if (consume(ID, "legacyiterable")) return "legacyiterable";
- else if (consume(ID, "maplike")) return "maplike";
- else if (consume(ID, "setlike")) return "setlike";
+ if (consume("iterable")) return "iterable";
+ else if (consume("legacyiterable")) return "legacyiterable";
+ else if (consume("maplike")) return "maplike";
+ else if (consume("setlike")) return "setlike";
else return;
}
function readonly_iterable_type() {
- if (consume(ID, "maplike")) return "maplike";
- else if (consume(ID, "setlike")) return "setlike";
+ if (consume("maplike")) return "maplike";
+ else if (consume("setlike")) return "setlike";
else return;
}
- function iterable(store) {
- all_ws(store, "pea");
- const grabbed = [];
+ function iterable() {
+ const start_position = consume_position;
const ret = { type: null, idlType: null, readonly: false };
- if (consume(ID, "readonly")) {
+ if (consume("readonly")) {
ret.readonly = true;
- grabbed.push(last_token);
- var w = all_ws();
- if (w) grabbed.push(w);
}
const consumeItType = ret.readonly ? readonly_iterable_type : iterable_type;
const ittype = consumeItType();
if (!ittype) {
- tokens = grabbed.concat(tokens);
+ unconsume(start_position);
return;
}
@@ -724,30 +690,24 @@
ret.type = ittype;
if (ret.type !== 'maplike' && ret.type !== 'setlike')
delete ret.readonly;
- all_ws();
- if (consume(OTHER, "<")) {
+ if (consume("<")) {
ret.idlType = [type_with_extended_attributes()] || error(`Error parsing ${ittype} declaration`);
- all_ws();
if (secondTypeAllowed) {
- if (consume(OTHER, ",")) {
- all_ws();
+ if (consume(",")) {
ret.idlType.push(type_with_extended_attributes());
- all_ws();
}
else if (secondTypeRequired)
error(`Missing second type argument in ${ittype} declaration`);
}
- if (!consume(OTHER, ">")) error(`Unterminated ${ittype} declaration`);
- all_ws();
- if (!consume(OTHER, ";")) error(`Missing semicolon after ${ittype} declaration`);
+ if (!consume(">")) error(`Unterminated ${ittype} declaration`);
+ if (!consume(";")) error(`Missing semicolon after ${ittype} declaration`);
} else
error(`Error parsing ${ittype} declaration`);
return ret;
}
- function interface_rest(isPartial, store, typeName = "interface") {
- all_ws();
+ function interface_rest(isPartial, typeName = "interface") {
const name = consume(ID) || error("No name for interface");
const mems = [];
const ret = current = {
@@ -757,39 +717,27 @@
members: mems
};
if (!isPartial) ret.inheritance = inheritance() || null;
- all_ws();
- consume(OTHER, "{") || error("Bodyless interface");
+ consume("{") || error("Bodyless interface");
while (true) {
- all_ws(store ? mems : null);
- if (consume(OTHER, "}")) {
- all_ws();
- consume(OTHER, ";") || error("Missing semicolon after interface");
+ if (consume("}")) {
+ consume(";") || error("Missing semicolon after interface");
return ret;
}
- const ea = extended_attrs(store ? mems : null);
- all_ws();
- const cnt = const_(store ? mems : null);
- if (cnt) {
- cnt.extAttrs = ea;
- ret.members.push(cnt);
- continue;
- }
- const mem = (opt.allowNestedTypedefs && typedef(store ? mems : null)) ||
- static_member(store ? mems : null) ||
- stringifier(store ? mems : null) ||
- iterable(store ? mems : null) ||
- attribute(store ? mems : null) ||
- operation(store ? mems : null) ||
+ const ea = extended_attrs();
+ const mem = const_() ||
+ static_member() ||
+ stringifier() ||
+ iterable() ||
+ attribute() ||
+ operation() ||
error("Unknown member");
mem.extAttrs = ea;
ret.members.push(mem);
}
}
- function mixin_rest(isPartial, store) {
- all_ws();
- if (!consume(ID, "mixin")) return;
- all_ws();
+ function mixin_rest(isPartial) {
+ if (!consume("mixin")) return;
const name = consume(ID) || error("No name for interface mixin");
const mems = [];
const ret = current = {
@@ -798,44 +746,32 @@
partial: isPartial,
members: mems
};
- all_ws();
- consume(OTHER, "{") || error("Bodyless interface mixin");
+ consume("{") || error("Bodyless interface mixin");
while (true) {
- all_ws(store ? mems : null);
- if (consume(OTHER, "}")) {
- all_ws();
- consume(OTHER, ";") || error("Missing semicolon after interface mixin");
+ if (consume("}")) {
+ consume(";") || error("Missing semicolon after interface mixin");
return ret;
}
- const ea = extended_attrs(store ? mems : null);
- all_ws();
- const cnt = const_(store ? mems : null);
- if (cnt) {
- cnt.extAttrs = ea;
- ret.members.push(cnt);
- continue;
- }
- const mem = stringifier(store ? mems : null) ||
- noninherited_attribute(store ? mems : null) ||
- regular_operation(store ? mems : null) ||
+ const ea = extended_attrs();
+ const mem = const_() ||
+ stringifier() ||
+ attribute({ noInherit: true }) ||
+ operation({ regular: true }) ||
error("Unknown member");
mem.extAttrs = ea;
ret.members.push(mem);
}
}
- function interface_(isPartial, store) {
- all_ws(isPartial ? null : store, "pea");
- if (!consume(ID, "interface")) return;
- return mixin_rest(isPartial, store) ||
- interface_rest(isPartial, store) ||
+ function interface_(isPartial) {
+ if (!consume("interface")) return;
+ return mixin_rest(isPartial) ||
+ interface_rest(isPartial) ||
error("Interface has no proper body");
}
- function namespace(isPartial, store) {
- all_ws(isPartial ? null : store, "pea");
- if (!consume(ID, "namespace")) return;
- all_ws();
+ function namespace(isPartial) {
+ if (!consume("namespace")) return;
const name = consume(ID) || error("No name for namespace");
const mems = [];
const ret = current = {
@@ -844,76 +780,32 @@
partial: isPartial,
members: mems
};
- all_ws();
- consume(OTHER, "{") || error("Bodyless namespace");
+ consume("{") || error("Bodyless namespace");
while (true) {
- all_ws(store ? mems : null);
- if (consume(OTHER, "}")) {
- all_ws();
- consume(OTHER, ";") || error("Missing semicolon after namespace");
+ if (consume("}")) {
+ consume(";") || error("Missing semicolon after namespace");
return ret;
}
- const ea = extended_attrs(store ? mems : null);
- all_ws();
- const mem = noninherited_attribute(store ? mems : null) ||
- regular_operation(store ? mems : null) ||
+ const ea = extended_attrs();
+ const mem = attribute({ noInherit: true, readonly: true }) ||
+ operation({ regular: true }) ||
error("Unknown member");
mem.extAttrs = ea;
ret.members.push(mem);
}
}
- function noninherited_attribute(store, prefix) {
- const w = all_ws(store, "pea");
- const grabbed = [];
- const ret = {
- type: "attribute",
- static: false,
- stringifier: false,
- inherit: false,
- readonly: false
- };
- if (prefix) {
- ret[prefix] = true;
- }
- if (w) grabbed.push(w);
- if (consume(ID, "readonly")) {
- ret.readonly = true;
- grabbed.push(last_token);
- const w = all_ws();
- if (w) grabbed.push(w);
- }
- const rest = attribute_rest(ret);
- if (!rest) {
- tokens = grabbed.concat(tokens);
- }
- return rest;
- }
-
- function regular_operation(store, prefix) {
- all_ws(store, "pea");
- const ret = Object.assign({}, EMPTY_OPERATION);
- if (prefix) {
- ret[prefix] = true;
- }
- ret.idlType = return_type();
- return operation_rest(ret, store);
- }
-
- function partial(store) {
- all_ws(store, "pea");
- if (!consume(ID, "partial")) return;
- const thing = dictionary(true, store) ||
- interface_(true, store) ||
- namespace(true, store) ||
+ function partial() {
+ if (!consume("partial")) return;
+ const thing = dictionary(true) ||
+ interface_(true) ||
+ namespace(true) ||
error("Partial doesn't apply to anything");
return thing;
}
- function dictionary(isPartial, store) {
- all_ws(isPartial ? null : store, "pea");
- if (!consume(ID, "dictionary")) return;
- all_ws();
+ function dictionary(isPartial) {
+ if (!consume("dictionary")) return;
const name = consume(ID) || error("No name for dictionary");
const mems = [];
const ret = current = {
@@ -923,43 +815,34 @@
members: mems
};
if (!isPartial) ret.inheritance = inheritance() || null;
- all_ws();
- consume(OTHER, "{") || error("Bodyless dictionary");
+ consume("{") || error("Bodyless dictionary");
while (true) {
- all_ws(store ? mems : null);
- if (consume(OTHER, "}")) {
- all_ws();
- consume(OTHER, ";") || error("Missing semicolon after dictionary");
+ if (consume("}")) {
+ consume(";") || error("Missing semicolon after dictionary");
return ret;
}
- const ea = extended_attrs(store ? mems : null);
- all_ws(store ? mems : null, "pea");
- const required = consume(ID, "required");
+ const ea = extended_attrs();
+ const required = consume("required");
const typ = type_with_extended_attributes("dictionary-type") || error("No type for dictionary member");
- all_ws();
const name = consume(ID) || error("No name for dictionary member");
- const dflt = default_();
+ const dflt = default_() || null;
if (required && dflt) error("Required member must not have a default");
const member = {
type: "field",
- name: name.value,
+ name: unescape(name.value),
+ escapedName: name.value,
required: !!required,
idlType: typ,
- extAttrs: ea
+ extAttrs: ea,
+ default: dflt
};
- if (typeof dflt !== "undefined") {
- member["default"] = dflt;
- }
ret.members.push(member);
- all_ws();
- consume(OTHER, ";") || error("Unterminated dictionary member");
+ consume(";") || error("Unterminated dictionary member");
}
}
- function enum_(store) {
- all_ws(store, "pea");
- if (!consume(ID, "enum")) return;
- all_ws();
+ function enum_() {
+ if (!consume("enum")) return;
const name = consume(ID) || error("No name for enum");
const vals = [];
const ret = current = {
@@ -967,111 +850,95 @@
name: sanitize_name(name.value, "enum"),
values: vals
};
- all_ws();
- consume(OTHER, "{") || error("No curly for enum");
- let saw_comma = false;
+ consume("{") || error("No curly for enum");
+ let value_expected = true;
while (true) {
- all_ws(store ? vals : null);
- if (consume(OTHER, "}")) {
- all_ws();
- consume(OTHER, ";") || error("No semicolon after enum");
+ if (consume("}")) {
+ if (!ret.values.length) error("No value in enum");
+ consume(";") || error("No semicolon after enum");
return ret;
}
+ else if (!value_expected) {
+ error("No comma between enum values");
+ }
const val = consume(STR) || error("Unexpected value in enum");
val.value = val.value.slice(1, -1);
+ // No trivia exposure yet
+ val.trivia = undefined;
ret.values.push(val);
- all_ws(store ? vals : null);
- if (consume(OTHER, ",")) {
- if (store) vals.push({ type: "," });
- all_ws(store ? vals : null);
- saw_comma = true;
- } else {
- saw_comma = false;
- }
+ value_expected = !!consume(",");
}
}
- function typedef(store) {
- all_ws(store, "pea");
- if (!consume(ID, "typedef")) return;
+ function typedef() {
+ if (!consume("typedef")) return;
const ret = {
type: "typedef"
};
- all_ws();
ret.idlType = type_with_extended_attributes("typedef-type") || error("No type in typedef");
- all_ws();
const name = consume(ID) || error("No name in typedef");
ret.name = sanitize_name(name.value, "typedef");
current = ret;
- all_ws();
- consume(OTHER, ";") || error("Unterminated typedef");
+ consume(";") || error("Unterminated typedef");
return ret;
}
- function implements_(store) {
- all_ws(store, "pea");
+ function implements_() {
+ const start_position = consume_position;
const target = consume(ID);
if (!target) return;
- const w = all_ws();
- if (consume(ID, "implements")) {
+ if (consume("implements")) {
const ret = {
type: "implements",
target: target.value
};
- all_ws();
const imp = consume(ID) || error("Incomplete implements statement");
- ret["implements"] = imp.value;
- all_ws();
- consume(OTHER, ";") || error("No terminating ; for implements statement");
+ ret.implements = imp.value;
+ consume(";") || error("No terminating ; for implements statement");
return ret;
} else {
// rollback
- tokens.unshift(w);
- tokens.unshift(target);
+ unconsume(start_position);
}
}
- function includes(store) {
- all_ws(store, "pea");
+ function includes() {
+ const start_position = consume_position;
const target = consume(ID);
if (!target) return;
- const w = all_ws();
- if (consume(ID, "includes")) {
+ if (consume("includes")) {
const ret = {
type: "includes",
target: target.value
};
- all_ws();
const imp = consume(ID) || error("Incomplete includes statement");
- ret["includes"] = imp.value;
- all_ws();
- consume(OTHER, ";") || error("No terminating ; for includes statement");
+ ret.includes = imp.value;
+ consume(";") || error("No terminating ; for includes statement");
return ret;
} else {
// rollback
- tokens.unshift(w);
- tokens.unshift(target);
+ unconsume(start_position);
}
}
- function definition(store) {
- return callback(store) ||
- interface_(false, store) ||
- partial(store) ||
- dictionary(false, store) ||
- enum_(store) ||
- typedef(store) ||
- implements_(store) ||
- includes(store) ||
- namespace(false, store);
+ function definition() {
+ return callback() ||
+ interface_(false) ||
+ partial() ||
+ dictionary(false) ||
+ enum_() ||
+ typedef() ||
+ implements_() ||
+ includes() ||
+ namespace(false);
}
- function definitions(store) {
+ function definitions() {
if (!tokens.length) return [];
const defs = [];
while (true) {
- const ea = extended_attrs(store ? defs : null);
- const def = definition(store ? defs : null);
+ const ea = extended_attrs();
+ const def = definition();
if (!def) {
if (ea.length) error("Stray extended attributes");
break;
@@ -1081,16 +948,15 @@
}
return defs;
}
- const res = definitions(opt.ws);
- if (tokens.length) error("Unrecognised tokens");
+ const res = definitions();
+ if (consume_position < tokens.length) error("Unrecognised tokens");
return res;
}
const obj = {
- parse(str, opt) {
- if (!opt) opt = {};
+ parse(str) {
const tokens = tokenise(str);
- return parse(tokens, opt);
+ return parse(tokens);
}
};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/lib/writer.js b/tests/wpt/web-platform-tests/resources/webidl2/lib/writer.js
index c00c0dd9322..b3097a6f8a7 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/lib/writer.js
+++ b/tests/wpt/web-platform-tests/resources/webidl2/lib/writer.js
@@ -2,8 +2,6 @@
(() => {
function write(ast, opt = {}) {
- let curPea = "";
- let curTPea = "";
const noop = str => str;
const optNames = "type".split(" ");
const context = [];
@@ -14,23 +12,9 @@
function literal(it) {
return it.value;
};
- function wsPea(it) {
- curPea += it.value;
- return "";
- };
- function wsTPea(it) {
- curTPea += it.value;
- return "";
- };
- function lineComment(it) {
- return `//${it.value}\n`;
- };
- function multilineComment(it) {
- return `/*${it.value}*/`;
- };
function type(it) {
if (typeof it === "string") return opt.type(it); // XXX should maintain some context
- let ret = extended_attributes(it.extAttrs, curPea);
+ let ret = extended_attributes(it.extAttrs);
if (it.union) ret += `(${it.idlType.map(type).join(" or ")})`;
else {
if (it.generic) ret += `${it.generic}<`;
@@ -52,74 +36,56 @@
else if (tp === "sequence") return "[]";
else return `"${it.value}"`;
};
- function argument(arg, pea) {
- let ret = extended_attributes(arg.extAttrs, pea);
+ function argument(arg) {
+ let ret = extended_attributes(arg.extAttrs);
if (arg.optional) ret += "optional ";
ret += type(arg.idlType);
if (arg.variadic) ret += "...";
- ret += ` ${arg.name}`;
- if (arg["default"]) ret += ` = ${const_value(arg["default"])}`;
+ ret += ` ${arg.escapedName}`;
+ if (arg.default) ret += ` = ${const_value(arg.default)}`;
return ret;
};
- function args(its) {
- let res = "";
- let pea = "";
- for (let i = 0, n = its.length; i < n; i++) {
- const arg = its[i];
- if (arg.type === "ws") res += arg.value;
- else if (arg.type === "ws-pea") pea += arg.value;
- else {
- res += argument(arg, pea);
- if (i < n - 1) res += ",";
- pea = "";
- }
- }
- return res;
- };
function make_ext_at(it) {
context.unshift(it);
let ret = it.name;
if (it.rhs) {
- if (it.rhs.type === "identifier-list") ret += `=(${it.rhs.value.join(',')})`;
+ if (it.rhs.type === "identifier-list") ret += `=(${it.rhs.value.join(",")})`;
else ret += `=${it.rhs.value}`;
}
- if (it.arguments) ret += `(${it["arguments"].length ? args(it["arguments"]) : ""})`;
+ if (it.arguments) ret += `(${it.arguments.length ? it.arguments.map(argument).join(",") : ""})`;
context.shift(); // XXX need to add more contexts, but not more than needed for ReSpec
return ret;
};
- function extended_attributes(eats, pea) {
+ function extended_attributes(eats) {
if (!eats || !eats.length) return "";
- return `[${eats.map(make_ext_at).join(", ")}]${pea}`;
+ return `[${eats.map(make_ext_at).join(", ")}]`;
};
- const modifiers = "getter setter creator deleter legacycaller stringifier static".split(" ");
+ const modifiers = "getter setter deleter stringifier static".split(" ");
function operation(it) {
- let ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
+ let ret = extended_attributes(it.extAttrs);
if (it.stringifier && !it.idlType) return "stringifier;";
for (const mod of modifiers) {
if (it[mod]) ret += mod + " ";
}
ret += type(it.idlType) + " ";
- if (it.name) ret += it.name;
- ret += `(${args(it["arguments"])});`;
+ if (it.name) ret += it.escapedName;
+ ret += `(${it.arguments.map(argument).join(",")});`;
return ret;
};
function attribute(it) {
- let ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
- if (it["static"]) ret += "static ";
+ let ret = extended_attributes(it.extAttrs);
+ if (it.static) ret += "static ";
if (it.stringifier) ret += "stringifier ";
- if (it.readonly) ret += "readonly ";
if (it.inherit) ret += "inherit ";
- ret += `attribute ${type(it.idlType)} ${it.name};`;
+ if (it.readonly) ret += "readonly ";
+ ret += `attribute ${type(it.idlType)} ${it.escapedName};`;
return ret;
};
function interface_(it) {
- let ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
+ let ret = extended_attributes(it.extAttrs);
if (it.partial) ret += "partial ";
ret += `interface ${it.name} `;
if (it.inheritance) ret += `: ${it.inheritance} `;
@@ -128,8 +94,7 @@
};
function interface_mixin(it) {
- let ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
+ let ret = extended_attributes(it.extAttrs);
if (it.partial) ret += "partial ";
ret += `interface mixin ${it.name} `;
ret += `{${iterate(it.members)}};`;
@@ -137,8 +102,7 @@
}
function namespace(it) {
- let ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
+ let ret = extended_attributes(it.extAttrs);
if (it.partial) ret += "partial ";
ret += `namespace ${it.name} `;
ret += `{${iterate(it.members)}};`;
@@ -146,8 +110,7 @@
}
function dictionary(it) {
- let ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
+ let ret = extended_attributes(it.extAttrs);
if (it.partial) ret += "partial ";
ret += `dictionary ${it.name} `;
if (it.inheritance) ret += `: ${it.inheritance} `;
@@ -155,49 +118,39 @@
return ret;
};
function field(it) {
- let ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
+ let ret = extended_attributes(it.extAttrs);
if (it.required) ret += "required ";
- ret += `${type(it.idlType)} ${it.name}`;
- if (it["default"]) ret += ` = ${const_value(it["default"])}`;
+ ret += `${type(it.idlType)} ${it.escapedName}`;
+ if (it.default) ret += ` = ${const_value(it.default)}`;
ret += ";";
return ret;
};
function const_(it) {
- const ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
+ const ret = extended_attributes(it.extAttrs);
return `${ret}const ${type(it.idlType)}${it.nullable ? "?" : ""} ${it.name} = ${const_value(it.value)};`;
};
function typedef(it) {
- let ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
- ret += `typedef ${extended_attributes(it.typeExtAttrs, curTPea)}`;
- curTPea = "";
+ let ret = extended_attributes(it.extAttrs);
+ ret += `typedef ${extended_attributes(it.typeExtAttrs)}`;
return `${ret}${type(it.idlType)} ${it.name};`;
};
function implements_(it) {
- const ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
- return `${ret}${it.target} implements ${it["implements"]};`;
+ const ret = extended_attributes(it.extAttrs);
+ return `${ret}${it.target} implements ${it.implements};`;
};
function includes(it) {
- const ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
+ const ret = extended_attributes(it.extAttrs);
return `${ret}${it.target} includes ${it.includes};`;
};
function callback(it) {
- const ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
- return `${ret}callback ${it.name} = ${type(it.idlType)}(${args(it["arguments"])});`;
+ const ret = extended_attributes(it.extAttrs);
+ return `${ret}callback ${it.name} = ${type(it.idlType)}(${it.arguments.map(argument).join(",")});`;
};
function enum_(it) {
- let ret = extended_attributes(it.extAttrs, curPea);
- curPea = "";
+ let ret = extended_attributes(it.extAttrs);
ret += `enum ${it.name} {`;
for (const v of it.values) {
- if (v.type === "string") ret += `"${v.value}"`;
- else if (v.type === "ws") ret += v.value;
- else if (v.type === ",") ret += ",";
+ ret += `"${v.value}",`;
}
return ret + "};";
};
@@ -218,11 +171,6 @@
};
const table = {
- ws: literal,
- "ws-pea": wsPea,
- "ws-tpea": wsTPea,
- "line-comment": lineComment,
- "multiline-comment": multilineComment,
interface: interface_,
"interface mixin": interface_mixin,
namespace,
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/package-lock.json b/tests/wpt/web-platform-tests/resources/webidl2/package-lock.json
index a6f529d6c7f..b0581037fe9 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/package-lock.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "webidl2",
- "version": "10.2.1",
+ "version": "13.0.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -19,9 +19,9 @@
"integrity": "sha512-mOhhTrzieV6VO7odgzFGFapiwRK0ei8RZRhfzHhb6cpX3QM8XXuCLXWjN8qBB7JReDdUR80V3LFfFrGUYevhNg==",
"dev": true,
"requires": {
- "chalk": "2.3.2",
- "esutils": "2.0.2",
- "js-tokens": "3.0.2"
+ "chalk": "^2.0.0",
+ "esutils": "^2.0.2",
+ "js-tokens": "^3.0.0"
}
},
"ansi-regex": {
@@ -36,7 +36,7 @@
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
- "color-convert": "1.9.1"
+ "color-convert": "^1.9.0"
}
},
"arr-diff": {
@@ -45,7 +45,7 @@
"integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
"dev": true,
"requires": {
- "arr-flatten": "1.1.0"
+ "arr-flatten": "^1.0.1"
}
},
"arr-flatten": {
@@ -72,7 +72,7 @@
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
- "balanced-match": "1.0.0",
+ "balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
@@ -82,9 +82,9 @@
"integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
"dev": true,
"requires": {
- "expand-range": "1.8.2",
- "preserve": "0.2.0",
- "repeat-element": "1.1.2"
+ "expand-range": "^1.8.1",
+ "preserve": "^0.2.0",
+ "repeat-element": "^1.1.2"
}
},
"browser-stdout": {
@@ -99,9 +99,9 @@
"integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==",
"dev": true,
"requires": {
- "ansi-styles": "3.2.1",
- "escape-string-regexp": "1.0.5",
- "supports-color": "5.3.0"
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
}
},
"color-convert": {
@@ -110,7 +110,7 @@
"integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==",
"dev": true,
"requires": {
- "color-name": "1.1.3"
+ "color-name": "^1.1.1"
}
},
"color-name": {
@@ -170,7 +170,7 @@
"integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
"dev": true,
"requires": {
- "is-posix-bracket": "0.1.1"
+ "is-posix-bracket": "^0.1.0"
}
},
"expand-range": {
@@ -179,7 +179,7 @@
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
"dev": true,
"requires": {
- "fill-range": "2.2.3"
+ "fill-range": "^2.1.0"
}
},
"expect": {
@@ -188,12 +188,12 @@
"integrity": "sha512-Fiy862jT3qc70hwIHwwCBNISmaqBrfWKKrtqyMJ6iwZr+6KXtcnHojZFtd63TPRvRl8EQTJ+YXYy2lK6/6u+Hw==",
"dev": true,
"requires": {
- "ansi-styles": "3.2.1",
- "jest-diff": "22.4.0",
- "jest-get-type": "22.1.0",
- "jest-matcher-utils": "22.4.0",
- "jest-message-util": "22.4.0",
- "jest-regex-util": "22.1.0"
+ "ansi-styles": "^3.2.0",
+ "jest-diff": "^22.4.0",
+ "jest-get-type": "^22.1.0",
+ "jest-matcher-utils": "^22.4.0",
+ "jest-message-util": "^22.4.0",
+ "jest-regex-util": "^22.1.0"
}
},
"extglob": {
@@ -202,7 +202,7 @@
"integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
"dev": true,
"requires": {
- "is-extglob": "1.0.0"
+ "is-extglob": "^1.0.0"
}
},
"filename-regex": {
@@ -212,16 +212,16 @@
"dev": true
},
"fill-range": {
- "version": "2.2.3",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
- "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=",
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",
+ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==",
"dev": true,
"requires": {
- "is-number": "2.1.0",
- "isobject": "2.1.0",
- "randomatic": "1.1.7",
- "repeat-element": "1.1.2",
- "repeat-string": "1.6.1"
+ "is-number": "^2.1.0",
+ "isobject": "^2.0.0",
+ "randomatic": "^3.0.0",
+ "repeat-element": "^1.1.2",
+ "repeat-string": "^1.5.2"
}
},
"for-in": {
@@ -236,7 +236,7 @@
"integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=",
"dev": true,
"requires": {
- "for-in": "1.0.2"
+ "for-in": "^1.0.1"
}
},
"fs.realpath": {
@@ -251,12 +251,12 @@
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"dev": true,
"requires": {
- "fs.realpath": "1.0.0",
- "inflight": "1.0.6",
- "inherits": "2.0.3",
- "minimatch": "3.0.4",
- "once": "1.4.0",
- "path-is-absolute": "1.0.1"
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
}
},
"glob-base": {
@@ -265,8 +265,8 @@
"integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
"dev": true,
"requires": {
- "glob-parent": "2.0.0",
- "is-glob": "2.0.1"
+ "glob-parent": "^2.0.0",
+ "is-glob": "^2.0.0"
}
},
"glob-parent": {
@@ -275,7 +275,7 @@
"integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
"dev": true,
"requires": {
- "is-glob": "2.0.1"
+ "is-glob": "^2.0.0"
}
},
"growl": {
@@ -302,8 +302,8 @@
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"requires": {
- "once": "1.4.0",
- "wrappy": "1.0.2"
+ "once": "^1.3.0",
+ "wrappy": "1"
}
},
"inherits": {
@@ -330,7 +330,7 @@
"integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=",
"dev": true,
"requires": {
- "is-primitive": "2.0.0"
+ "is-primitive": "^2.0.0"
}
},
"is-extendable": {
@@ -351,7 +351,7 @@
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
"dev": true,
"requires": {
- "is-extglob": "1.0.0"
+ "is-extglob": "^1.0.0"
}
},
"is-number": {
@@ -360,7 +360,7 @@
"integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=",
"dev": true,
"requires": {
- "kind-of": "3.2.2"
+ "kind-of": "^3.0.2"
}
},
"is-posix-bracket": {
@@ -396,10 +396,10 @@
"integrity": "sha512-+/t20WmnkOkB8MOaGaPziI8zWKxquMvYw4Ub+wOzi7AUhmpFXz43buWSxVoZo4J5RnCozpGbX3/FssjJ5KV9Nw==",
"dev": true,
"requires": {
- "chalk": "2.3.2",
- "diff": "3.5.0",
- "jest-get-type": "22.1.0",
- "pretty-format": "22.4.0"
+ "chalk": "^2.0.1",
+ "diff": "^3.2.0",
+ "jest-get-type": "^22.1.0",
+ "pretty-format": "^22.4.0"
}
},
"jest-get-type": {
@@ -414,9 +414,9 @@
"integrity": "sha512-03m3issxUXpWMwDYTfmL8hRNewUB0yCRTeXPm+eq058rZxLHD9f5NtSSO98CWHqe4UyISIxd9Ao9iDVjHWd2qg==",
"dev": true,
"requires": {
- "chalk": "2.3.2",
- "jest-get-type": "22.1.0",
- "pretty-format": "22.4.0"
+ "chalk": "^2.0.1",
+ "jest-get-type": "^22.1.0",
+ "pretty-format": "^22.4.0"
}
},
"jest-message-util": {
@@ -425,11 +425,11 @@
"integrity": "sha512-eyCJB0T3hrlpFF2FqQoIB093OulP+1qvATQmD3IOgJgMGqPL6eYw8TbC5P/VCWPqKhGL51xvjIIhow5eZ2wHFw==",
"dev": true,
"requires": {
- "@babel/code-frame": "7.0.0-beta.40",
- "chalk": "2.3.2",
- "micromatch": "2.3.11",
- "slash": "1.0.0",
- "stack-utils": "1.0.1"
+ "@babel/code-frame": "^7.0.0-beta.35",
+ "chalk": "^2.0.1",
+ "micromatch": "^2.3.11",
+ "slash": "^1.0.0",
+ "stack-utils": "^1.0.1"
}
},
"jest-regex-util": {
@@ -450,8 +450,8 @@
"integrity": "sha512-v7eaGLDMCHXH+fsIaZhptEUJmS8EJpunq7IM4cc4vIT/kSRAkaZ6ZF4ebiNcyUelL0znbvj6o2B5Gh9v7Og0BQ==",
"dev": true,
"requires": {
- "chalk": "2.3.2",
- "diff-match-patch": "1.0.0"
+ "chalk": "^2.3.0",
+ "diff-match-patch": "^1.0.0"
}
},
"kind-of": {
@@ -460,28 +460,34 @@
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"dev": true,
"requires": {
- "is-buffer": "1.1.6"
+ "is-buffer": "^1.1.5"
}
},
+ "math-random": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz",
+ "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=",
+ "dev": true
+ },
"micromatch": {
"version": "2.3.11",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
"integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=",
"dev": true,
"requires": {
- "arr-diff": "2.0.0",
- "array-unique": "0.2.1",
- "braces": "1.8.5",
- "expand-brackets": "0.1.5",
- "extglob": "0.3.2",
- "filename-regex": "2.0.1",
- "is-extglob": "1.0.0",
- "is-glob": "2.0.1",
- "kind-of": "3.2.2",
- "normalize-path": "2.1.1",
- "object.omit": "2.0.1",
- "parse-glob": "3.0.4",
- "regex-cache": "0.4.4"
+ "arr-diff": "^2.0.0",
+ "array-unique": "^0.2.1",
+ "braces": "^1.8.2",
+ "expand-brackets": "^0.1.4",
+ "extglob": "^0.3.1",
+ "filename-regex": "^2.0.0",
+ "is-extglob": "^1.0.0",
+ "is-glob": "^2.0.1",
+ "kind-of": "^3.0.2",
+ "normalize-path": "^2.0.1",
+ "object.omit": "^2.0.0",
+ "parse-glob": "^3.0.4",
+ "regex-cache": "^0.4.2"
}
},
"minimatch": {
@@ -490,7 +496,7 @@
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
- "brace-expansion": "1.1.11"
+ "brace-expansion": "^1.1.7"
}
},
"minimist": {
@@ -538,7 +544,7 @@
"integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==",
"dev": true,
"requires": {
- "has-flag": "2.0.0"
+ "has-flag": "^2.0.0"
}
}
}
@@ -555,7 +561,7 @@
"integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
"dev": true,
"requires": {
- "remove-trailing-separator": "1.1.0"
+ "remove-trailing-separator": "^1.0.1"
}
},
"object.omit": {
@@ -564,8 +570,8 @@
"integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=",
"dev": true,
"requires": {
- "for-own": "0.1.5",
- "is-extendable": "0.1.1"
+ "for-own": "^0.1.4",
+ "is-extendable": "^0.1.1"
}
},
"once": {
@@ -574,7 +580,7 @@
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": {
- "wrappy": "1.0.2"
+ "wrappy": "1"
}
},
"parse-glob": {
@@ -583,10 +589,10 @@
"integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
"dev": true,
"requires": {
- "glob-base": "0.3.0",
- "is-dotfile": "1.0.3",
- "is-extglob": "1.0.0",
- "is-glob": "2.0.1"
+ "glob-base": "^0.3.0",
+ "is-dotfile": "^1.0.0",
+ "is-extglob": "^1.0.0",
+ "is-glob": "^2.0.0"
}
},
"path-is-absolute": {
@@ -607,48 +613,32 @@
"integrity": "sha512-pvCxP2iODIIk9adXlo4S3GRj0BrJiil68kByAa1PrgG97c1tClh9dLMgp3Z6cHFZrclaABt0UH8PIhwHuFLqYA==",
"dev": true,
"requires": {
- "ansi-regex": "3.0.0",
- "ansi-styles": "3.2.1"
+ "ansi-regex": "^3.0.0",
+ "ansi-styles": "^3.2.0"
}
},
"randomatic": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz",
- "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz",
+ "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==",
"dev": true,
"requires": {
- "is-number": "3.0.0",
- "kind-of": "4.0.0"
+ "is-number": "^4.0.0",
+ "kind-of": "^6.0.0",
+ "math-random": "^1.0.1"
},
"dependencies": {
"is-number": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
- "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
- "dev": true,
- "requires": {
- "kind-of": "3.2.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "dev": true,
- "requires": {
- "is-buffer": "1.1.6"
- }
- }
- }
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
+ "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
+ "dev": true
},
"kind-of": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
- "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
- "dev": true,
- "requires": {
- "is-buffer": "1.1.6"
- }
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
}
}
},
@@ -658,7 +648,7 @@
"integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==",
"dev": true,
"requires": {
- "is-equal-shallow": "0.1.3"
+ "is-equal-shallow": "^0.1.3"
}
},
"remove-trailing-separator": {
@@ -697,7 +687,7 @@
"integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==",
"dev": true,
"requires": {
- "has-flag": "3.0.0"
+ "has-flag": "^3.0.0"
}
},
"wrappy": {
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/package.json b/tests/wpt/web-platform-tests/resources/webidl2/package.json
index ab282d189bb..92faccafa81 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/package.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/package.json
@@ -1,7 +1,7 @@
{
"name": "webidl2",
"description": "A WebIDL Parser",
- "version": "10.2.1",
+ "version": "13.0.3",
"contributors": [
"Robin Berjon <robin@berjon.com> (https://berjon.com)",
"Marcos Caceres <marcos@marcosc.com> (https://marcosc.com)",
@@ -20,5 +20,8 @@
"acquire": "node test/util/acquire.js"
},
"repository": "git://github.com/w3c/webidl2.js",
- "main": "index"
+ "main": "index.js",
+ "files": [
+ "lib/*"
+ ]
}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/enum-empty.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/enum-empty.widl
new file mode 100644
index 00000000000..7f189eb62c1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/enum-empty.widl
@@ -0,0 +1 @@
+enum Empty {};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/enum-wo-comma.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/enum-wo-comma.widl
new file mode 100644
index 00000000000..ebc53065ede
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/enum-wo-comma.widl
@@ -0,0 +1 @@
+enum NoComma { "value1" "value2" };
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/extattr-empty-ids.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/extattr-empty-ids.widl
new file mode 100644
index 00000000000..93c48c3ade5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/extattr-empty-ids.widl
@@ -0,0 +1,2 @@
+[Exposed=()]
+interface Unexposed {};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/id-underscored-number.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/id-underscored-number.widl
new file mode 100644
index 00000000000..d00121fd54f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/id-underscored-number.widl
@@ -0,0 +1 @@
+interface _0 {};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/implements_and_includes_ws.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/implements_and_includes_ws.widl
new file mode 100644
index 00000000000..6666daed00c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/implements_and_includes_ws.widl
@@ -0,0 +1,4 @@
+// This hits the unshifting of whitespace in the "implements" and
+// "includes" productions. If there is a bug in that whitespace
+// rollback, the wrong exception will be produced.
+foobar;
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/namespace-readwrite.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/namespace-readwrite.widl
new file mode 100644
index 00000000000..e1841332284
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/namespace-readwrite.widl
@@ -0,0 +1,3 @@
+namespace CSS {
+ attribute object readwrite;
+};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableobjects.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableobjects.widl
index 1deac5aeec9..6c875ff04b5 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableobjects.widl
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/nonnullableobjects.widl
@@ -1,5 +1,6 @@
interface Foo {};
interface NonNullable {
- attribute Foo?? foo;
-}; \ No newline at end of file
+ attribute Foo??
+ foo;
+};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/promise-nullable.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/promise-nullable.widl
new file mode 100644
index 00000000000..894d7c044b2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/promise-nullable.widl
@@ -0,0 +1,4 @@
+interface X {
+ attribute Promise<void>?
+ promise;
+};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/record-single.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/record-single.widl
new file mode 100644
index 00000000000..84db4028243
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/record-single.widl
@@ -0,0 +1,3 @@
+interface Foo {
+ void foo(record<DOMString> param);
+};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-negative-infinity.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-negative-infinity.widl
new file mode 100644
index 00000000000..3d71222e54b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-negative-infinity.widl
@@ -0,0 +1,3 @@
+interface X {
+ const float infinity = - Infinity;
+};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-variadic.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-variadic.widl
new file mode 100644
index 00000000000..6d77e186d66
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/spaced-variadic.widl
@@ -0,0 +1,3 @@
+interface X {
+ void operation(object . . . args);
+};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/union-dangling-or.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/union-dangling-or.widl
new file mode 100644
index 00000000000..0aa043e9aca
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/union-dangling-or.widl
@@ -0,0 +1 @@
+typedef (One or Two or) UnionOr;
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/union-one.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/union-one.widl
new file mode 100644
index 00000000000..86ee96f516d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/union-one.widl
@@ -0,0 +1 @@
+typedef (OnlyOne) UnionOne;
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/union-zero.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/union-zero.widl
new file mode 100644
index 00000000000..177fc4c708f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/union-zero.widl
@@ -0,0 +1 @@
+typedef () UnionZero;
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/unknown-generic.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/unknown-generic.widl
new file mode 100644
index 00000000000..ee4a2db74a6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/idl/unknown-generic.widl
@@ -0,0 +1,3 @@
+interface FetchEvent : Event {
+ ResponsePromise<any> default();
+};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/enum-empty.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/enum-empty.json
new file mode 100644
index 00000000000..734bc67de1f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/enum-empty.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error during or right after parsing `enum Empty`: No value in enum",
+ "line": 1
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/enum-wo-comma.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/enum-wo-comma.json
new file mode 100644
index 00000000000..bfd0b0951fc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/enum-wo-comma.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error during or right after parsing `enum NoComma`: No comma between enum values",
+ "line": 1
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/extattr-empty-ids.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/extattr-empty-ids.json
new file mode 100644
index 00000000000..4337f1e180c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/extattr-empty-ids.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error before parsing any named definition: Expected identifiers but not found",
+ "line": 1
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/id-underscored-number.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/id-underscored-number.json
new file mode 100644
index 00000000000..419ed946fca
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/id-underscored-number.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error before parsing any named definition: No name for interface",
+ "line": 1
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/implements_and_includes_ws.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/implements_and_includes_ws.json
new file mode 100644
index 00000000000..ad9fac6ca2f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/implements_and_includes_ws.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error before parsing any named definition: Unrecognised tokens",
+ "line": 4
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/namespace-readwrite.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/namespace-readwrite.json
new file mode 100644
index 00000000000..d21215111f1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/namespace-readwrite.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error during or right after parsing `namespace CSS`: Attributes must be readonly in this context",
+ "line": 2
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableobjects.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableobjects.json
index 52bd8dac16f..d470ec94a60 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableobjects.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/nonnullableobjects.json
@@ -1,4 +1,4 @@
{
- "message": "Got an error during or right after parsing `interface NonNullable`: Can't nullable more than once"
-, "line": 4
+ "message": "Got an error during or right after parsing `interface NonNullable`: Can't nullable more than once",
+ "line": 4
}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/promise-nullable.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/promise-nullable.json
new file mode 100644
index 00000000000..ced51faf1be
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/promise-nullable.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error during or right after parsing `interface X`: Promise type cannot be nullable",
+ "line": 2
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/readonly-iterable.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/readonly-iterable.json
index 1a09264a6d0..a571b22271b 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/readonly-iterable.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/readonly-iterable.json
@@ -1,4 +1,4 @@
{
- "message": "Got an error during or right after parsing `interface ReadonlyIterable`: Invalid operation",
+ "message": "Got an error during or right after parsing `interface ReadonlyIterable`: Missing return type",
"line": 2
}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/record-key.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/record-key.json
index 179d645d6a7..6f1bb99be90 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/record-key.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/record-key.json
@@ -1,4 +1,4 @@
{
- "message": "Got an error during or right after parsing `interface Foo`: Record key must be DOMString, USVString, or ByteString",
+ "message": "Got an error during or right after parsing `interface Foo`: Record key must be a string type",
"line": 2
}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/record-single.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/record-single.json
new file mode 100644
index 00000000000..ece4fb2fee3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/record-single.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error during or right after parsing `interface Foo`: Missing comma after record key type",
+ "line": 2
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/spaced-negative-infinity.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/spaced-negative-infinity.json
new file mode 100644
index 00000000000..9e5d6180499
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/spaced-negative-infinity.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error during or right after parsing `interface X`: No value for const",
+ "line": 2
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/spaced-variadic.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/spaced-variadic.json
new file mode 100644
index 00000000000..0090abeeb71
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/spaced-variadic.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error during or right after parsing `interface X`: Unterminated operation",
+ "line": 2
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/stringconstants.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/stringconstants.json
index 1eeb31cd3ef..745d6e6e08b 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/stringconstants.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/stringconstants.json
@@ -1,4 +1,4 @@
{
- "message": "Got an error during or right after parsing `interface Util`: No value for const"
+ "message": "Got an error during or right after parsing `interface Util`: No type for const"
, "line": 2
}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/typedef-nested.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/typedef-nested.json
index 8c608149685..e1843cec7d9 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/typedef-nested.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/typedef-nested.json
@@ -1,4 +1,4 @@
{
- "message": "Got an error during or right after parsing `interface Widget`: Invalid operation"
+ "message": "Got an error during or right after parsing `interface Widget`: Missing return type"
, "line": 14
}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/union-dangling-or.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/union-dangling-or.json
new file mode 100644
index 00000000000..68dfd8b2ae6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/union-dangling-or.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error before parsing any named definition: No type after open parenthesis or 'or' in union type",
+ "line": 1
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/union-one.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/union-one.json
new file mode 100644
index 00000000000..476403d6889
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/union-one.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error before parsing any named definition: At least two types are expected in a union type but found less",
+ "line": 1
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/union-zero.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/union-zero.json
new file mode 100644
index 00000000000..68dfd8b2ae6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/union-zero.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error before parsing any named definition: No type after open parenthesis or 'or' in union type",
+ "line": 1
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/unknown-generic.json b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/unknown-generic.json
new file mode 100644
index 00000000000..3703db3b2ab
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/invalid/json/unknown-generic.json
@@ -0,0 +1,4 @@
+{
+ "message": "Got an error during or right after parsing `interface FetchEvent`: Unsupported generic type ResponsePromise",
+ "line": 2
+}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/attributes.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/attributes.widl
index 1d3d5c8e834..f665c1fc472 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/attributes.widl
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/attributes.widl
@@ -6,4 +6,6 @@ interface Person {
// short can take.
attribute unsigned short age;
-}; \ No newline at end of file
+ // required is an allowed attribute name
+ attribute any required;
+};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/generic.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/generic.widl
index 12a1a3f62b0..693cd324e96 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/generic.widl
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/generic.widl
@@ -1,5 +1,5 @@
interface Foo {
- Promise<ResponsePromise<sequence<DOMString?>>> bar();
+ Promise<Promise<sequence<DOMString?>>> bar();
readonly attribute Promise<DOMString> baz;
};
@@ -13,5 +13,5 @@ interface ServiceWorkerClients {
// Extracted from https://slightlyoff.github.io/ServiceWorker/spec/service_worker/ on 2014-05-13
interface FetchEvent : Event {
- ResponsePromise<any> default();
+ Promise<any> default();
};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/identifier-qualified-names.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/identifier-qualified-names.widl
index 986d0bf78c6..c39f84b45a3 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/identifier-qualified-names.widl
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/identifier-qualified-names.widl
@@ -27,6 +27,7 @@
attribute DOMString? _value;
};
-interface Foo {
- void op(object interface);
-}; \ No newline at end of file
+interface FooEventTarget {
+ // Argument names allow some selected keywords
+ void addEventListener(EventListener? callback);
+};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/inherits-getter.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/inherits-getter.widl
index 558e8116494..435b3ab3c8c 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/inherits-getter.widl
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/inherits-getter.widl
@@ -13,4 +13,10 @@ interface Person : Animal {
// Its getter behavior is inherited from Animal, and need not be specified
// the description of Person.
inherit attribute DOMString name;
-}; \ No newline at end of file
+};
+
+interface Ghost : Person {
+
+ // An attribute that only inherits the getter behavior
+ inherit readonly attribute DOMString name;
+};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/linecomment.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/linecomment.widl
deleted file mode 100644
index 5d31bdb62c9..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/linecomment.widl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* first */
-// second
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/promise-void.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/promise-void.widl
new file mode 100644
index 00000000000..c4eac3b75c4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/promise-void.widl
@@ -0,0 +1,3 @@
+interface Cat {
+ attribute Promise<void> meow;
+};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/record.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/record.widl
index c8d9343142c..dbfad3afbfe 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/record.widl
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/record.widl
@@ -2,9 +2,6 @@
interface Foo {
void foo(sequence<record<ByteString, any>> param);
record<DOMString, (float or DOMString)?> bar();
-
- // Make sure record can still be registered as a type.
- record baz();
};
interface Bar {
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/sequence.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/sequence.widl
index d31056cf076..b47c98225c7 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/sequence.widl
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/idl/sequence.widl
@@ -6,11 +6,6 @@ interface Canvas {
// ...
};
-// Make sure sequence can still be registered as a type.
-interface Foo {
- sequence bar();
-};
-
// Extracted from https://heycam.github.io/webidl/#idl-type-extended-attribute-associated-with on 2017-07-01
interface I {
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/allowany.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/allowany.json
index cd5c6e00ac3..2a93518ed94 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/allowany.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/allowany.json
@@ -13,13 +13,14 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "g",
+ "escapedName": "g",
"arguments": [],
"extAttrs": []
},
@@ -32,27 +33,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "g",
+ "escapedName": "g",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "B"
+ "idlType": "B",
+ "extAttrs": []
},
- "name": "b"
+ "name": "b",
+ "escapedName": "b"
}
],
"extAttrs": []
@@ -66,17 +70,19 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "g",
+ "escapedName": "g",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [
{
"name": "AllowAny",
@@ -87,13 +93,14 @@
],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "s"
+ "name": "s",
+ "escapedName": "s"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/attributes.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/attributes.json
index c90c70d7edc..f02cb2187a2 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/attributes.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/attributes.json
@@ -12,13 +12,32 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned short"
+ "idlType": "unsigned short",
+ "extAttrs": []
},
"name": "age",
+ "escapedName": "age",
+ "extAttrs": []
+ },
+ {
+ "type": "attribute",
+ "static": false,
+ "stringifier": false,
+ "inherit": false,
+ "readonly": false,
+ "idlType": {
+ "type": "attribute-type",
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "any",
+ "extAttrs": []
+ },
+ "name": "required",
+ "escapedName": "required",
"extAttrs": []
}
],
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/callback.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/callback.json
index f31067dd25c..89d63aae53d 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/callback.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/callback.json
@@ -4,26 +4,28 @@
"name": "AsyncOperationCallback",
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "status"
+ "name": "status",
+ "escapedName": "status"
}
],
"extAttrs": []
@@ -42,27 +44,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "eventOccurred",
+ "escapedName": "eventOccurred",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "details"
+ "name": "details",
+ "escapedName": "details"
}
],
"extAttrs": []
@@ -76,40 +81,44 @@
"name": "SortCallback",
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "boolean"
+ "idlType": "boolean",
+ "extAttrs": []
},
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "any"
+ "idlType": "any",
+ "extAttrs": []
},
- "name": "a"
+ "name": "a",
+ "escapedName": "a"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "any"
+ "idlType": "any",
+ "extAttrs": []
},
- "name": "b"
+ "name": "b",
+ "escapedName": "b"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/constants.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/constants.json
index 4b98751622c..ef2b8c44ca1 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/constants.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/constants.json
@@ -9,7 +9,11 @@
"nullable": false,
"idlType": {
"type": "const-type",
- "idlType": "boolean"
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "boolean",
+ "extAttrs": []
},
"name": "DEBUG",
"value": {
@@ -23,7 +27,11 @@
"nullable": false,
"idlType": {
"type": "const-type",
- "idlType": "short"
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "short",
+ "extAttrs": []
},
"name": "negative",
"value": {
@@ -37,7 +45,11 @@
"nullable": false,
"idlType": {
"type": "const-type",
- "idlType": "octet"
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "octet",
+ "extAttrs": []
},
"name": "LF",
"value": {
@@ -51,7 +63,11 @@
"nullable": false,
"idlType": {
"type": "const-type",
- "idlType": "unsigned long"
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "BIT_MASK",
"value": {
@@ -65,7 +81,11 @@
"nullable": false,
"idlType": {
"type": "const-type",
- "idlType": "float"
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "float",
+ "extAttrs": []
},
"name": "AVOGADRO",
"value": {
@@ -79,7 +99,11 @@
"nullable": false,
"idlType": {
"type": "const-type",
- "idlType": "unrestricted float"
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "unrestricted float",
+ "extAttrs": []
},
"name": "sobig",
"value": {
@@ -93,7 +117,11 @@
"nullable": false,
"idlType": {
"type": "const-type",
- "idlType": "unrestricted double"
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "unrestricted double",
+ "extAttrs": []
},
"name": "minusonedividedbyzero",
"value": {
@@ -107,7 +135,11 @@
"nullable": false,
"idlType": {
"type": "const-type",
- "idlType": "short"
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "short",
+ "extAttrs": []
},
"name": "notanumber",
"value": {
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/constructor.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/constructor.json
index 292236f291b..efdd1b5a6be 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/constructor.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/constructor.json
@@ -12,13 +12,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "r",
+ "escapedName": "r",
"extAttrs": []
},
{
@@ -29,13 +30,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "cx",
+ "escapedName": "cx",
"extAttrs": []
},
{
@@ -46,13 +48,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "cy",
+ "escapedName": "cy",
"extAttrs": []
},
{
@@ -63,13 +66,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "circumference",
+ "escapedName": "circumference",
"extAttrs": []
}
],
@@ -87,16 +91,18 @@
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
- "name": "radius"
+ "name": "radius",
+ "escapedName": "radius"
}
],
"type": "extended-attribute",
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/dictionary-inherits.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/dictionary-inherits.json
index 9b928f4f0a6..595c35cf797 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/dictionary-inherits.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/dictionary-inherits.json
@@ -7,14 +7,15 @@
{
"type": "field",
"name": "fillPattern",
+ "escapedName": "fillPattern",
"required": false,
"idlType": {
"type": "dictionary-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"extAttrs": [],
"default": {
@@ -25,14 +26,15 @@
{
"type": "field",
"name": "strokePattern",
+ "escapedName": "strokePattern",
"required": false,
"idlType": {
"type": "dictionary-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"extAttrs": [],
"default": {
@@ -42,16 +44,18 @@
{
"type": "field",
"name": "position",
+ "escapedName": "position",
"required": false,
"idlType": {
"type": "dictionary-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Point"
+ "idlType": "Point",
+ "extAttrs": []
},
- "extAttrs": []
+ "extAttrs": [],
+ "default": null
}
],
"inheritance": null,
@@ -65,16 +69,18 @@
{
"type": "field",
"name": "hydrometry",
+ "escapedName": "hydrometry",
"required": false,
"idlType": {
"type": "dictionary-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
- "extAttrs": []
+ "extAttrs": [],
+ "default": null
}
],
"inheritance": "PaintOptions",
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/dictionary.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/dictionary.json
index f74fedc3d35..8bbc6b9dfab 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/dictionary.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/dictionary.json
@@ -7,14 +7,15 @@
{
"type": "field",
"name": "fillPattern",
+ "escapedName": "fillPattern",
"required": false,
"idlType": {
"type": "dictionary-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"extAttrs": [],
"default": {
@@ -25,14 +26,15 @@
{
"type": "field",
"name": "strokePattern",
+ "escapedName": "strokePattern",
"required": false,
"idlType": {
"type": "dictionary-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"extAttrs": [],
"default": {
@@ -42,35 +44,38 @@
{
"type": "field",
"name": "position",
+ "escapedName": "position",
"required": false,
"idlType": {
"type": "dictionary-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Point"
+ "idlType": "Point",
+ "extAttrs": []
},
- "extAttrs": []
+ "extAttrs": [],
+ "default": null
},
{
"type": "field",
"name": "seq",
+ "escapedName": "seq",
"required": false,
"idlType": {
"type": "dictionary-type",
- "sequence": true,
"generic": "sequence",
"nullable": false,
"union": false,
"idlType": {
"type": "dictionary-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
- }
+ "idlType": "long",
+ "extAttrs": []
+ },
+ "extAttrs": []
},
"extAttrs": [],
"default": {
@@ -81,16 +86,18 @@
{
"type": "field",
"name": "reqSeq",
+ "escapedName": "reqSeq",
"required": true,
"idlType": {
"type": "dictionary-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
},
- "extAttrs": []
+ "extAttrs": [],
+ "default": null
}
],
"inheritance": null,
@@ -104,30 +111,34 @@
{
"type": "field",
"name": "h",
+ "escapedName": "h",
"required": false,
"idlType": {
"type": "dictionary-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
},
- "extAttrs": []
+ "extAttrs": [],
+ "default": null
},
{
"type": "field",
"name": "d",
+ "escapedName": "d",
"required": false,
"idlType": {
"type": "dictionary-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
},
- "extAttrs": []
+ "extAttrs": [],
+ "default": null
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/enum.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/enum.json
index 29d1c865b68..11f5d09f54b 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/enum.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/enum.json
@@ -31,13 +31,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "MealType"
+ "idlType": "MealType",
+ "extAttrs": []
},
"name": "type",
+ "escapedName": "type",
"extAttrs": []
},
{
@@ -48,13 +49,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "size",
+ "escapedName": "size",
"extAttrs": []
},
{
@@ -66,41 +68,46 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "initialize",
+ "escapedName": "initialize",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "MealType"
+ "idlType": "MealType",
+ "extAttrs": []
},
- "name": "type"
+ "name": "type",
+ "escapedName": "type"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
- "name": "size"
+ "name": "size",
+ "escapedName": "size"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/equivalent-decl.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/equivalent-decl.json
index de8d4dbc70b..ee079a77790 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/equivalent-decl.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/equivalent-decl.json
@@ -12,13 +12,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "propertyCount",
+ "escapedName": "propertyCount",
"extAttrs": []
},
{
@@ -30,27 +31,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "getProperty",
+ "escapedName": "getProperty",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "propertyName"
+ "name": "propertyName",
+ "escapedName": "propertyName"
}
],
"extAttrs": []
@@ -64,41 +68,46 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "setProperty",
+ "escapedName": "setProperty",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "propertyName"
+ "name": "propertyName",
+ "escapedName": "propertyName"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
- "name": "propertyValue"
+ "name": "propertyValue",
+ "escapedName": "propertyValue"
}
],
"extAttrs": []
@@ -120,13 +129,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "propertyCount",
+ "escapedName": "propertyCount",
"extAttrs": []
},
{
@@ -138,27 +148,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "getProperty",
+ "escapedName": "getProperty",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "propertyName"
+ "name": "propertyName",
+ "escapedName": "propertyName"
}
],
"extAttrs": []
@@ -172,41 +185,46 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "setProperty",
+ "escapedName": "setProperty",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "propertyName"
+ "name": "propertyName",
+ "escapedName": "propertyName"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
- "name": "propertyValue"
+ "name": "propertyValue",
+ "escapedName": "propertyValue"
}
],
"extAttrs": []
@@ -220,27 +238,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": null,
+ "escapedName": null,
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "propertyName"
+ "name": "propertyName",
+ "escapedName": "propertyName"
}
],
"extAttrs": []
@@ -254,41 +275,46 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": null,
+ "escapedName": null,
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "propertyName"
+ "name": "propertyName",
+ "escapedName": "propertyName"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
- "name": "propertyValue"
+ "name": "propertyValue",
+ "escapedName": "propertyValue"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/extended-attributes.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/extended-attributes.json
index e0dc2360f3a..25f56f0340a 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/extended-attributes.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/extended-attributes.json
@@ -78,13 +78,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "double"
+ "idlType": "double",
+ "extAttrs": []
},
"name": "r",
+ "escapedName": "r",
"extAttrs": []
},
{
@@ -95,13 +96,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "double"
+ "idlType": "double",
+ "extAttrs": []
},
"name": "cx",
+ "escapedName": "cx",
"extAttrs": []
},
{
@@ -112,13 +114,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "double"
+ "idlType": "double",
+ "extAttrs": []
},
"name": "cy",
+ "escapedName": "cy",
"extAttrs": []
},
{
@@ -129,13 +132,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "double"
+ "idlType": "double",
+ "extAttrs": []
},
"name": "circumference",
+ "escapedName": "circumference",
"extAttrs": []
}
],
@@ -153,16 +157,18 @@
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "double"
+ "idlType": "double",
+ "extAttrs": []
},
- "name": "radius"
+ "name": "radius",
+ "escapedName": "radius"
}
],
"type": "extended-attribute",
@@ -183,26 +189,25 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": true,
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Node"
+ "idlType": "Node",
+ "extAttrs": []
}
],
"extAttrs": [
@@ -215,6 +220,7 @@
]
},
"name": "attrib",
+ "escapedName": "attrib",
"extAttrs": []
}
],
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/generic.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/generic.json
index 62593859fb1..d3c26ac7cd0 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/generic.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/generic.json
@@ -13,34 +13,35 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": "Promise",
"nullable": false,
"union": false,
"idlType": {
"type": "return-type",
- "sequence": false,
- "generic": "ResponsePromise",
+ "generic": "Promise",
"nullable": false,
"union": false,
"idlType": {
"type": "return-type",
- "sequence": true,
"generic": "sequence",
"nullable": false,
"union": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "DOMString"
- }
- }
- }
+ "idlType": "DOMString",
+ "extAttrs": []
+ },
+ "extAttrs": []
+ },
+ "extAttrs": []
+ },
+ "extAttrs": []
},
"name": "bar",
+ "escapedName": "bar",
"arguments": [],
"extAttrs": []
},
@@ -52,20 +53,21 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": "Promise",
"nullable": false,
"union": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
- }
+ "idlType": "DOMString",
+ "extAttrs": []
+ },
+ "extAttrs": []
},
"name": "baz",
+ "escapedName": "baz",
"extAttrs": []
}
],
@@ -86,20 +88,21 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": "Promise",
"nullable": false,
"union": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "Client"
- }
+ "idlType": "Client",
+ "extAttrs": []
+ },
+ "extAttrs": []
},
"name": "getServiced",
+ "escapedName": "getServiced",
"arguments": [],
"extAttrs": []
},
@@ -112,20 +115,21 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": "Promise",
"nullable": false,
"union": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "any"
- }
+ "idlType": "any",
+ "extAttrs": []
+ },
+ "extAttrs": []
},
"name": "reloadAll",
+ "escapedName": "reloadAll",
"arguments": [],
"extAttrs": []
}
@@ -147,20 +151,21 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
- "generic": "ResponsePromise",
+ "generic": "Promise",
"nullable": false,
"union": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "any"
- }
+ "idlType": "any",
+ "extAttrs": []
+ },
+ "extAttrs": []
},
"name": "default",
+ "escapedName": "default",
"arguments": [],
"extAttrs": []
}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/getter-setter.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/getter-setter.json
index 1213307f203..6f8196fe56d 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/getter-setter.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/getter-setter.json
@@ -12,13 +12,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "propertyCount",
+ "escapedName": "propertyCount",
"extAttrs": []
},
{
@@ -30,27 +31,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": null,
+ "escapedName": null,
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "propertyName"
+ "name": "propertyName",
+ "escapedName": "propertyName"
}
],
"extAttrs": []
@@ -64,41 +68,46 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": null,
+ "escapedName": null,
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "propertyName"
+ "name": "propertyName",
+ "escapedName": "propertyName"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
- "name": "propertyValue"
+ "name": "propertyValue",
+ "escapedName": "propertyValue"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/identifier-qualified-names.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/identifier-qualified-names.json
index f4e295acd3e..098cdcb1fbb 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/identifier-qualified-names.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/identifier-qualified-names.json
@@ -3,11 +3,11 @@
"type": "typedef",
"idlType": {
"type": "typedef-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "number",
"extAttrs": []
@@ -26,27 +26,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "object"
+ "idlType": "object",
+ "extAttrs": []
},
"name": "createObject",
+ "escapedName": "createObject",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "interface"
+ "name": "interface",
+ "escapedName": "_interface"
}
],
"extAttrs": []
@@ -60,27 +63,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": null,
+ "escapedName": null,
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "keyName"
+ "name": "keyName",
+ "escapedName": "keyName"
}
],
"extAttrs": []
@@ -102,13 +108,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "boolean"
+ "idlType": "boolean",
+ "extAttrs": []
},
"name": "const",
+ "escapedName": "_const",
"extAttrs": []
},
{
@@ -119,13 +126,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "value",
+ "escapedName": "_value",
"extAttrs": []
}
],
@@ -134,7 +142,7 @@
},
{
"type": "interface",
- "name": "Foo",
+ "name": "FooEventTarget",
"partial": false,
"members": [
{
@@ -146,27 +154,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
- "name": "op",
+ "name": "addEventListener",
+ "escapedName": "addEventListener",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
- "nullable": false,
+ "nullable": true,
"union": false,
- "idlType": "object"
+ "idlType": "EventListener",
+ "extAttrs": []
},
- "name": "interface"
+ "name": "callback",
+ "escapedName": "callback"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/implements.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/implements.json
index 69879d94f55..1736118cd90 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/implements.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/implements.json
@@ -12,13 +12,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned short"
+ "idlType": "unsigned short",
+ "extAttrs": []
},
"name": "nodeType",
+ "escapedName": "nodeType",
"extAttrs": []
}
],
@@ -39,55 +40,62 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "addEventListener",
+ "escapedName": "addEventListener",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "type"
+ "name": "type",
+ "escapedName": "type"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "EventListener"
+ "idlType": "EventListener",
+ "extAttrs": []
},
- "name": "listener"
+ "name": "listener",
+ "escapedName": "listener"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "boolean"
+ "idlType": "boolean",
+ "extAttrs": []
},
- "name": "useCapture"
+ "name": "useCapture",
+ "escapedName": "useCapture"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/indexed-properties.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/indexed-properties.json
index 697b595546c..dccd511af96 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/indexed-properties.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/indexed-properties.json
@@ -12,13 +12,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "size",
+ "escapedName": "size",
"extAttrs": []
},
{
@@ -30,27 +31,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "any"
+ "idlType": "any",
+ "extAttrs": []
},
"name": "getByIndex",
+ "escapedName": "getByIndex",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
- "name": "index"
+ "name": "index",
+ "escapedName": "index"
}
],
"extAttrs": []
@@ -64,41 +68,46 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "setByIndex",
+ "escapedName": "setByIndex",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
- "name": "index"
+ "name": "index",
+ "escapedName": "index"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "any"
+ "idlType": "any",
+ "extAttrs": []
},
- "name": "value"
+ "name": "value",
+ "escapedName": "value"
}
],
"extAttrs": []
@@ -112,27 +121,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "removeByIndex",
+ "escapedName": "removeByIndex",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
- "name": "index"
+ "name": "index",
+ "escapedName": "index"
}
],
"extAttrs": []
@@ -146,27 +158,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "any"
+ "idlType": "any",
+ "extAttrs": []
},
"name": "get",
+ "escapedName": "get",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "name"
+ "name": "name",
+ "escapedName": "name"
}
],
"extAttrs": []
@@ -180,41 +195,46 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "set",
+ "escapedName": "set",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "name"
+ "name": "name",
+ "escapedName": "name"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "any"
+ "idlType": "any",
+ "extAttrs": []
},
- "name": "value"
+ "name": "value",
+ "escapedName": "value"
}
],
"extAttrs": []
@@ -228,27 +248,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "remove",
+ "escapedName": "remove",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "name"
+ "name": "name",
+ "escapedName": "name"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/inherits-getter.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/inherits-getter.json
index 818d8b6c16f..86eb68e270e 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/inherits-getter.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/inherits-getter.json
@@ -12,13 +12,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "name",
+ "escapedName": "name",
"extAttrs": []
}
],
@@ -38,13 +39,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned short"
+ "idlType": "unsigned short",
+ "extAttrs": []
},
"name": "age",
+ "escapedName": "age",
"extAttrs": []
},
{
@@ -55,17 +57,45 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "name",
+ "escapedName": "name",
"extAttrs": []
}
],
"inheritance": "Animal",
"extAttrs": []
+ },
+ {
+ "type": "interface",
+ "name": "Ghost",
+ "partial": false,
+ "members": [
+ {
+ "type": "attribute",
+ "static": false,
+ "stringifier": false,
+ "inherit": true,
+ "readonly": true,
+ "idlType": {
+ "type": "attribute-type",
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "DOMString",
+ "extAttrs": []
+ },
+ "name": "name",
+ "escapedName": "name",
+ "extAttrs": []
+ }
+ ],
+ "inheritance": "Person",
+ "extAttrs": []
}
]
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/interface-inherits.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/interface-inherits.json
index 74a4c39bb0f..02caf35f605 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/interface-inherits.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/interface-inherits.json
@@ -12,13 +12,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "name",
+ "escapedName": "name",
"extAttrs": []
}
],
@@ -38,13 +39,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Dog"
+ "idlType": "Dog",
+ "extAttrs": []
},
"name": "pet",
+ "escapedName": "pet",
"extAttrs": []
}
],
@@ -64,13 +66,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Human"
+ "idlType": "Human",
+ "extAttrs": []
},
"name": "owner",
+ "escapedName": "owner",
"extAttrs": []
}
],
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/iterable.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/iterable.json
index 7126a4ea2b0..ee906f75ea2 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/iterable.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/iterable.json
@@ -9,11 +9,11 @@
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
}
],
"extAttrs": []
@@ -32,19 +32,19 @@
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "short"
+ "idlType": "short",
+ "extAttrs": []
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "double"
+ "idlType": "double",
+ "extAttrs": []
}
],
"extAttrs": []
@@ -63,7 +63,6 @@
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/legacyiterable.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/legacyiterable.json
index 5a1e526b50a..80fd000a849 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/legacyiterable.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/legacyiterable.json
@@ -9,11 +9,11 @@
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/linecomment.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/linecomment.json
deleted file mode 100644
index 11fd14f494b..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/linecomment.json
+++ /dev/null
@@ -1,14 +0,0 @@
-[
- {
- "type": "multiline-comment",
- "value": " first "
- },
- {
- "type": "ws",
- "value": "\n"
- },
- {
- "type": "line-comment",
- "value": " second"
- }
-]
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/maplike.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/maplike.json
index b86e10487c1..2cb8c360ee3 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/maplike.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/maplike.json
@@ -9,19 +9,19 @@
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
}
],
"readonly": false,
@@ -41,19 +41,19 @@
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
}
],
"readonly": true,
@@ -73,7 +73,6 @@
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
@@ -89,7 +88,6 @@
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/mixin.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/mixin.json
index f0458e2b084..b037cb35779 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/mixin.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/mixin.json
@@ -12,13 +12,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Crypto"
+ "idlType": "Crypto",
+ "extAttrs": []
},
"name": "crypto",
+ "escapedName": "crypto",
"extAttrs": []
}
],
@@ -49,13 +50,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Crypto"
+ "idlType": "Crypto",
+ "extAttrs": []
},
"name": "crypto",
+ "escapedName": "crypto",
"extAttrs": []
}
],
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/namedconstructor.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/namedconstructor.json
index f895461d15e..deb429e986e 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/namedconstructor.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/namedconstructor.json
@@ -21,16 +21,18 @@
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "src"
+ "name": "src",
+ "escapedName": "src"
}
],
"type": "extended-attribute",
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/namespace.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/namespace.json
index 0611b710bf1..9e37b26fa65 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/namespace.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/namespace.json
@@ -12,13 +12,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Vector"
+ "idlType": "Vector",
+ "extAttrs": []
},
"name": "unit",
+ "escapedName": "unit",
"extAttrs": []
},
{
@@ -30,41 +31,46 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "double"
+ "idlType": "double",
+ "extAttrs": []
},
"name": "dotProduct",
+ "escapedName": "dotProduct",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Vector"
+ "idlType": "Vector",
+ "extAttrs": []
},
- "name": "x"
+ "name": "x",
+ "escapedName": "x"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Vector"
+ "idlType": "Vector",
+ "extAttrs": []
},
- "name": "y"
+ "name": "y",
+ "escapedName": "y"
}
],
"extAttrs": []
@@ -78,41 +84,46 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Vector"
+ "idlType": "Vector",
+ "extAttrs": []
},
"name": "crossProduct",
+ "escapedName": "crossProduct",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Vector"
+ "idlType": "Vector",
+ "extAttrs": []
},
- "name": "x"
+ "name": "x",
+ "escapedName": "x"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Vector"
+ "idlType": "Vector",
+ "extAttrs": []
},
- "name": "y"
+ "name": "y",
+ "escapedName": "y"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nointerfaceobject.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nointerfaceobject.json
index 03bb99442d5..cafb5e0e156 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nointerfaceobject.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nointerfaceobject.json
@@ -13,27 +13,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "any"
+ "idlType": "any",
+ "extAttrs": []
},
"name": "lookupEntry",
+ "escapedName": "lookupEntry",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
- "name": "key"
+ "name": "key",
+ "escapedName": "key"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nullable.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nullable.json
index ae4d2aa5375..f325e2eab7b 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nullable.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nullable.json
@@ -9,7 +9,11 @@
"nullable": true,
"idlType": {
"type": "const-type",
- "idlType": "boolean"
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "boolean",
+ "extAttrs": []
},
"name": "ARE_WE_THERE_YET",
"value": {
@@ -35,13 +39,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "namespaceURI",
+ "escapedName": "namespaceURI",
"extAttrs": []
}
],
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nullableobjects.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nullableobjects.json
index 29d1314f168..27ecd25d363 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nullableobjects.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/nullableobjects.json
@@ -29,27 +29,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "f",
+ "escapedName": "f",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "A"
+ "idlType": "A",
+ "extAttrs": []
},
- "name": "x"
+ "name": "x",
+ "escapedName": "x"
}
],
"extAttrs": []
@@ -63,27 +66,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "f",
+ "escapedName": "f",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "B"
+ "idlType": "B",
+ "extAttrs": []
},
- "name": "x"
+ "name": "x",
+ "escapedName": "x"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/operation-optional-arg.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/operation-optional-arg.json
index 44c3a16dc2e..4b7436ba5ba 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/operation-optional-arg.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/operation-optional-arg.json
@@ -13,73 +13,81 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "object"
+ "idlType": "object",
+ "extAttrs": []
},
"name": "createColor",
+ "escapedName": "createColor",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
- "name": "v1"
+ "name": "v1",
+ "escapedName": "v1"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
- "name": "v2"
+ "name": "v2",
+ "escapedName": "v2"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
- "name": "v3"
+ "name": "v3",
+ "escapedName": "v3"
},
{
"optional": true,
"variadic": false,
+ "default": {
+ "type": "number",
+ "value": "3.5"
+ },
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "alpha",
- "default": {
- "type": "number",
- "value": "3.5"
- }
+ "escapedName": "alpha"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/overloading.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/overloading.json
index 87169e9202b..bf7aca6cde3 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/overloading.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/overloading.json
@@ -29,27 +29,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "f",
+ "escapedName": "f",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "A"
+ "idlType": "A",
+ "extAttrs": []
},
- "name": "x"
+ "name": "x",
+ "escapedName": "x"
}
],
"extAttrs": []
@@ -63,27 +66,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "f",
+ "escapedName": "f",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "B"
+ "idlType": "B",
+ "extAttrs": []
},
- "name": "x"
+ "name": "x",
+ "escapedName": "x"
}
],
"extAttrs": []
@@ -106,27 +112,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "f",
+ "escapedName": "f",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "a"
+ "name": "a",
+ "escapedName": "a"
}
],
"extAttrs": []
@@ -140,17 +149,19 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "f",
+ "escapedName": "f",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [
{
"name": "AllowAny",
@@ -161,41 +172,46 @@
],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "a"
+ "name": "a",
+ "escapedName": "a"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "b"
+ "name": "b",
+ "escapedName": "b"
},
{
"optional": false,
"variadic": true,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
- "name": "c"
+ "name": "c",
+ "escapedName": "c"
}
],
"extAttrs": []
@@ -209,13 +225,14 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "f",
+ "escapedName": "f",
"arguments": [],
"extAttrs": []
},
@@ -228,69 +245,78 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "f",
+ "escapedName": "f",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
},
- "name": "a"
+ "name": "a",
+ "escapedName": "a"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "b"
+ "name": "b",
+ "escapedName": "b"
},
{
"optional": true,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "c"
+ "name": "c",
+ "escapedName": "c"
},
{
"optional": false,
"variadic": true,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
- "name": "d"
+ "name": "d",
+ "escapedName": "d"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/overridebuiltins.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/overridebuiltins.json
index d63f8f74411..e54a468eb98 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/overridebuiltins.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/overridebuiltins.json
@@ -12,13 +12,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "length",
+ "escapedName": "length",
"extAttrs": []
},
{
@@ -30,27 +31,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "lookup",
+ "escapedName": "lookup",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "key"
+ "name": "key",
+ "escapedName": "key"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/partial-interface.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/partial-interface.json
index c16c64d334d..d791262f465 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/partial-interface.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/partial-interface.json
@@ -12,13 +12,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "bar",
+ "escapedName": "bar",
"extAttrs": []
}
],
@@ -38,13 +39,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "quux",
+ "escapedName": "quux",
"extAttrs": []
}
],
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/primitives.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/primitives.json
index cf965399a4f..a216221140c 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/primitives.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/primitives.json
@@ -12,13 +12,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "boolean"
+ "idlType": "boolean",
+ "extAttrs": []
},
"name": "truth",
+ "escapedName": "truth",
"extAttrs": []
},
{
@@ -29,13 +30,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "byte"
+ "idlType": "byte",
+ "extAttrs": []
},
"name": "character",
+ "escapedName": "character",
"extAttrs": []
},
{
@@ -46,13 +48,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "octet"
+ "idlType": "octet",
+ "extAttrs": []
},
"name": "value",
+ "escapedName": "value",
"extAttrs": []
},
{
@@ -63,13 +66,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "short"
+ "idlType": "short",
+ "extAttrs": []
},
"name": "number",
+ "escapedName": "number",
"extAttrs": []
},
{
@@ -80,13 +84,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned short"
+ "idlType": "unsigned short",
+ "extAttrs": []
},
"name": "positive",
+ "escapedName": "positive",
"extAttrs": []
},
{
@@ -97,13 +102,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
},
"name": "big",
+ "escapedName": "big",
"extAttrs": []
},
{
@@ -114,13 +120,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "bigpositive",
+ "escapedName": "bigpositive",
"extAttrs": []
},
{
@@ -131,13 +138,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long long"
+ "idlType": "long long",
+ "extAttrs": []
},
"name": "bigbig",
+ "escapedName": "bigbig",
"extAttrs": []
},
{
@@ -148,13 +156,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long long"
+ "idlType": "unsigned long long",
+ "extAttrs": []
},
"name": "bigbigpositive",
+ "escapedName": "bigbigpositive",
"extAttrs": []
},
{
@@ -165,13 +174,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "real",
+ "escapedName": "real",
"extAttrs": []
},
{
@@ -182,13 +192,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "double"
+ "idlType": "double",
+ "extAttrs": []
},
"name": "bigreal",
+ "escapedName": "bigreal",
"extAttrs": []
},
{
@@ -199,13 +210,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unrestricted float"
+ "idlType": "unrestricted float",
+ "extAttrs": []
},
"name": "realwithinfinity",
+ "escapedName": "realwithinfinity",
"extAttrs": []
},
{
@@ -216,13 +228,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unrestricted double"
+ "idlType": "unrestricted double",
+ "extAttrs": []
},
"name": "bigrealwithinfinity",
+ "escapedName": "bigrealwithinfinity",
"extAttrs": []
},
{
@@ -233,13 +246,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "string",
+ "escapedName": "string",
"extAttrs": []
},
{
@@ -250,13 +264,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "ByteString"
+ "idlType": "ByteString",
+ "extAttrs": []
},
"name": "bytes",
+ "escapedName": "bytes",
"extAttrs": []
},
{
@@ -267,13 +282,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Date"
+ "idlType": "Date",
+ "extAttrs": []
},
"name": "date",
+ "escapedName": "date",
"extAttrs": []
},
{
@@ -284,13 +300,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "RegExp"
+ "idlType": "RegExp",
+ "extAttrs": []
},
"name": "regexp",
+ "escapedName": "regexp",
"extAttrs": []
}
],
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/promise-void.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/promise-void.json
new file mode 100644
index 00000000000..7676838b817
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/promise-void.json
@@ -0,0 +1,36 @@
+[
+ {
+ "type": "interface",
+ "name": "Cat",
+ "partial": false,
+ "members": [
+ {
+ "type": "attribute",
+ "static": false,
+ "stringifier": false,
+ "inherit": false,
+ "readonly": false,
+ "idlType": {
+ "type": "attribute-type",
+ "generic": "Promise",
+ "nullable": false,
+ "union": false,
+ "idlType": {
+ "type": "return-type",
+ "generic": null,
+ "nullable": false,
+ "union": false,
+ "idlType": "void",
+ "extAttrs": []
+ },
+ "extAttrs": []
+ },
+ "name": "meow",
+ "escapedName": "meow",
+ "extAttrs": []
+ }
+ ],
+ "inheritance": null,
+ "extAttrs": []
+ }
+]
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/prototyperoot.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/prototyperoot.json
index eda7f14dae4..cec79ff66b6 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/prototyperoot.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/prototyperoot.json
@@ -12,13 +12,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned short"
+ "idlType": "unsigned short",
+ "extAttrs": []
},
"name": "nodeType",
+ "escapedName": "nodeType",
"extAttrs": []
}
],
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/putforwards.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/putforwards.json
index 4b809d2d34d..951b3ef718c 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/putforwards.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/putforwards.json
@@ -12,13 +12,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Name"
+ "idlType": "Name",
+ "extAttrs": []
},
"name": "name",
+ "escapedName": "name",
"extAttrs": [
{
"name": "PutForwards",
@@ -39,13 +40,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned short"
+ "idlType": "unsigned short",
+ "extAttrs": []
},
"name": "age",
+ "escapedName": "age",
"extAttrs": []
}
],
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/record.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/record.json
index dd00b5df045..1be5427c74d 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/record.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/record.json
@@ -13,51 +13,54 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "foo",
+ "escapedName": "foo",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": true,
"generic": "sequence",
"nullable": false,
"union": false,
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": "record",
"nullable": false,
"union": false,
"idlType": [
{
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "ByteString"
+ "idlType": "ByteString",
+ "extAttrs": []
},
{
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "any"
+ "idlType": "any",
+ "extAttrs": []
}
- ]
- }
+ ],
+ "extAttrs": []
+ },
+ "extAttrs": []
},
- "name": "param"
+ "name": "param",
+ "escapedName": "param"
}
],
"extAttrs": []
@@ -71,66 +74,48 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": "record",
"nullable": false,
"union": false,
"idlType": [
{
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
{
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": true,
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
}
- ]
+ ],
+ "extAttrs": []
}
- ]
+ ],
+ "extAttrs": []
},
"name": "bar",
- "arguments": [],
- "extAttrs": []
- },
- {
- "type": "operation",
- "getter": false,
- "setter": false,
- "deleter": false,
- "static": false,
- "stringifier": false,
- "idlType": {
- "type": "return-type",
- "sequence": false,
- "generic": null,
- "nullable": false,
- "union": false,
- "idlType": "record"
- },
- "name": "baz",
+ "escapedName": "bar",
"arguments": [],
"extAttrs": []
}
@@ -143,33 +128,35 @@
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": "record",
"nullable": false,
"union": false,
"idlType": [
{
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "USVString"
+ "idlType": "USVString",
+ "extAttrs": []
},
{
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "USVString"
+ "idlType": "USVString",
+ "extAttrs": []
}
- ]
+ ],
+ "extAttrs": []
},
- "name": "init"
+ "name": "init",
+ "escapedName": "init"
}
],
"type": "extended-attribute",
@@ -191,22 +178,20 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": "record",
"nullable": false,
"union": false,
"idlType": [
{
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
{
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
@@ -220,9 +205,11 @@
}
]
}
- ]
+ ],
+ "extAttrs": []
},
"name": "bar",
+ "escapedName": "bar",
"arguments": [],
"extAttrs": []
}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/reg-operations.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/reg-operations.json
index d696e907e0c..8795c59ec87 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/reg-operations.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/reg-operations.json
@@ -12,13 +12,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "width",
+ "escapedName": "width",
"extAttrs": []
},
{
@@ -29,13 +30,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "height",
+ "escapedName": "height",
"extAttrs": []
}
],
@@ -56,13 +58,14 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "boolean"
+ "idlType": "boolean",
+ "extAttrs": []
},
"name": "isMouseOver",
+ "escapedName": "isMouseOver",
"arguments": [],
"extAttrs": []
},
@@ -75,27 +78,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "setDimensions",
+ "escapedName": "setDimensions",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Dimensions"
+ "idlType": "Dimensions",
+ "extAttrs": []
},
- "name": "size"
+ "name": "size",
+ "escapedName": "size"
}
],
"extAttrs": []
@@ -109,41 +115,46 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "setDimensions",
+ "escapedName": "setDimensions",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
- "name": "width"
+ "name": "width",
+ "escapedName": "width"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
- "name": "height"
+ "name": "height",
+ "escapedName": "height"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/replaceable.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/replaceable.json
index a10b0bfd03b..133891d461d 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/replaceable.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/replaceable.json
@@ -12,13 +12,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "value",
+ "escapedName": "value",
"extAttrs": [
{
"name": "Replaceable",
@@ -37,13 +38,14 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "increment",
+ "escapedName": "increment",
"arguments": [],
"extAttrs": []
}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/sequence.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/sequence.json
index c2d1765bfa5..ead0cdd862c 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/sequence.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/sequence.json
@@ -13,34 +13,37 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "drawPolygon",
+ "escapedName": "drawPolygon",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": true,
"generic": "sequence",
"nullable": false,
"union": false,
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
- }
+ "idlType": "float",
+ "extAttrs": []
+ },
+ "extAttrs": []
},
- "name": "coordinates"
+ "name": "coordinates",
+ "escapedName": "coordinates"
}
],
"extAttrs": []
@@ -54,48 +57,21 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": true,
"generic": "sequence",
"nullable": false,
"union": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
- }
+ "idlType": "float",
+ "extAttrs": []
+ },
+ "extAttrs": []
},
"name": "getInflectionPoints",
- "arguments": [],
- "extAttrs": []
- }
- ],
- "inheritance": null,
- "extAttrs": []
- },
- {
- "type": "interface",
- "name": "Foo",
- "partial": false,
- "members": [
- {
- "type": "operation",
- "getter": false,
- "setter": false,
- "deleter": false,
- "static": false,
- "stringifier": false,
- "idlType": {
- "type": "return-type",
- "sequence": false,
- "generic": null,
- "nullable": false,
- "union": false,
- "idlType": "sequence"
- },
- "name": "bar",
+ "escapedName": "getInflectionPoints",
"arguments": [],
"extAttrs": []
}
@@ -117,27 +93,27 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "f1",
+ "escapedName": "f1",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": true,
"generic": "sequence",
"nullable": false,
"union": false,
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
@@ -150,9 +126,11 @@
"rhs": null
}
]
- }
+ },
+ "extAttrs": []
},
- "name": "arg"
+ "name": "arg",
+ "escapedName": "arg"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/setlike.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/setlike.json
index 12299a7ee04..d8583538fd0 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/setlike.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/setlike.json
@@ -9,11 +9,11 @@
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
}
],
"readonly": false,
@@ -33,11 +33,11 @@
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
}
],
"readonly": true,
@@ -57,7 +57,6 @@
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/static.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/static.json
index 0951b2acf5f..d0ddf35ec6e 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/static.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/static.json
@@ -20,13 +20,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "cx",
+ "escapedName": "cx",
"extAttrs": []
},
{
@@ -37,13 +38,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "cy",
+ "escapedName": "cy",
"extAttrs": []
},
{
@@ -54,13 +56,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "radius",
+ "escapedName": "radius",
"extAttrs": []
},
{
@@ -71,13 +74,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
},
"name": "triangulationCount",
+ "escapedName": "triangulationCount",
"extAttrs": []
},
{
@@ -89,55 +93,62 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Point"
+ "idlType": "Point",
+ "extAttrs": []
},
"name": "triangulate",
+ "escapedName": "triangulate",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Circle"
+ "idlType": "Circle",
+ "extAttrs": []
},
- "name": "c1"
+ "name": "c1",
+ "escapedName": "c1"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Circle"
+ "idlType": "Circle",
+ "extAttrs": []
},
- "name": "c2"
+ "name": "c2",
+ "escapedName": "c2"
},
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Circle"
+ "idlType": "Circle",
+ "extAttrs": []
},
- "name": "c3"
+ "name": "c3",
+ "escapedName": "c3"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-attribute.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-attribute.json
index 36e2b6d50ac..dbca7f17902 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-attribute.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-attribute.json
@@ -12,13 +12,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "id",
+ "escapedName": "id",
"extAttrs": []
},
{
@@ -29,13 +30,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "name",
+ "escapedName": "name",
"extAttrs": []
}
],
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-custom.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-custom.json
index 3dc3ac1758c..c13df6ef10c 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-custom.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier-custom.json
@@ -12,13 +12,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "id",
+ "escapedName": "id",
"extAttrs": []
},
{
@@ -29,13 +30,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "familyName",
+ "escapedName": "familyName",
"extAttrs": []
},
{
@@ -46,13 +48,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "givenName",
+ "escapedName": "givenName",
"extAttrs": []
},
{
@@ -64,13 +67,14 @@
"stringifier": true,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": null,
+ "escapedName": null,
"arguments": [],
"extAttrs": []
}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier.json
index 1a702765b0a..a4f23e03f66 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/stringifier.json
@@ -13,13 +13,14 @@
"stringifier": true,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": null,
+ "escapedName": null,
"arguments": [],
"extAttrs": []
}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/treatasnull.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/treatasnull.json
index 611d9741043..d5156bcb4f1 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/treatasnull.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/treatasnull.json
@@ -12,13 +12,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "name",
+ "escapedName": "name",
"extAttrs": []
},
{
@@ -29,13 +30,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "owner",
+ "escapedName": "owner",
"extAttrs": []
},
{
@@ -47,17 +49,19 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "boolean"
+ "idlType": "boolean",
+ "extAttrs": []
},
"name": "isMemberOfBreed",
+ "escapedName": "isMemberOfBreed",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [
{
"name": "TreatNullAs",
@@ -71,13 +75,14 @@
],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "breedName"
+ "name": "breedName",
+ "escapedName": "breedName"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/treatasundefined.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/treatasundefined.json
index 258acdabd85..1e98315d9f1 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/treatasundefined.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/treatasundefined.json
@@ -12,13 +12,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "name",
+ "escapedName": "name",
"extAttrs": []
},
{
@@ -29,13 +30,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
"name": "owner",
+ "escapedName": "owner",
"extAttrs": []
},
{
@@ -47,17 +49,19 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "boolean"
+ "idlType": "boolean",
+ "extAttrs": []
},
"name": "isMemberOfBreed",
+ "escapedName": "isMemberOfBreed",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [
{
"name": "TreatUndefinedAs",
@@ -71,13 +75,14 @@
],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
},
- "name": "breedName"
+ "name": "breedName",
+ "escapedName": "breedName"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typedef-union.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typedef-union.json
index 06735a80791..31e24198ab1 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typedef-union.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typedef-union.json
@@ -3,44 +3,44 @@
"type": "typedef",
"idlType": {
"type": "typedef-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": true,
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "ImageData"
+ "idlType": "ImageData",
+ "extAttrs": []
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "HTMLImageElement"
+ "idlType": "HTMLImageElement",
+ "extAttrs": []
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "HTMLCanvasElement"
+ "idlType": "HTMLCanvasElement",
+ "extAttrs": []
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "HTMLVideoElement"
+ "idlType": "HTMLVideoElement",
+ "extAttrs": []
}
- ]
+ ],
+ "extAttrs": []
},
"name": "TexImageSource",
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typedef.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typedef.json
index 5e9715da8fb..35f988e721e 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typedef.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typedef.json
@@ -12,13 +12,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "x",
+ "escapedName": "x",
"extAttrs": []
},
{
@@ -29,13 +30,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
"name": "y",
+ "escapedName": "y",
"extAttrs": []
}
],
@@ -46,18 +48,18 @@
"type": "typedef",
"idlType": {
"type": "typedef-type",
- "sequence": true,
"generic": "sequence",
"nullable": false,
"union": false,
"idlType": {
"type": "typedef-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Point"
- }
+ "idlType": "Point",
+ "extAttrs": []
+ },
+ "extAttrs": []
},
"name": "PointSequence",
"extAttrs": []
@@ -75,13 +77,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Point"
+ "idlType": "Point",
+ "extAttrs": []
},
"name": "topleft",
+ "escapedName": "topleft",
"extAttrs": []
},
{
@@ -92,13 +95,14 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Point"
+ "idlType": "Point",
+ "extAttrs": []
},
"name": "bottomright",
+ "escapedName": "bottomright",
"extAttrs": []
}
],
@@ -118,13 +122,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Rect"
+ "idlType": "Rect",
+ "extAttrs": []
},
"name": "bounds",
+ "escapedName": "bounds",
"extAttrs": []
},
{
@@ -136,27 +141,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "boolean"
+ "idlType": "boolean",
+ "extAttrs": []
},
"name": "pointWithinBounds",
+ "escapedName": "pointWithinBounds",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Point"
+ "idlType": "Point",
+ "extAttrs": []
},
- "name": "p"
+ "name": "p",
+ "escapedName": "p"
}
],
"extAttrs": []
@@ -170,27 +178,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "boolean"
+ "idlType": "boolean",
+ "extAttrs": []
},
"name": "allPointsWithinBounds",
+ "escapedName": "allPointsWithinBounds",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "PointSequence"
+ "idlType": "PointSequence",
+ "extAttrs": []
},
- "name": "ps"
+ "name": "ps",
+ "escapedName": "ps"
}
],
"extAttrs": []
@@ -203,7 +214,6 @@
"type": "typedef",
"idlType": {
"type": "typedef-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typesuffixes.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typesuffixes.json
index be0b1f22682..52870c22f4b 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typesuffixes.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/typesuffixes.json
@@ -13,34 +13,37 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "test",
+ "escapedName": "test",
"arguments": [
{
"optional": false,
"variadic": false,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": true,
"generic": "sequence",
"nullable": true,
"union": false,
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": true,
"union": false,
- "idlType": "DOMString"
- }
+ "idlType": "DOMString",
+ "extAttrs": []
+ },
+ "extAttrs": []
},
- "name": "foo"
+ "name": "foo",
+ "escapedName": "foo"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/uniontype.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/uniontype.json
index 87735c7fb63..90eb074ef3a 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/uniontype.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/uniontype.json
@@ -12,72 +12,73 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": true,
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "float"
+ "idlType": "float",
+ "extAttrs": []
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": true,
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Date"
+ "idlType": "Date",
+ "extAttrs": []
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Event"
+ "idlType": "Event",
+ "extAttrs": []
}
- ]
+ ],
+ "extAttrs": []
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": true,
"union": true,
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Node"
+ "idlType": "Node",
+ "extAttrs": []
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "DOMString"
+ "idlType": "DOMString",
+ "extAttrs": []
}
- ]
+ ],
+ "extAttrs": []
}
- ]
+ ],
+ "extAttrs": []
},
"name": "test",
+ "escapedName": "test",
"extAttrs": []
},
{
@@ -88,14 +89,12 @@
"readonly": false,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": true,
"idlType": [
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
@@ -111,15 +110,17 @@
},
{
"type": null,
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "Date"
+ "idlType": "Date",
+ "extAttrs": []
}
- ]
+ ],
+ "extAttrs": []
},
"name": "test2",
+ "escapedName": "test2",
"extAttrs": []
}
],
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/variadic-operations.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/variadic-operations.json
index 53b02dfb4cc..3280b7b6a78 100644
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/variadic-operations.json
+++ b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/json/variadic-operations.json
@@ -12,13 +12,14 @@
"readonly": true,
"idlType": {
"type": "attribute-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "unsigned long"
+ "idlType": "unsigned long",
+ "extAttrs": []
},
"name": "cardinality",
+ "escapedName": "cardinality",
"extAttrs": []
},
{
@@ -30,27 +31,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "union",
+ "escapedName": "union",
"arguments": [
{
"optional": false,
"variadic": true,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
},
- "name": "ints"
+ "name": "ints",
+ "escapedName": "ints"
}
],
"extAttrs": []
@@ -64,27 +68,30 @@
"stringifier": false,
"idlType": {
"type": "return-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "void"
+ "idlType": "void",
+ "extAttrs": []
},
"name": "intersection",
+ "escapedName": "intersection",
"arguments": [
{
"optional": false,
"variadic": true,
+ "default": null,
"extAttrs": [],
"idlType": {
"type": "argument-type",
- "sequence": false,
"generic": null,
"nullable": false,
"union": false,
- "idlType": "long"
+ "idlType": "long",
+ "extAttrs": []
},
- "name": "ints"
+ "name": "ints",
+ "escapedName": "ints"
}
],
"extAttrs": []
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/opt/linecomment.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/opt/linecomment.json
deleted file mode 100644
index fbcdbf4b719..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/opt/linecomment.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "ws": true
-}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/opt/typedef-nested.json b/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/opt/typedef-nested.json
deleted file mode 100644
index f0794e74e07..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/syntax/opt/typedef-nested.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "allowNestedTypedefs": true
-} \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/.gitignore b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/.gitignore
deleted file mode 100644
index bffeb270d0e..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-obj/
-test/valid/obj
-test/invalid/obj
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/LICENSE b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/LICENSE
deleted file mode 100644
index d6456956733..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/Makefile b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/Makefile
deleted file mode 100644
index d517466e48d..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/Makefile
+++ /dev/null
@@ -1,158 +0,0 @@
-########################################################################
-# $Id$
-# Copyright 2009 Aplix Corporation. All rights reserved.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-########################################################################
-
-UNAME = $(shell uname)
-INCDIRS = $(OBJDIR)
-SRCDIR = src
-DOCDIR = doc
-EXAMPLESDIR = examples
-OBJDIR = obj
-
-########################################################################
-# Linux configuration
-#
-ifneq (,$(filter Linux%, $(UNAME)))
-
-CFLAGS = -g -Wall -Werror -O0 $(patsubst %, -I%, $(INCDIRS))
-OBJSUFFIX = .o
-EXESUFFIX =
-#LIBS = -lefence
-OBJOPTION = -o
-EXEOPTION = -o
-
-else
-########################################################################
-# Darwin configuration
-#
-ifneq (,$(filter Darwin%, $(UNAME)))
-
-CFLAGS = -g -Wall -Werror -O2 $(patsubst %, -I%, $(INCDIRS))
-OBJSUFFIX = .o
-EXESUFFIX =
-OBJOPTION = -o
-# The -o in the following line has a space after it, which must not be removed.
-EXEOPTION = -o
-
-else
-########################################################################
-# Windows (cygwin but using MS compiler) configuration
-#
-# this is messy - should probably use vcvars.bat
-ifneq (,$(filter CYGWIN%, $(UNAME)))
-VISUALSTUDIODIR = $(wildcard /cygdrive/c/Program*Files/Microsoft*Visual*Studio*8)
-SDKDIR = $(wildcard /cygdrive/c/Program*Files/Microsoft*SDKs/Windows/*/Lib)
-ifeq (,$(VISUALSTUDIODIR))
-VISUALSTUDIODIR = $(wildcard /cygdrive/c/Program\ Files\ */Microsoft*Visual*Studio*10*)
-endif
-ifeq (,$(VISUALSTUDIODIR))
-VISUALSTUDIODIR = $(wildcard /cygdrive/c/Program\ Files\ */Microsoft*Visual*Studio*11*)
-endif
-# this is revelvant for vs2012 and windows 8 - sdk location has changed
-ifeq (,$(SDKDIR))
-SDKDIR = $(wildcard /cygdrive/c/Program\ Files\ */Windows*Kits)
-endif
-
-ifeq (,$(VISUALSTUDIODIR))
-$(error Could not find MS Visual Studio)
-else
-WINVISUALSTUDIODIR = $(shell cygpath -w '$(VISUALSTUDIODIR)')
-WINSDKDIR = $(shell cygpath -w '$(SDKDIR)')
-
-#$(error $(VISUALSTUDIODIR))
-
-CC = \
- Lib='$(WINVISUALSTUDIODIR)\VC\LIB;$(WINVISUALSTUDIODIR)\VC\PlatformSDK\Lib;$(WINSDKDIR)' \
- PATH='$(VISUALSTUDIODIR)/Common7/IDE:$(VISUALSTUDIODIR)/VC/BIN:$(VISUALSTUDIODIR)/Common7/Tools:$(VISUALSTUDIODIR)/SDK/v2.0/bin:$(VISUALSTUDIODIR)/8.0/Lib/win8/um/x86:'$$PATH \
- Include='$(WINVISUALSTUDIODIR)\VC\INCLUDE;$(WINVISUALSTUDIODIR)\VC\PlatformSDK\Include' \
- cl
-endif
-
-CFLAGS = /nologo /WX /W3 /wd4996 /Zi /O2 $(patsubst %, /I%, $(INCDIRS))
-OBJSUFFIX = .obj
-EXESUFFIX = .exe
-OBJOPTION = /Fo
-EXEOPTION = /Fe
-
-endif
-endif
-endif
-
-########################################################################
-# Common makefile
-#
-WIDLPROC = $(OBJDIR)/widlproc$(EXESUFFIX)
-DTD = $(OBJDIR)/widlprocxml.dtd
-
-ALL = $(WIDLPROC) $(DTD)
-all : $(ALL)
-
-SRCS = \
- comment.c \
- lex.c \
- main.c \
- misc.c \
- node.c \
- parse.c \
- process.c
-
-OBJS = $(patsubst %.c, $(OBJDIR)/%$(OBJSUFFIX), $(SRCS))
-$(WIDLPROC) : $(OBJS)
- $(CC) $(CFLAGS) $(EXEOPTION)$@ $^ $(LIBS)
-
-$(OBJDIR)/%$(OBJSUFFIX) : $(SRCDIR)/%.c
- mkdir -p $(dir $@)
- $(CC) $(CFLAGS) $(OBJOPTION)$@ -c $<
-
-$(OBJDIR)/%.d : $(SRCDIR)/%.c
- mkdir -p $(dir $@)
- cc $(patsubst %, -I%, $(INCDIRS)) -MM -MG -MT $(patsubst %.d, %$(OBJSUFFIX), $@) $< | sed '$(patsubst %, s| \(%\)| $(OBJDIR)/\1|;, $(AUTOGENHEADERS))' >$@
-
-include $(patsubst %.c, $(OBJDIR)/%.d, $(SRCS))
-
-
-$(DTD) : $(DOCDIR)/htmltodtd.xsl $(DOCDIR)/widlproc.html
- xsltproc -html $^ >$@
-
-clean :
- rm -f $(ALL) $(OBJS)
-
-veryclean :
- rm -rf $(OBJDIR)
-
-SVNFILES = $(shell test -d .svn && svn info -R . | sed -n 's/^Path: \(.*\)$$/\1/p')
-SVNBRANCH = $(shell test -d .svn && svn info . | sed -n 's|^URL:.*/\([^/]*\)$$|\1|p')
-SVNREV = $(shell test -d .svn && svn info -R . | sed -n 's/^Last Changed Rev: \([0-9][0-9]*\)$$/\1/p' | sort -g | tail -1)
-
-SVNLOG = history
-$(SVNLOG) : $(SVNFILES)
- svn log -vrHEAD:311 >$@
-
-zip : $(OBJDIR)/widlproc-$(SVNBRANCH)$(SVNREV).zip
-$(OBJDIR)/widlproc-$(SVNBRANCH)$(SVNREV).zip : $(WIDLPROC) $(DTD) $(DOCDIR)/widlproc.html $(SRCDIR)/widlprocxmltohtml.xsl Makefile $(SVNLOG)
- rm -f $@
- zip -j $@ $^ -x Makefile
- zip $@ examples/*.widl examples/*.css examples/Makefile examples/README examples/*.xsl examples/*.html
-
-srczip : widlproc-src-$(SVNBRANCH)$(SVNREV).zip
-
-widlproc-src-%.zip : $(SVNFILES) $(SVNLOG)
- zip $@ $^
-
-examples :
- $(MAKE) -C examples SRCDIR=../src OBJDIR=../obj EXAMPLESOBJDIR=../obj/examples
-
-test : $(OBJS)
- $(MAKE) -C test SRCDIR=../src OBJDIR=../obj
-
-.DELETE_ON_ERROR:
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/README.md b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/README.md
deleted file mode 100644
index 8ed824e7d9d..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/README.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# Uses
-
-widlproc can be used to validate WebIDL in W3C specifications. It serves as the basis for the [W3C Web IDL on-line checker](http://www.w3.org/2009/07/webidl-check).
-
-widlproc's generated XML is used to generate [webinos JavaScript APIs specifications](http://dev.webinos.org/specifications/draft/).
-
-# License
-
-widlproc is licensed under the Apache 2 License.
-
-# Others
-
-See also [webidl.js](https://github.com/darobin/webidl.js), a JavaScript-based Web IDL parser used by various tools in W3C.
-
-# Credits
-
-Most of the work on widlproc was done by Tim Renouf and Paddy Byers. Aplix corporation owns the copyright of the code up to June 2011.
-
-The tool is kept up to date with the changes in the spec by Dominique Hazael-Massieux, through funding from the [webinos project](http://webinos.org/) since June 2011.
-
-# Documentation
-
-See doc/widlproc.html in the tree.
-
-# Build Instructions
-
-## Windows
-
-Install requirements
-* Cygwin - must install must install libs/libxslt
-* Visual Studio express 2012 or 2010 (see difference below)
-
-makefile uses cygwin make. References are coded in the make file to detect teh current version of visual studio
-
-# Future work
-windows build could be improved to handle multipe versions with vcvars.bat
-http://stackoverflow.com/questions/62029/vs2008-command-prompt-cygwin
-
-
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/doc/htmltodtd.xsl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/doc/htmltodtd.xsl
deleted file mode 100644
index d8b7f5973fb..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/doc/htmltodtd.xsl
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="us-ascii"?>
-<!--====================================================================
-$Id$
-Copyright 2009 Aplix Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Stylesheet to extract DTD for widlprocxml from widlproc.html
-=====================================================================-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-<xsl:output method="text" encoding="us-ascii" indent="no"/>
-
-<!-- <pre class="dtd"> element -->
-<xsl:template match="pre[@class='dtd']">
- <xsl:value-of select="."/>
-</xsl:template>
-
-<!--Ignore other text. -->
-<xsl:template match="text()" priority="-100"/>
-
-</xsl:stylesheet>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/doc/widlproc.html b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/doc/widlproc.html
deleted file mode 100644
index 4eb42c39bb9..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/doc/widlproc.html
+++ /dev/null
@@ -1,1124 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<!--====================================================================
-Copyright 2009 Aplix Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-=====================================================================-->
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
-<title>widlproc</title>
-<style type="text/css">
- body { color: black; font: 10pt verdana; }
- a:link { text-decoration: none; }
- a:visited { text-decoration: none; }
- a:hover { text-decoration: underline; }
- dt { margin-top: 0.5em; }
- dd { margin-left: 1em; margin-bottom: 0.5em; }
- li { margin-bottom: 0; }
- h4 { font-size: 10pt; }
- table { border: 1px solid; border-collapse: collapse; }
- td { border: 1px solid; }
- th { border: 1px solid; }
- code { background-color: #f0f0f0; }
- pre { background-color: #f0f0f0; }
- .indent { margin-left: 3em; }
- .issue { background-color: #00CCCC; }
-</style>
-</head>
-<body>
-<h1>widlproc</h1>
-
-<p>Tim Renouf, Aplix Corp</p>
-<p>$Id$
-</p>
-
-<h2>Introduction</h2>
-
-<p>
-widlproc is a processor that accepts as input
-<a href="#webidl">Web IDL</a> (the 30 September 2009 editor's draft),
-with comments in a subset of the format used by
-<a href="#doxygen">Doxygen</a>.
-The format it accepts is proposed by Aplix for authoring
-<a href="#bondi">BONDI</a> interface definitions.
-</p>
-
-<p>
-The output of widlproc is an XML representation of the
-<a href="#webidl">Web IDL</a> input,
-with added XML elements representing the
-<a href="#doxygen">Doxygen</a>-like comments.
-</p>
-
-<h2>Usage</h2>
-
-<p>
-<code>widlproc <i>filename</i></code>
-</p>
-
-<p>
-widlproc reads the file named <em>filename</em>, and
-sends its XML output format to stdout.
-</p>
-
-<h2>Input format</h2>
-
-<p>
-The input format accepted by widlproc is
-<a href="#webidl">Web IDL</a>
-(with an extension used in the
-<a href="#w3cgeo">W3C Geolocation API</a>),
-with comments in a format reminiscent of that used by
-<a href="#doxygen">Doxygen</a>.
-</p>
-
-<h3>Web IDL extension from W3C geolocation API</h3>
-
-<h4>double</h4>
-
-<p>
-<code>double</code> is allowed as a DeclarationType or a BoxedType.
-</p>
-
-<h3>Doxygen-like comment introduction</h3>
-
-<p>
-Only a small subset of Doxygen functionality is supported by
-widlproc, plus additions to handle the BONDI concepts of API features
-and device capabilities.
-</p>
-
-<p>
-In particular, no links are added automatically. (This could be added
-in the future.)
-</p>
-
-<h3>Doxygen comment block</h3>
-
-<h4>Comment referral point</h4>
-
-<p>
-Each <em>Doxygen comment block</em> refers to a <em>comment referral
-point</em> in the Web IDL, one of
-module, interface, exception, const, attribute, operation or argument.
-</p>
-
-<h4>Block comment</h4>
-
-<p>
-A block comment (delimited by <code>/* */</code>) whose first character
-after the <code>/*</code> is <code>!</code> or a second <code>*</code>
-is a <em>Doxygen comment block</em>.
-</p>
-
-<p>
-Normally the comment block refers to the next comment referral point in
-the Web IDL.
-If the first character is <code>&lt;</code>, so the comment block is introduced
-with <code>/**&lt;</code> or <code>/*!&lt;</code> , then the comment block
-refers back to the previous comment referral point.
-</p>
-
-<p>
-The text of the comment block
-excludes the initial <code>!</code> or <code>*</code> (and the <code>&lt;</code>
-for a referring back block),
-and excludes an initial (after whitespace) <code>*</code>
-on each line,
-and, when not in a <a href="#code"><code>\code</code></a> block,
-excludes any line consisting entirely of whitespace, then <code>*</code>
-characters, then whitespace.
-</p>
-
-<p>
-widlproc does not support Doxygen commands to force a comment
-block to refer to a different referral point.
-</p>
-
-<h4>Inline comments</h4>
-
-<p>
-The maximal sequence of inline comments (delimited by <code>//</code>)
-on adjacent lines, where all of the following conditions hold:
-</p>
-<ul>
-<li>
-each has a first character after the <code>/</code> of <code>!</code> or
-a third <code>/</code>;
-<li>
-no comment referral point intervenes;
-<li>
-either each comment in the sequence starts with a <code>&lt;</code>
-(see below), or none does;
-<li>
-the sequence contains at least two inline comments, or, if only one,
-then it starts with <code>&lt;</code> (see below);
-</ul>
-<p>
-forms a <em>Doxygen comment block</em>.
-</p>
-
-<p>
-Normally the comment block refers to the next comment referral point in
-the Web IDL.
-If the first character of each comment is <code>&lt;</code>, so each
-comment in the block is introduced
-with <code>///&lt;</code> or <code>//!&lt;</code> , then the comment block
-refers back to the previous comment referral point.
-</p>
-
-<p>
-The text of the comment block
-excludes the initial <code>!</code> or <code>/</code> (and the <code>&lt;</code>
-for a referring back block) of each inline comment,
-and, when not in a <a href="#code"><code>\code</code></a> block,
-excludes any line consisting entirely of whitespace, then <code>/</code>
-characters, then whitespace.
-</p>
-
-<p>
-widlproc does not support Doxygen commands to force a comment
-block to refer to a different referral point.
-</p>
-
-<h3>Paragraph</h3>
-
-<p>
-A comment block is broken into zero or more <em>paragraph</em>s.
-One or more blank lines break the paragraphs (unless in a
-<a href="#code"><code>\code</code></a> block).
-</p>
-
-<p>
-Certain commands (below) also start a new paragraph.
-</p>
-
-<p>
-An
-<a href="#html">HTML block element</a>
-is a paragraph.
-A blank line (other than in a
-<a href="#code"><code>\code</code></a> block)
-implicitly closes any open HTML elements, thus ending the paragraph.
-</p>
-
-<h3>Doxygen-like commands</h3>
-
-<p>
-widlproc supports a small subset of Doxygen commands, plus some additions
-to handle BONDI API features and device capabilities.
-</p>
-
-<p>
-A command is always introduced with a <code>\</code> character.
-The Doxygen alternative (from JavaDoc) of <code>@</code> is not
-supported.
-</p>
-
-<h4 id="api-feature">\api-feature</h4>
-
-<p>
-Starts a new paragraph. The following word is the name of an API feature
-used by the method being documented. The remainder of the paragraph is
-any description required of how (eg in what circumstance) the API feature
-is used.
-</p>
-
-<h4>\name</h4>
-
-<p>
-Declares a name for the document node associated with the current referral
-point. This is useful for the root document node that otherwise does not have
-a WebIDL identifier.
-</p>
-
-<h4>\author</h4>
-
-<p>
-Starts a new paragraph. The remainder of the paragraph contains
-information about a single author of the specification. Multiple
-<code>\author</code> commands should be used for multiple authors.
-</p>
-
-<p>
-(Here widlproc differs from Doxygen; Doxygen also allows
-multiple authors on separate lines to appear in one <code>\author</code>
-paragraph.)
-</p>
-
-<h4>\b</h4>
-
-<p>
-This renders the next word as bold. It is equivalent to enclosing the
-next word with <code>&lt;b> &lt;/b></code>.
-</p>
-
-<h4>\brief</h4>
-
-<p>
-Starts a new paragraph. The remainder of the paragraph contains a brief
-description of the entity being documented.
-</p>
-
-<h4 id="code">\code, \endcode</h4>
-
-<p>
-<code>\code</code>
-starts a new paragraph which is a <em>code block</em>. The code block
-ends at the next <code>\endcode</code> command.
-</p>
-
-<p>
-Within the code block, whitespace and newlines are passed verbatim into
-the output.
-</p>
-
-<h4 id="def-api-feature">\def-api-feature</h4>
-
-<p>
-Starts a new paragraph. The following word is the name of the API feature
-which is defined here. The description is an <em>def-api-feature block</em>,
-consisting of the
-remainder of the paragraph, together with
-further paragraphs in the same block comment each of which is a plain
-paragraph, a paragraph started due to HTML markup, a <code>\brief</code>
-paragraph, or a
-<a href="#device-cap"><code>\device-cap</code></a>
-paragraph.
-</p>
-
-<h4 id="def-api-feature-set">\def-api-feature-set</h4>
-
-<p>
-Starts a new paragraph. The following word is the name of the API feature
-set which is defined here. The description is an <em>def-api-feature-set block</em>,
-consisting of the
-remainder of the paragraph, together with
-further paragraphs in the same block comment each of which is a plain
-paragraph, a paragraph started due to HTML markup, a <code>\brief</code>
-paragraph, or a
-<a href="#device-cap"><code>\api-feature</code></a>
-paragraph.
-</p>
-
-<h4>\def-device-cap</h4>
-
-<p>
-Starts a new paragraph. The following word is the name of the device capability
-which is defined here. The description consists of the
-remainder of the paragraph, together with
-further paragraphs in the same block comment each of which is a plain
-paragraph, a paragraph started due to HTML markup, a <code>\brief</code>
-paragraph, or a
-<a href="#param"><code>\param</code></a>
-paragraph.
-</p>
-
-<h4 id="def-instantiated">\def-instantiated</h4>
-
-<p>
-Starts a new paragraph. The description is an <em>def-instantiated block</em>,
-consisting of the
-remainder of the paragraph, together with
-further paragraphs in the same block comment each of which is a plain
-paragraph, a paragraph started due to HTML markup, a <code>\brief</code>
-paragraph, or a
-<a href="#api-feature"><code>\api-feature</code></a>
-paragraph.
-</p>
-
-<h4 id="device-cap">\device-cap</h4>
-
-<p>
-Starts a new paragraph.
-This command can appear only inside an
-<a href="#def-api-feature">def-api-feature block</a>.
-The following word is the name of a device capability
-used by the API feature being documented.
-The remainder of the paragraph is
-any description required of how (eg in what circumstance) the device capability
-is used.
-</p>
-
-<h4>\n</h4>
-
-<p>
-Creates a line break in the output.
-</p>
-
-<h4 id="param">\param</h4>
-
-<p>
-Starts a new paragraph. This takes the following word as the name of
-a parameter (argument) of the entity being documented, then makes the
-remainder of the paragraph refer to that parameter.
-</p>
-
-<h4>\return</h4>
-
-<p>
-Starts a new paragraph. The remainder of the paragraph is made to refer to
-the return type of the entity being documented.
-</p>
-
-<h4>\throw</h4>
-
-<p>
-Starts a new paragraph. The next word is taken to be the name of an
-exception thrown by the entity being documented, and the remainder of
-the paragraph documents that exception (in the <code>raises</code> list of
-an <code>operation</code>, or the <code>setraises</code>
-clause of an <code>attribute</code>).
-</p>
-
-<h4>\version</h4>
-
-<p>
-Starts a new paragraph. The remainder of the paragraph contains
-version number information.
-</p>
-
-<h3>Escape sequences</h3>
-
-<p>
-The following escape sequences are recognized in a comment block:
-</p>
-
-<table>
-<tr>
-<th>escape sequence
-<th>result
-<tr>
-<td><code>\\</code>
-<td><code>\</code>
-<tr>
-<td><code>\&amp;</code>
-<td><code>&amp;</code> (escaped to <code>&amp;amp;</code> in output XML)
-<tr>
-<td><code>\$</code>
-<td><code>$</code>
-<tr>
-<td><code>\#</code>
-<td><code>#</code>
-<tr>
-<td><code>\&lt;</code>
-<td><code>&lt;</code> (escaped to <code>&amp;lt;</code> in output XML)
-<tr>
-<td><code>\></code>
-<td><code>></code>
-<tr>
-<td><code>\%</code>
-<td><code>%</code>
-</table>
-
-<p>
-Some of these escape sequences are used to avoid Doxygen features that
-widlproc does not currently implement. In particular,
-widlproc insists on a <code>$</code> being escaped, to
-allow for possible future functionality.
-</p>
-
-<h3 id="html">HTML in comments</h3>
-
-<p>
-widlproc accepts a small subset of HTML elements.
-</p>
-
-<p>
-An HTML block element is a paragraph.
-A blank line (other than in a
-<a href="#code"><code>\code</code></a> block)
-implicitly closes any open HTML elements, thus ending the paragraph.
-</p>
-
-<p>
-The following HTML block elements are accepted:
-<code>dl</code>
-<code>ol</code>
-<code>p</code>
-<code>table</code>
-<code>ul</code>
-</p>
-
-<p>
-The following HTML inline elements are accepted:
-<code>a</code>
-<code>img</code>
-<code>b</code>
-<code>br</code>
-<code>em</code>
-</p>
-
-<p>
-The following HTML elements are accepted where valid inside one of the
-other elements:
-<code>dd</code>
-<code>dt</code>
-<code>li</code>
-<code>td</code>
-<code>th</code>
-<code>tr</code>
-</p>
-
-
-<h2>Output format</h2>
-
-<p>
-The output of widlproc is an XML representation of the
-<a href="#webidl">Web IDL</a>,
-with added XML elements representing the
-<a href="#doxygen">Doxygen</a>-like comments.
-</p>
-
-<h3>Annotated document type declaration</h3>
-
-<pre class="dtd">
-&lt;!-- Autogenerated from widlproc.html : do not edit. -->
-</pre>
-
-<h4>Entities used elsewhere</h4>
-
-<pre class="dtd">
-&lt;!ENTITY % block 'dl | p | table | ul' >
-&lt;!ENTITY % Block '(%block;)*' >
-&lt;!ENTITY % inline 'a | b | br | em | img' >
-&lt;!ENTITY % Inline '(#PCDATA | %inline;)*' >
-&lt;!ENTITY % Flow '(#PCDATA | %inline; | %block;)*' >
-
-&lt;!ELEMENT webidl (#PCDATA | ref)* >
-</pre>
-
-<p>
-The <code>&lt;webidl></code> element contains the literal text of the
-original Web IDL that the parent
-element was parsed from, minus the comments, with each reference to
-an interface name
-enclosed in a <code>&lt;ref></code>..<code>&lt;/ref></code>.
-</p>
-
-<h4>Definitions</h4>
-
-<p>
-<em>Definitions</em> is the root element of the XML document.
-</p>
-
-<p>
-The <em>ExtendedAttributeList</em> specifies any extended attributes
-for the <em>Interface</em>, <em>Dictionary</em>, <em>Exception</em>,
-<em>Typedef</em>, <em>Valuetype</em> or <em>Const</em> in the
-<em>Definition</em>.
-</p>
-
-<pre class="dtd">
-&lt;!ELEMENT Definitions ( webidl, descriptive?, (Interface | Dictionary | Callback
- | Enum | Exception | Typedef | Implements)*) >
-</pre>
-
-<h4>Interface</h4>
-
-<p>
-An <em>Interface</em> represents an interface. The <em>name</em>
-attribute specifies the name of the interface. The <em>descriptive</em> element
-provides its documentation if any.
-The <em>id</em> attribute specifies the absolute scoped name of the interface.
-</p>
-
-<p>The <em>partial</em> attribute indicates that the definition of the interface complements an existing definition. The <em>callback</em> attribute specificies that a given interface is a callback interface.</p>
-
-<p>
-The <em>InterfaceInheritance</em> element indicates that the interface
-inherits from other interface(s). Each <em>Name</em> in the
-<em>InterfaceInheritance</em> has a <em>name</em> attribute giving the
-scoped name of the interface being inherited from.
-</p>
-
-<pre class="dtd">
-&lt;!ELEMENT Interface (webidl, descriptive?, ExtendedAttributeList?,
- InterfaceInheritance?, (Const | Attribute | Operation | Stringifier* | Serializer* | Iterator | IteratorObject)* ) >
-&lt;!ATTLIST Interface name CDATA #REQUIRED
- partial (partial) #IMPLIED
- callback (callback) #IMPLIED
- id CDATA #REQUIRED >
-
-&lt;!ELEMENT InterfaceInheritance (Name+) >
-
-&lt;!ELEMENT Name EMPTY >
-&lt;!ATTLIST Name name CDATA #REQUIRED >
-</pre>
-
-<h4>Dictionary</h4>
-
-<p>
-A <em>Dictionary</em> represents a dictionary. The <em>name</em>
-attribute specifies the name of the dictionary. The <em>descriptive</em> element
-provides its documentation if any.
-The <em>id</em> attribute specifies the absolute scoped name of the dictionary.
-</p>
-
-<p>The <em>partial</em> attribute indicates that the definition of the interface complements an existing definition.</p>
-
-<p>
-The <em>DictionaryInheritance</em> element indicates that the dictionary
-inherits from other dictionary(s). Each <em>Name</em> in the
-<em>DictionaryInheritance</em> has a <em>name</em> attribute giving the
-scoped name of the dictionary being inherited from.
-</p>
-
-
-<pre class="dtd">
-&lt;!ELEMENT Dictionary (webidl, descriptive?, DictionaryInheritance?, DictionaryMember* ) >
-&lt;!ATTLIST Dictionary name CDATA #REQUIRED
- partial (partial) #IMPLIED
- id CDATA #REQUIRED >
-
-&lt;!ELEMENT DictionaryInheritance (Name+) >
-</pre>
-
-<h4>Callback</h4>
-
-<p>
-A <em>Callback</em> represents a callback type. The <em>name</em>
-attribute specifies the name of the dictionary. The <em>descriptive</em> element
-provides its documentation if any.</p>
-
-<p>The <em>Type</em> element specifies its return type.</p>
-
-<p>
-An <em>Argument</em> is an argument to an operation.
-The <em>Type</em> element specifies its type. The <em>name</em>
-attribute specifies its name if it has one.
-</p>
-
-<pre class="dtd">
-&lt;!ELEMENT Callback (webidl, descriptive?, Type, ArgumentList? ) >
-&lt;!ATTLIST Callback name CDATA #REQUIRED
- id CDATA #REQUIRED>
-</pre>
-
-
-<h4>Enum</h4>
-
-<p>
-An <em>Enum</em> represents an enumeration. The <em>name</em>
-attribute specifies the name of the enumeration. The <em>descriptive</em> element
-provides its documentation if any.
-</p>
-
-<p>
-The <em>EnumValue</em> element indicates the values defined for that enumeration in its <em>stringvalue</em> attribute.
-</p>
-
-
-<pre class="dtd">
-&lt;!ELEMENT Enum (webidl, descriptive?, EnumValue* ) >
-&lt;!ATTLIST Enum name CDATA #REQUIRED
- id CDATA #REQUIRED >
-
-&lt;!ELEMENT EnumValue (webidl, descriptive?) >
-&lt;!ATTLIST EnumValue stringvalue CDATA #REQUIRED >
-</pre>
-
-
-
-<h4>Exception</h4>
-
-<p>
-An <em>Exception</em> represents an exception.
-The <em>name</em>
-attribute specifies the name of the exception.
-The <em>descriptive</em> element
-provides its documentation if any.
-The <em>id</em> attribute specifies the absolute scoped name of the exception.
-</p>
-
-<p>
-An <em>ExceptionField</em> represents a field in an exception.
-The <em>name</em>
-attribute specifies the name of the field.
-The <em>Type</em> element specifies its type.
-The <em>descriptive></em> element
-provides its documentation if any.
-The <em>id</em> attribute specifies the absolute scoped name of the field.
-</p>
-
-<p>
-The <em>ExceptionInheritance</em> element indicates that the exception
-inherits from another exception. The <em>Name</em> in the
-<em>ExceptionInheritance</em> has a <em>name</em> attribute giving the
-scoped name of the exception being inherited from.
-</p>
-
-
-<pre class="dtd">
-&lt;!ELEMENT Exception (webidl, descriptive?, ExtendedAttributeList?, ExceptionInheritance?,
- (Const | ExceptionField)* ) >
-&lt;!ATTLIST Exception name CDATA #REQUIRED
- id CDATA #REQUIRED >
-
-&lt;!ELEMENT ExceptionInheritance (Name) >
-&lt;!ELEMENT ExceptionField (webidl, descriptive?, ExtendedAttributeList?, (Type)) >
-&lt;!ATTLIST ExceptionField name CDATA #REQUIRED
- id CDATA #REQUIRED >
-</pre>
-
-<h4>Typedef</h4>
-
-<p>
-A <em>Typedef</em> represents a type definition.
-The <em>name</em>
-attribute specifies the name of the new type.
-The <em>Type</em> element specifies it in terms of other types.
-The <em>descriptive></em> element
-provides its documentation if any.
-The <em>id</em> attribute specifies the absolute scoped name of the typedef.
-</p>
-
-<pre class="dtd">
-&lt;!ELEMENT Typedef (webidl, descriptive?, ExtendedAttributeList?, (Type)) >
-&lt;!ATTLIST Typedef name CDATA #REQUIRED
- id CDATA #REQUIRED >
-</pre>
-
-<h4>Implements</h4>
-
-<p>
-An <em>Implements</em> represents Web IDL's
-<code><i>ScopedName</i> implements <i>ScopedName</i>;</code>
-syntax. The <em>name1</em> and <em>name2</em> attributes give the
-first and second scoped names respectively.
-The <em>descriptive></em> element
-provides the <em>Implements</em>'s documentation if any.
-</p>
-
-<pre class="dtd">
-&lt;!ELEMENT Implements (webidl, descriptive?, ExtendedAttributeList?) >
-&lt;!ATTLIST Implements name1 CDATA #REQUIRED
- name2 CDATA #REQUIRED >
-</pre>
-
-<h4>Const</h4>
-
-<p>
-<em>Const</em> represents Web IDL's
-<code>const <i>Type</i> <i>identifier</i> = <i>ConstExpr</i>;</code>
-syntax.
-The <em>Type</em> specifies the constant's type, the
-<em>name</em> attribute specifies the constant's name, and the
-<em>value</em> attribute specifies its value.
-The <em>descriptive></em> element
-provides the <em>Const</em>'s documentation if any.
-The <em>id</em> attribute specifies the absolute scoped name of the const.
-</p>
-
-<pre class="dtd">
-&lt;!ELEMENT Const (webidl, descriptive?, ExtendedAttributeList?, Type) >
-&lt;!ATTLIST Const name CDATA #REQUIRED
- value CDATA #IMPLIED
- id CDATA #REQUIRED >
-</pre>
-
-<h4>Stringifier</h4>
-
-<p>
-A <em>Stringifier</em> represents the Web IDL <code>stringifier;</code>
-syntax as an interface member.
-The <em>descriptive></em> element
-provides the <em>Stringifier</em>'s documentation if any.
-</p>
-
-<pre class="dtd">
-&lt;!ELEMENT Stringifier (webidl, descriptive?, ExtendedAttributeList?) >
-</pre>
-
-<h4>Attribute</h4>
-
-<p>
-An <em>Attribute</em> represents an attribute as an interface member.
-The <em>Type</em> element specifies its type. The <em>name</em>
-attribute specifies its name. Each of the <em>stringifier</em>, <em>static</em> and
-<em>readonly</em> attributes is set to a value the same as the attribute
-name when the corresponding keyword appears in the Web IDL input. The <em>inherit</em> attribute is set to <em>inherit</em> when the attribute inherits its getter.
-</p>
-
-
-<p>
-The <em>descriptive></em> element provides the attribute's documentation
-if any.
-The <em>id</em> attribute specifies the absolute scoped name of the attribute.
-</p>
-
-<pre class="dtd">
-&lt;!ELEMENT Attribute (webidl, descriptive?, ExtendedAttributeList?, (Type)) >
-&lt;!ATTLIST Attribute stringifier (stringifier) #IMPLIED
- readonly (readonly) #IMPLIED
- inherit (inherit) #IMPLIED
- static (static) #IMPLIED
- name CDATA #REQUIRED
- id CDATA #REQUIRED >
-
-</pre>
-
-
-<h4>Operation</h4>
-
-<p>
-An <em>Operation</em> represents a method on interface.
-The <em>Type</em> element specifies its return type. The <em>name</em>
-attribute specifies its name.
-</p>
-
-<p>
-Each of the <em>stringifier</em>, <em>static</em>, <em>getter</em>,
-<em>setter</em>, <em>creator</em>, <em>deleter</em> and <em>legacycaller</em>, <em>serializer</em>
-attributes is set to a value the same as the attribute
-name when the corresponding keyword appears in the Web IDL input.
-</p>
-
-
-<p>
-The <em>descriptive></em> element provides the attribute's documentation
-if any.
-The <em>id</em> attribute specifies the absolute scoped name of the operation if it has one.
-</p>
-
-<p>
-An <em>Argument</em> is an argument to an operation.
-The <em>Type</em> element specifies its type. The <em>name</em>
-attribute specifies its name if it has one.
-</p>
-
-<p>
-Each of the <em>optional</em> and <em>ellipsis</em>
-attributes is set to a value the same as the attribute
-name when the corresponding syntax appears in the Web IDL input.
-</p>
-
-<p>The
-<em>value</em> attribute used on optional arguments specifies default value for non-string values, and <em>stringvalue</em> for string values.</p>
-
-
-<pre class="dtd">
-&lt;!ELEMENT Operation (webidl, descriptive?, ExtendedAttributeList?,
- (Type), ArgumentList) >
-&lt;!ATTLIST Operation stringifier (stringifier) #IMPLIED
- static (static) #IMPLIED
- getter (getter) #IMPLIED
- setter (setter) #IMPLIED
- creator (creator) #IMPLIED
- deleter (deleter) #IMPLIED
- serializer (serializer) #IMPLIED
- legacycaller (legacycaller) #IMPLIED
- name NMTOKEN #IMPLIED
- id NMTOKEN #IMPLIED >
-
-
-&lt;!ELEMENT ArgumentList (Argument*) >
-
-&lt;!ELEMENT Argument (descriptive?, ExtendedAttributeList?, (Type)) >
-&lt;!ATTLIST Argument
- optional (optional) #IMPLIED
- ellipsis (ellipsis) #IMPLIED
- value CDATA #IMPLIED
- stringvalue CDATA #IMPLIED
- name NMTOKEN #REQUIRED >
-</pre>
-
-<h4>Serializer</h4>
-<p>A <em>Serializer</em> represents a serializer for an interface, either defined in the prose or via a pattern.</p>
-
-<p>The <em>descriptive</em> element provides the serializer's documentation if any.</p>
-
-
-<p>The <em>attribute</em> attribute defines the attribute that is used for serialization if any.</p>
-
-<p>The optional <em>Map</em> and <em>List</em> elements describe the pattern (if any) for the serializer. They take <em>PatternAttribute</em> elements with a <em>name</em> attribute that describes the attributes used for serialization.</p>
-
-<p><em>Map</em> elements take a <em>pattern</em> attribute that can be set to either "getter" (if the getter is used for serialization), "all" if all serializable attributes are to be used, or "selection" if the attributes named as children elements are to be used. Optionally, they take a <em>inherit</em> attribute set to "inherit" if the serialization takes also into account inherited attributes.</p>
-
-<p><em>List</em> elements take a <em>pattern</em> attribute that can be set to either "getter" (if the getter is used for serialization), or "selection" if the attributes named as children elements are to be used.</p>
-
-<pre class="dtd">
-&lt;!ELEMENT Serializer (webidl, descriptive?, ExtendedAttributeList?, (Map | List)?) >
-&lt;!ATTLIST Serializer attribute CDATA #IMPLIED >
-
-&lt;!ELEMENT Map ((PatternAttribute*)) >
-
-&lt;!ATTLIST Map inherit (inherit) #IMPLIED
- pattern (getter|all|selection) #REQUIRED>
-
-&lt;!ELEMENT List ((PatternAttribute*)) >
-
-&lt;!ATTLIST List pattern (getter|selection) #REQUIRED>
-
-&lt;!ELEMENT PatternAttribute EMPTY>
-&lt;!ATTLIST PatternAttribute name CDATA #REQUIRED>
-
-</pre>
-
-<h4>Iterator</h4>
-<p>An <em>Iterator</em> element defines whether the interface has a custom iterator; the type of the iterated objects is defined in the <em>Type</em> child. If that interator implements a particular interface, the name of that interface is set in the <em>interface</em> attribute.</p>
-<pre class="dtd">
-&lt;!ELEMENT Iterator (webidl, descriptive?, ExtendedAttributeList?, Type) >
-&lt;!ATTLIST Iterator interface CDATA #IMPLIED>
-</pre>
-
-<h4>IteratorObject</h4>
-<p>An <em>IteratorObject</em> element denotes that the interface serves as an iterator object interface; the type of the iterated objects is defined in the <em>Type</em> child.</p>
-
-<pre class="dtd">
-&lt;!ELEMENT IteratorObject (webidl, descriptive?, ExtendedAttributeList?, Type) >
-</pre>
-
-
-<h4>DictionaryMember</h4>
-
-<p>
-A <em>DictionaryMember</em> represents a member of a dictionary.
-The <em>Type</em> element specifies its type. The <em>name</em>
-attribute specifies its name.
-</p>
-
-<p>
-The <em>descriptive></em> element provides the dictionary member's documentation
-if any.
-The <em>id</em> attribute specifies the absolute scoped name of the attribute.
-</p>
-
-<p>The
-<em>value</em> attribute specifies its value for non-string values, and <em>stringvalue</em> for string values.</p>
-
-<pre class="dtd">
-&lt;!ELEMENT DictionaryMember (webidl, descriptive?, ExtendedAttributeList?, Type) >
-&lt;!ATTLIST DictionaryMember name CDATA #REQUIRED
- id CDATA #REQUIRED
- value CDATA #IMPLIED
- stringvalue CDATA #IMPLIED >
-
-</pre>
-
-
-<h4>Extended attributes</h4>
-
-<p>
-An <em>ExtendedAttributeList</em> contains one or more
-<em>ExtendedAttribute</em> element. Each <em>ExtendedAttribute</em>
-has:
-</p>
-<ul>
-<li>
-a <em>name</em> attribute giving the name of the extended attribute;
-<li>
-if the extended attribute contains an <code>=</code> sign followed by a
-value, a <em>value</em> attribute giving the value, which is a scoped
-name or an identifier;
-<li>
-if the extended attribute contains parentheses (either with or without
-an <code>=</code> sign), an <em>ArgumentList</em> element giving the
-contents of the parentheses.
-</ul>
-<p>
-If the <em>value</em> attribute and the <em>ArgumentList</em> element are
-both present, then <em>value</em> must give an identifier rather than
-a scoped name.
-</p>
-
-<pre class="dtd">
-&lt;!ELEMENT ExtendedAttributeList (ExtendedAttribute+) >
-
-&lt;!ELEMENT ExtendedAttribute (webidl, ArgumentList?) >
-&lt;!ATTLIST ExtendedAttribute name NMTOKEN #REQUIRED
- value CDATA #IMPLIED >
-</pre>
-
-<h4>Type</h4>
-
-<p>
-<em>Type</em> represents a type. It has one of these forms:
-</p>
-<ul>
-<li>
-The <code>any</code>, <code>object</code> and <code>void</code>
-types have the attribute
-<em>type</em> set to the type, and no other attributes or elements.
-Note that the <code>void</code> type appears only when the <em>Type</em>
-element is a child of <em>Operation</em>.
-<li>
-A type that is an interface has the attribute <em>name</em> set to the
-name of that interface, and no other attributes or elements.
-<li>
-For the primitive types <code>short</code>, <code>unsigned short</code>,
-<code>long</code>, <code>unsigned long</code>, <code>long long</code>,
-<code>unsigned long long</code>, <code>float</code>, <code>double</code>,
-<code>boolean</code>, <code>octet</code>, <code>byte</code> and <code>DOMString</code>,
-there is an attribute <em>type</em>
-whose value is one of those strings, and no other attributes or elements.
-However, if the type was specified in the Web IDL with a trailing <code>?</code>
-sign, then there is an attribute <em>nullable</em> with the value
-<code>nullable</code>.
-</ul>
-<p>
-The restrictions on which combinations of elements and attributes are
-permitted are not encoded by the DTD.
-</p>
-<p>
-The <em>descriptive</em> element provides the documentation
-if any, when the <em>Type</em> is a child of <em>Operation</em>, and thus
-representing an operation's return type.
-</p>
-
-<p>The <em>ExtendedAttributeList</em> element provides the optional extended attributes that can be defined for a type through typedef, &agrave; la <code>typedef [Clamp] octet Value;</code>.</p>
-
-<!-- can't use enumerated values for the values of type, since DTD don't allow enumerated values to have space in them (which would be needed e.g. for "long long") -->
-<pre class="dtd">
-&lt;!ELEMENT Type (descriptive?, ExtendedAttributeList?, Type*) >
-&lt;!ATTLIST Type type CDATA #IMPLIED
- name NMTOKEN #IMPLIED
- nullable (nullable) #IMPLIED >
-</pre>
-
-<h4>Sequence</h4>
-
-<p>For a sequence type, the <em>Type</em> element with an attribute <em>type</em> set to <em>sequence</em> contains an element <em>Type</em> giving the sequence element type, and no other attributes or elements. If the sequence is specified in the Web IDL with a trailing <code>?</code>
-sign, then there is an attribute <em>nullable</em> with the value
-<code>nullable</code>.
-
-
-<h4>Array</h4>
-
-<p>For an array type, the <em>Type</em> element with an attribute <em>type</em> set to <em>array</em> contains an element <em>Type</em> giving the array element type. If the array is specified in the Web IDL with a trailing <code>?</code>
-sign, then there is an attribute <em>nullable</em> with the value
-<code>nullable</code>.
-
-<h4>Union</h4>
-
-<p>For a union type, the <em>Type</em> element with an attribute <em>type</em> set to <em>union</em> contains at least two element <em>Type</em> giving the union members type. If the union is specified in the Web IDL with a trailing <code>?</code>
-sign, then there is an attribute <em>nullable</em> with the value
-<code>nullable</code>.
-
-
-
-<h4>Descriptive elements</h4>
-
-<p>
-The following elements contain documentation, extracted from the
-Doxygen-like comments in the input. <code>&lt;param></code>
-derives only from a <code>\param</code> command used inside a
-<code>\def-device-cap</code> block; any other <code>\param</code> command
-is linked to a parameter (argument) of the method being documented.
-</p>
-
-<pre class="dtd">
-&lt;!ELEMENT descriptive (description | brief | throw | author
- | version | Code | api-feature | device-cap | def-api-feature
- | def-api-feature-set | def-device-cap | def-instantiated | param)* >
-
-&lt;!ELEMENT description %Block; >
-
-&lt;!ELEMENT brief %Inline; >
-
-&lt;!ELEMENT throw %Inline; >
-
-&lt;!ELEMENT author %Inline; >
-
-&lt;!ELEMENT version %Inline; >
-
-&lt;!ELEMENT Code %Inline; >
-
-&lt;!ELEMENT api-feature %Inline; >
-&lt;!ATTLIST api-feature identifier CDATA #REQUIRED >
-
-&lt;!ELEMENT device-cap %Inline; >
-&lt;!ATTLIST device-cap identifier CDATA #REQUIRED >
-
-&lt;!ELEMENT param %Inline; >
-&lt;!ATTLIST param identifier CDATA #REQUIRED >
-
-&lt;!ELEMENT def-api-feature (descriptive?) >
-&lt;!ATTLIST def-api-feature identifier CDATA #REQUIRED >
-
-&lt;!ELEMENT def-api-feature-set (descriptive?) >
-&lt;!ATTLIST def-api-feature-set identifier CDATA #REQUIRED >
-
-&lt;!ELEMENT def-instantiated (descriptive?) >
-
-&lt;!ELEMENT def-device-cap (descriptive?) >
-&lt;!ATTLIST def-device-cap identifier CDATA #REQUIRED >
-
-&lt;!ELEMENT ref (#PCDATA) >
-</pre>
-
-<h4>XHTML elements</h4>
-
-<p>
-The following XHTML elements are part of widlprocxml:
-</p>
-
-<pre class="dtd">
-&lt;!ELEMENT a %Inline; >
-&lt;!ATTLIST a href CDATA #REQUIRED >
-
-&lt;!ELEMENT b %Inline; >
-
-&lt;!ELEMENT br EMPTY >
-
-&lt;!ELEMENT dd %Flow; >
-
-&lt;!ELEMENT dl ((dt | dd)*) >
-
-&lt;!ELEMENT dt %Inline; >
-
-&lt;!ELEMENT em %Inline; >
-
-&lt;!ELEMENT img %Inline; >
-&lt;!ATTLIST img src CDATA #REQUIRED
- alt CDATA #IMPLIED>
-
-
-&lt;!ELEMENT li %Flow; >
-
-&lt;!ELEMENT p %Inline; >
-
-&lt;!ELEMENT table (tr*) >
-
-&lt;!ELEMENT td %Flow; >
-
-&lt;!ELEMENT th %Flow; >
-
-&lt;!ELEMENT tr ((th | td)*) >
-
-&lt;!ELEMENT ul (li*) >
-</pre>
-
-
-<h2>Bibliography</h2>
-
-<p id="bondi">
-BONDI - an open source industry collaboration for widget and web technologies,
-<a href="http://bondi.omtp.org/">http://bondi.omtp.org/</a>
-</p>
-
-<p id="doxygen">
-Doxygen Source code documentation generator tool,
-<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
-http://www.stack.nl/~dimitri/doxygen/index.html</a>
-</p>
-
-<p id="w3cgeo">
-W3C Geolocation API Specification Editor's Draft 3 April 2009,
-<a href="http://dev.w3.org/geo/api/spec-source.html">
-http://dev.w3.org/geo/api/spec-source.html</a>
-</p>
-
-<p id="webidl">
-Web IDL W3C Editor's Draft 3 May 2011,
-<a href="http://dev.w3.org/2006/webapi/WebIDL">http://dev.w3.org/2006/webapi/WebIDL</a>
-</p>
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/Makefile b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/Makefile
deleted file mode 100644
index 614453d23c0..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/Makefile
+++ /dev/null
@@ -1,79 +0,0 @@
-########################################################################
-# $Id$
-# Copyright 2009 Aplix Corporation. All rights reserved.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-########################################################################
-
-UNAME = $(shell uname)
-EXAMPLESDIR = .
-# The settings of SRCDIR (where to find the xsl style sheets), OBJDIR (where to
-# find widlproc and widlprocxml.dtd) and EXAMPLESOBJDIR (where to put the
-# resulting html files and any intermediate files) reflect the directory
-# structure of the released widlproc.zip file when unzipped. ../Makefile calls
-# this Makefile with these settings overridden to reflect the directory
-# structure in svn.
-SRCDIR = ..
-OBJDIR = ..
-EXAMPLESOBJDIR = obj
-
-########################################################################
-# Linux configuration
-#
-ifneq (,$(filter Linux%, $(UNAME)))
-
-EXESUFFIX =
-
-else
-########################################################################
-# Darwin configuration
-#
-ifneq (,$(filter Darwin%, $(UNAME)))
-
-EXESUFFIX =
-
-else
-########################################################################
-# Windows (cygwin but using MS compiler) configuration
-#
-ifneq (,$(filter CYGWIN%, $(UNAME)))
-
-EXESUFFIX = .exe
-
-endif
-endif
-endif
-
-########################################################################
-# Common makefile
-#
-WIDLPROC = $(OBJDIR)/widlproc$(EXESUFFIX)
-DTD = $(OBJDIR)/widlprocxml.dtd
-
-WIDLS = $(patsubst $(EXAMPLESDIR)/%, %, $(wildcard $(EXAMPLESDIR)/*.widl))
-
-test : $(patsubst %.widl, $(EXAMPLESOBJDIR)/%.html, $(WIDLS)) $(EXAMPLESOBJDIR)/widlhtml.css
- @echo "$@ pass"
-
-$(EXAMPLESOBJDIR)/%.html : $(EXAMPLESOBJDIR)/%.widlprocxml $(SRCDIR)/widlprocxmltohtml.xsl Makefile
- cp $(SRCDIR)/widlprocxmltohtml.xsl $(dir $@)/
- xsltproc $(dir $@)/widlprocxmltohtml.xsl $< >$@
-
-$(EXAMPLESOBJDIR)/%.widlprocxml : $(EXAMPLESDIR)/%.widl $(WIDLPROC) $(DTD) Makefile
- mkdir -p $(dir $@)
- $(WIDLPROC) $< >$@
- cp $(OBJDIR)/widlprocxml.dtd $(dir $@)/
- xmllint --noout --dtdvalid $(DTD) $@
-
-$(EXAMPLESOBJDIR)/widlhtml.css : $(EXAMPLESDIR)/widlhtml.css
- cp $< $@
-
-.DELETE_ON_ERROR:
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/README b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/README
deleted file mode 100644
index efbb72dda8d..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/README
+++ /dev/null
@@ -1,41 +0,0 @@
-########################################################################
-# $Id$
-# Copyright 2009 Aplix Corporation. All rights reserved.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-########################################################################
-
-This examples directory contains two of the BONDI .widl files, a Makefile
-that processes them to generate html, and a .css file that the resulting
-html uses.
-
-The Makefile processes the .widl files as follows:
-
- 1. For each .widl, generate the .widlprocxml file (an XML representation
- of the information in the .widl) using widlproc.
-
- 2. Validate (using xmllint) each .widlprocxml against the DTD.
-
- 3. We want any reference in the resulting html to a type elsewhere in the
- API to be a link. This is where we achieve this. First generate a
- list of fqids (fully qualified identifiers) from fqid attributes in
- the XML by running all .widlprocxml files through the style sheet
- widlprocxmlfqids.xsl.
-
- 4. Turn that list of fqids into a sed script that turns a <ref> to an
- fqid into a <ref ref=".."> to the fqid in the right .html file.
-
- 5. For each .widlprocxml file, generate a .widlprocxml2 file by running
- it through the sed script generated above.
-
- 6. For each .widlprocxml2 file, generate a .html file by running it through
- the widlprocxmltohtml.xsl style sheet.
-
-See the Makefile for details.
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/bondi.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/bondi.widl
deleted file mode 100644
index 200b95fe9c1..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/bondi.widl
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Licensed to OMTP Ltd. (OMTP) under one or more contributor license agreements.
- * See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership.
- *
- * The Reference Implementation (save for such parts of the reference implementation made
- * available under separate terms and conditions) is made available under the terms of the
- * Apache License, version 2.0, subject to the condition that any "Works" and "Derivative
- * Works" used or distributed for commercial purposes must be and remain compliant with the
- * BONDI specification as promulgated by OMTP in each release. Your implementation of the
- * Reference Implementation (whether object or source) must maintain these conditions, and
- * you must notify any recipient of this condition in a conspicuous way.
- *
- * You may not use this BONDI Reference Implementation except in compliance with the License.
- *
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 or at
- * http://bondi.omtp.org/BONDI-LICENSE-2.0
- */
-
-/**
- * \brief Common BONDI functionality.
- *
- * These definitions can be used in all other BONDI modules as dependencies.
- * \version 1.1
- */
-module bondi {
-
- /**
- * \brief Array of DOMStrings.
- */
- typedef sequence<DOMString> StringArray;
-
- /**
- * \brief Array of 8-bit unsigned integer values.
- */
- typedef sequence<octet> ByteArray;
-
- /**
- * \brief Array of 16-bit signed integer values.
- */
- typedef sequence<short> ShortArray;
-
- /**
- * \brief Array of 32-bit signed integer values.
- */
- typedef sequence<long> LongArray;
-
- /**
- * \brief Array of floating point values.
- */
- typedef sequence<float> FloatArray;
-
- /**
- * \brief Generic Map object.
- */
- typedef Object Map;
-
- /**
- * \brief Generic success callback interface.
- */
- [Callback=FunctionOnly, NoInterfaceObject] interface SuccessCallback {
- /**
- * \brief Method invoked when the asynchronous call completes successfully
- */
- void onSuccess();
- };
-
-
- /**
- * \brief Success callback interface for requestFeature invocations
- */
- [Callback=FunctionOnly, NoInterfaceObject] interface RequestFeatureSuccessCallback {
- /**
- * \brief Method invoked upon a succesful requestFeature invocation
- *
- * \param ob Object implementing the JavaScript API associated with the requested Feature.
- */
- void onSuccess(in Object ob);
- };
-
-
- /**
- * \brief Generic error callback interface.
- */
- [Callback=FunctionOnly, NoInterfaceObject] interface ErrorCallback {
- /**
- * \brief Method invoked when an error occurs
- *
- * \param error The error that is raised.
- */
- void onError(in GenericError error);
- };
-
- /**
- * \brief Generic error interface.
- *
- *
- */
-
-
- interface GenericError {
-
- /**
- * \brief 16-bit error code.
- */
- readonly attribute unsigned short code;
- };
-
- /**
- * \brief DeviceApiError error interface.
- *
- * The error codes must be in the range 10000-19999.
- */
-
- interface DeviceAPIError : GenericError {
-
- /**
- * \brief Unknown error.
- */
- const unsigned short UNKNOWN_ERROR = 10000;
-
- /**
- * \brief Invalid value was specified as input parameter.
- */
- const unsigned short INVALID_ARGUMENT_ERROR = 10001;
-
- /**
- * \brief The searched value or object was not found.
- */
- const unsigned short NOT_FOUND_ERROR = 10002;
-
- /**
- * \brief Operation is pending.
- */
- const unsigned short PENDING_OPERATION_ERROR = 10003;
-
- /**
- * \brief Input/Output error.
- */
- const unsigned short IO_ERROR = 10004;
-
- /**
- * \brief Not supported error.
- */
- const unsigned short NOT_SUPPORTED_ERROR = 10005;
- };
-
- /**
- * \brief Security error interface.
- *
- * The error codes must be in the range 20000-29999
- */
- interface SecurityError : GenericError {
- const unsigned short PERMISSION_DENIED_ERROR = 20000;
- };
-
- /**
- * \brief PendingOperation.
- *
- * Interface that is returned by asynchronous operations in order to
- * provide a cancellation operation.
- */
- interface PendingOperation {
- /**
- * \brief Call to cancel the underlying asynchronous operation.
- *
- * This call is always successful, i.e. the pending operation i.e.
- * either cancelled or one of the callback is called.
- *
- * \return <em>false</em> if the cancellation did not succeed
- * either because the pending operation finished already or because
- * the cancellation cannot succeed due to technical limitations in
- * the underlying implementation. Consquently the pending operation
- * completes and depending on the success or failure the appropriate
- * callbacks will be called.
- * <em>true</em> if the cancellation did succeed. No callbacks will
- * be called by the cancelled pending operation.
- */
- boolean cancel();
- };
-
- /**
- * \brief BONDI root API.
- * bondi root property exists in the global object
- * \def-api-feature http://bondi.omtp.org/api/bondi.requestfeature
- */
- interface Bondi {
- /**
- * \brief Requests a feature.
- *
- * This function requests a named feature
- * asynchronously and returns a pending operation object.
- * If it succeeds it calls the successCallback and passes in
- * the object of the requested feature. If it fails it calls
- * the errorCallback passing in a DeviceAPIError which provides
- * an error message and error code indicating the nature of the error.
- *
- * If the requested feature binds itself to a root namespace
- * ( for example, "bondi.pim.contact") this will happen prior to the
- * successCallback being invoked.
- *
- * \param successCallback the success callback function
- * \param errorCallback the error callback function
- * \param name the feature name IRI
- *
- * \return PendingOperation enabling the requester to cancel this request.
- *
- * The errorCallback will receive one of the following errors:
- * \throw DeviceAPIError INVALID_ARGUMENT_ERROR if a malformed
- * argument has been supplied or a required argument has been omitted.
- * \throw DeviceAPIError NOT_FOUND_ERROR if the requested feature could not be found.
- * \throw SecurityError PERMISSION_DENIED_ERROR if the
- * requested feature is not permitted to load/bind or that
- * access to a required device capability has been denied.
- * \throw DeviceAPIError UNKNOWN_ERROR if an error occurred and a pending
- * operation object can't be returned.
- */
- PendingOperation requestFeature(in RequestFeatureSuccessCallback successCallback,
- in ErrorCallback errorCallback,
- in DOMString name)
- raises(DeviceAPIError, SecurityError);
- };
- interface BondiObject {
- readonly attribute Bondi bondi;
- };
- Window implements bondiObject;
-};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/filesystem.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/filesystem.widl
deleted file mode 100644
index 35f602b858a..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/filesystem.widl
+++ /dev/null
@@ -1,1038 +0,0 @@
-/*
- * Licensed to OMTP Ltd. (OMTP) under one or more contributor license agreements.
- * See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership.
- *
- * The Reference Implementation (save for such parts of the reference implementation made
- * available under separate terms and conditions) is made available under the terms of the
- * Apache License, version 2.0, subject to the condition that any "Works" and "Derivative
- * Works" used or distributed for commercial purposes must be and remain compliant with the
- * BONDI specification as promulgated by OMTP in each release. Your implementation of the
- * Reference Implementation (whether object or source) must maintain these conditions, and
- * you must notify any recipient of this condition in a conspicuous way.
- *
- * You may not use this BONDI Reference Implementation except in compliance with the License.
- *
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 or at
- * http://bondi.omtp.org/BONDI-LICENSE-2.0
- */
-
-/**
- * \brief BONDI filesystem API.
- *
- * The BONDI filesystem API provides access to the filesystem of a device. The
- * filesystem is abstractly represented as a collection of disjoint filesystem
- * root locations each corresponding to some specific location in the device
- * filesystem. The filesystem API exposes the hierarchies below these root
- * locations as a single virtual filesystem but provides no access to other
- * parts of the device filesystem.
- *
- * The roots that are exposed are determined by the platform also by the
- * context in which the filesystem API is invoked.
- *
- * Each root has a string name. Each file or directory within the virtual
- * filesystem is addressed using a fully-qualified path of the form:
- * <em>&lt;root name&gt;/&lt;path&gt;</em> where <em>&lt;rootname&gt;</em> is
- * the name of the root and <em>&lt;path&gt;</em> is the path to the file or
- * directory relative to that root.
- *
- * The list of the supported root locations can be retrieved by calling
- * filesystem.getRootLocations().
- *
- * The default location for a specific type of file, if one exists, can be
- * obtained by calling the filesystem.getDefaultLocation(...) method. A set of
- * platform-independent symbolic names for media types is defined. The default
- * location for a given file type may itself be a root, or some subdirectory of
- * a root. Although the set of roots available on a device is
- * platform-dependent, the getDefaultLocation(...) functionality can be used to
- * ensure that web applications can be written in a platform-independent way.
- *
- * In order to access specific locations which are prefixed with a value
- * retrieved by filesystem.getDefaultLocation or some root location returned by
- * filesystem.getRootLocations a File handle must be retrieved using the
- * filesystem.resolve call.
- *
- * A File handle represents either a file or a directory. If it is a file the
- * isFile attribute will be <em>true</em>, otherwise the isDirectory attribute
- * will be <em>true</em>. A file can be opened for reading and writing, using a
- * FileStream handle. A directory can be used to list its contents which is a
- * list of files and sub-directories. There is a resolve method on directories
- * as well in order to resolve files or sub-directories more conveniently than
- * processing directory listings.
- *
- * The "/" character is used as the (path) component separator.
- * The use of "." or ".." in location components is not required to be
- * supported.
- *
- * All path characters need to be <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a> encoded.
- *
- * \code
- * function errorCB(err) {
- * alert("BONDI filesystem API couldn't be requested: " + err.message);
- * }
- *
- * function successCB() {
- * var docLocation = bondi.filesystem.getDefaultLocation("documents");
- * var docDir = bondi.filesystem.resolve(docLocation);
- * var docFiles = docDir.listFiles();
- * for(var i = 0; i &lt; docFiles.length; i++) {
- * // displays name of each image file in image directory
- * alert(docFiles[i].name);
- * }
- * var testFile = docDir.createFile("test.txt");
- * var out = testFile.open("w", "UTF-8");
- * // writes Hello World to test.txt
- * out.write("Hello World");
- * out.close();
- * }
- *
- * bondi.requestFeature(successCB, errorCB, "filesystem");
- * \endcode
- *
- * \def-api-feature http://bondi.omtp.org/api/filesystem.read
- * \brief Filesystem read operations, including reading directory listings,
- * file contents and resolving root locations.
- * \device-cap io.file.read
- *
- * \def-api-feature http://bondi.omtp.org/api/filesystem.write
- * \brief Filesystem write operations, including creating files/directories,
- * writing to files, deleting files/directories, moving and copying
- * files.
- * \device-cap io.file.write
- *
- * \def-api-feature-set http://bondi.omtp.org/api/filesystem
- * \brief All the FileSystem features
- * \api-feature http://bondi.omtp.org/api/filesystem.read
- * \api-feature http://bondi.omtp.org/api/filesystem.write
- *
- * \def-device-cap io.file.read
- * \brief Read directory or file
- * \param name Name of directory or file, in virtual filesystem,
- * e.g. rootlocation/filename
- *
- * \def-device-cap io.file.write
- * \brief Write directory or file
- * \param name Name of directory or file, in virtual filesystem,
- * e.g. rootlocation/filename
- *
- * \author Paddy Byers &lt;paddy@aplixcorp.com&gt;
- * \author Anselm R Garbe &lt;anselm@aplixcorp.com&gt;
- * \version 1.1
- */
-module filesystem {
-
- /**
- * \brief Array of File handles.
- *
- * This array type is returned when directory listings are requested.
- */
- typedef sequence<File> FileArray;
-
- /**
- * \brief File system specific success callback.
- *
- * This callback interface specifies a success callback with a function
- * taking a File object as input argument. It is used in asynchronous
- * operations such as copying, moving and deleting files.
- */
- [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemSuccessCallback {
- /**
- * \brief Method invoked when the asynchronous call completes succesfully
- *
- * \param file The file resulting from the asynchronous call
- */
- void onSuccess(in File file);
- };
-
- /**
- * \brief Manager class exposed as the filesystem modules API.
- *
- * This manager class exposes the filesystem base API, such as
- * determining root and default locations, resolving a given location
- * into a File Handle and registering filesystem listeners for
- * filesystem events.
- *
- * \code
- * function errorCB(err) {
- * alert("BONDI filesystem API couldn't be requested: " + err.message);
- * }
- *
- * function successCB() {
- * var docLocation = bondi.filesystem.getDefaultLocation("documents");
- * var docDir = bondi.filesystem.resolve(docLocation);
- * var docFiles = docDir.listFiles();
- * for(var i = 0; i &lt; docFiles.length; i++) {
- * // displays name of each image file in image directory
- * alert(docFiles[i].name);
- * }
- * var testFile = docDir.createFile("test.txt");
- * var out = testFile.open("w", "UTF-8");
- * // writes Hello World to test.txt
- * out.write("Hello World");
- * out.close();
- * }
- *
- * bondi.requestFeature(successCB, errorCB, "filesystem");
- * \endcode
- */
- interface FileSystemManager {
-
- /**
- * \brief Contains the platform-dependent maximum path length.
- *
- * Read-only.
- *
- * \code
- * alert(bondi.filesystem.maxPathLength);
- * \endcode
- */
- readonly attribute unsigned long maxPathLength;
-
- /**
- * \brief Returns a default location path for the given arguments,
- * including the root location prefix.
- *
- * Optionally this method can be called with the space argument
- * specifying the minimum free disk space required.
- *
- * This function resolves location specifiers to location paths.
- * The following location specifiers are supported:
- * \n "wgt:package" the widget package location
- * \n "wgt:private" the widgets private storage
- * \n "wgt:public" the widgets public storage
- * \n "wgt:temp" the widgets temporary storage
- * \n "documents" the documents location,
- * e.g. the "My Documents" directory on some systems
- * \n "images" the images location,
- * e.g. the "My Pictures" directory on some systems
- * \n "videos" the videos location,
- * e.g. the "My Videos" directory on some systems
- * \n "temp" the temporary storage,
- * e.g resolving to "Temp"
- * \n "sdcard" the sdcard storage, if any
- *
- * \code
- * var wgtLocation = bondi.filesystem.getDefaultLocation('wgt:package');
- * \endcode
- *
- * \param specifier the location specifier, see above for supported specifiers.
- * \param minFreeSpace optional, minimum required free disk space in bytes for
- * this location, <em>0</em> (default) means no limitation
- * \return the location as a string or <em>null</em> if there
- * is no location for the given specifier or if there is not
- * enough space left for the requested space in bytes.
- * \throw DeviceAPIError INVALID_ARGUMENT_ERROR if the
- * specifier or space arguments are invalid
- */
- DOMString getDefaultLocation(in DOMString specifier, in unsigned long minFreeSpace)
- raises(DeviceAPIError);
-
- /**
- * \brief Returns all root locations.
- *
- * The root locations are symbolic names for filesystem
- * locations which are accessible and supported by the
- * underlying platform.
- *
- * Usually the following root locations will be supported:
- * \n "documents" represents "My Documents" on some platforms
- * \n "images" represents "My Pictures" on some platforms
- * \n "videos" represents "My Videos" on some platforms
- * \n "temp" represents "tmp" on some platforms
- * \n "sdcard" represents the sdcard on some platforms
- *
- * See also the getDefaultLocation method.
- *
- * \code
- * var locations = bondi.filesystem.getRootLocations();
- * for(var i = 0; i &lt; locations.length; i++) {
- * // locations[i] is a resolvable root location
- * }
- * \endcode
- *
- * \return string array of root locations.
- */
- StringArray getRootLocations();
-
- /**
- * \brief Resolves a location to a File handle.
- *
- * Validates and resolves the given location to a File handle
- * and returns a handle. A valid location is prefixed with a
- * valid root or default location and must address an existing
- * and accessible file.
- *
- * \api-feature http://bondi.omtp.org/api/filesystem.read
- *
- * \code
- * var location = bondi.filesystem.getDefaultLocation("temp");
- * var temp = bondi.filesystem.resolve(location);
- * var documents = bondi.filesystem.getDefaultLocation("documents");
- * var mydoc = bondi.filesystem.resolve(documents + "/data/2009/mydoc.txt");
- * \endcode
- *
- * \param location the location to resolve. Must be absolute
- * prefixed by a valid root or default location.
- * \return the resolved file object.
- * \throw SecurityError PERMISSION_DENIED_ERROR when
- * access is denied by the security policy.
- * \throw DeviceAPIError INVALID_ARGUMENT_ERROR if invalid location was given.
- */
- File resolve(in DOMString location)
- raises(SecurityError, DeviceAPIError);
-
- /**
- * \brief Registers a filesystem event listener.
- *
- * Filesystem event listeners are used in order to retrieve
- * notifications if root or default locations such as storage
- * cards are mounted/unmounted into/from the device filesystem.
- *
- * \api-feature http://bondi.omtp.org/api/filesystem.read
- *
- * \code
- * var listener = { mountEvent: function(location) { alert('mounted ' + location); },
- * unmountEvent: function(location) { alert('unmounted ' + location); };
- * bondi.filesystem.registerEventListener(listener);
- * \endcode
- *
- * \param listener the listener interface implementation
- * \throw DeviceAPIError INVALID_ARGUMENT_ERROR if the given listener
- * is invalid or not a listener.
- */
- void registerEventListener(in FileSystemListener listener)
- raises(DeviceAPIError);
-
- /**
- * \brief Unregisters a filesystem event listener.
- *
- * \code
- * bondi.filesystem.unregisterEventListener(listener);
- * \endcode
- *
- * \param listener the listener interface implementation
- * \throw DeviceAPIError INVALID_ARGUMENT_ERROR if the given listener
- * is invalid or not a listener.
- */
- void unregisterEventListener(in FileSystemListener listener)
- raises(DeviceAPIError);
- };
-
- /**
- * \brief Filesystem event listener class.
- *
- * This listener implements two methods to retrieve mount and unmount
- * notifications if root or default locations on a storage card get
- * available or unavailable.
- *
- * \code
- * var fsEventImpl = {
- * mountEvent: function(location) {
- * // location has been mounted
- * },
- * unmountEvent: function(location) {
- * // location has been unmounted
- * }
- * };
- * \endcode
- */
- interface FileSystemListener {
-
- /**
- * \brief Called when a new root location gets available.
- *
- * A new location could be a storage card for example.
- *
- * \param location the newly available location
- */
- void mountEvent(in DOMString location);
-
- /**
- * \brief Called when a location gets unavailable.
- *
- * Such a location could be a storage card for example.
- *
- * \param location the location which is becoming unavailable
- */
- void unmountEvent(in DOMString location);
- };
-
- /**
- * \brief File class.
- *
- * This interface represents the file abstraction in use. A file handle
- * can address files or directories. A file handle represents a file
- * if the isFile property is <em>true</em>, otherwise it represents a
- * directory.
- *
- * A file handle representing a file can be opened for I/O operations
- * such as reading and writing.
- *
- * A file handle representing a directory can list all files in the
- * current directory.
- *
- * \code
- *
- * // list directory contents
- * var files = dir.listFiles();
- * for(var i = 0; i &lt; files.length; i++) {
- * // alerts each name of dir's contents
- * alert(files[i].name);
- * }
- *
- * // opens a file for writing
- * var file = dir.createFile("test.txt");
- * var out = file.open("w", "UTF-8");
- * // writes Hello World to test.txt
- * out.write("Hello World");
- * out.close();
- * \endcode
- */
- interface File {
-
- /**
- * \brief Parent directory handle.
- *
- * Read-only.
- *
- * <em>null</em> if there is no parent directory.
- *
- * If there is no parent directory, this represents a root location.
- *
- * \code
- * var parent = file.parent;
- * if(parent != null) {
- * // parent directory handle
- * }
- * \endcode
- */
- readonly attribute File parent;
-
- /**
- * \brief File/directory access state in the filesystem.
- *
- * Read-only.
- *
- * <em>false</em> if there is write access.
- *
- * This attribute represents the actual state of a
- * file/directory in the filesystem. It does not check if the
- * accessor has io.file.write permission.
- *
- * \code
- * if(file.readOnly) {
- * // file cannot be written
- * }
- * \endcode
- */
- readonly attribute boolean readOnly;
-
- /**
- * \brief File type.
- *
- * Read-only.
- *
- * <em>true</em> if this handle is a file.
- * <em>false</em> if this handle is a directory.
- *
- * \code
- * if(file.isFile) {
- * // is a file
- * }
- * \endcode
- */
- readonly attribute boolean isFile;
-
- /**
- * \brief File type.
- *
- * Read-only.
- *
- * <em>true</em> if this handle is a directory.
- * <em>false</em> if this handle is a file.
- *
- * \code
- * if(file.isDirectory) {
- * // is a directory
- * }
- * \endcode
- */
- readonly attribute boolean isDirectory;
-
- /**
- * \brief Creation timestamp.
- *
- * Read-only.
- *
- * The creation timestamp of this file. This is the timestamp
- * when the file was first created in the filesystem. This is
- * equivalent to the timestamp when a call to createFile()
- * succeeds.
- *
- * It is unspecified and platform-dependent if the creation
- * timestamp changes when a file is moved.
- *
- * \code
- * alert(file.created); // displays the creation timestamp
- * \endcode
- *
- */
- readonly attribute Date created;
-
- /**
- * \brief Modification timestamp.
- *
- * Read-only.
- *
- * The modification timestamp of this file. This is the timestamp
- * of the most recent modification to the file, usually when the last
- * write operation succeeded. Opening a file for reading does not change
- * the modification timestamp.
- *
- * \code
- * alert(file.modified); // displays the modification timestamp
- * \endcode
- *
- */
- readonly attribute Date modified;
-
- /**
- * \brief Path of this file, excluding the file name.
- *
- * Read-only.
- *
- * If the file path is <em>/baz/foo.bar</em>, then
- * the path is <em>/baz/</em>.
- *
- * The encoding of file paths is <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>.
- *
- * \code
- * alert(file.path); // should be /baz/ if the file is /baz/foo.bar
- * \endcode
- */
- readonly attribute DOMString path;
-
- /**
- * \brief File name, excluding any path components.
- *
- * Read-only.
- *
- * Assumed the file path is <em>/baz/foo.bar</em>, then
- * the file name is <em>foo.bar</em>.
- *
- * The encoding of file names is <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>.
- *
- * \code
- * alert(file.name); // should be foo.bar if the file path is /baz/foo.bar
- * \endcode
- */
- readonly attribute DOMString name;
-
- /**
- * \brief Absolute path of this file.
- *
- * Read-only.
- *
- * Assumed the file path is <em>/baz/foo.bar</em>, then this is the absolute path.
- *
- * The encoding of file paths is <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>.
- *
- * \code
- * alert(file.absolutePath); // should be /baz/foo.bar if the file is /baz/foo.bar
- * \endcode
- */
- readonly attribute DOMString absolutePath;
-
- /**
- * \brief Size in bytes of this file.
- *
- * Read-only.
- *
- * If it is attempted to read this attribute on a directory,
- * <em>undefined</em> is returned.
- *
- * \code
- * alert(file.fileSize); // displays the file size
- * \endcode
- */
- readonly attribute unsigned long fileSize;
-
- /**
- * \brief Files metadata.
- *
- * The actual map contents are implementation dependent.
- *
- * \code
- * // should display the file author, if supported by the
- * // platform, undefined otherwise
- * alert(file.metadata.author);
- * \endcode
- */
- readonly attribute Map metadata;
-
- /**
- * \brief Returns list of all files of this directory.
- *
- * The list of files contains directories and files, it does
- * not contain the directories "." and "..".
- *
- * \api-feature http://bondi.omtp.org/api/filesystem.read
- *
- * \code
- * var files = dir.listFiles();
- * for(var i = 0; i &lt; files.length; i++) {
- * // files[i] iterate over all files of this directory
- * }
- * \endcode
- *
- * \return array of contents of this directory.
- * \throw SecurityError PERMISSION_DENIED_ERROR when
- * access is denied by the security policy.
- * \throw DeviceAPIError IO_ERROR if this is not a directory.
- */
- FileArray listFiles()
- raises(SecurityError, DeviceAPIError);
-
- /**
- * \brief Opens the file in the given mode supporting the given
- * encoding.
- *
- * \api-feature http://bondi.omtp.org/api/filesystem.read
- * \api-feature http://bondi.omtp.org/api/filesystem.write
- *
- * \code
- * // opens file for reading
- * var in = file.open("r", "UTF-8");
- * \endcode
- *
- * \param mode the mode for opening a file
- * \n "r" for reading
- * \n "a" for appending
- * \n "w" for [over]writing
- * \param encoding the encoding for read/write operations on the file,
- * supported encodings are:
- * \n "<a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>" default encoding
- * \n "<a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1">ISO8859-1</a>" latin1 encoding
- * \return file stream handle to read/write from/to.
- * \throw SecurityError PERMISSION_DENIED_ERROR when
- * access is denied by the security policy.
- * \throw DeviceAPIError INVALID_ARGUMENT_ERROR if invalid mode
- * or unsupported encoding is supplied.
- * \throw DeviceAPIError IO_ERROR if this is not a file.
- */
- FileStream open(in DOMString mode, in DOMString encoding)
- raises(SecurityError, DeviceAPIError);
-
- /**
- * \brief Copies this file.
- *
- * The copy will be created in the given path. If this function
- * fails and the error callback is called, it will pass an
- * DeviceAPIError IO_ERROR to the callback.
- *
- * The encoding of file paths is <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>.
- *
- * \api-feature http://bondi.omtp.org/api/filesystem.write
- *
- * \code
- * // copies this file to /temp/file.copy
- * var op = file.copyTo(function(copiedFile) { alert("file copied"); }, null, "/temp/file.copy", false);
- * \endcode
- *
- * \param successCallback called when the file has been copied.
- * \param errorCallback called if an error occured.
- * \param filePath the new file path, [a-Z0-9_- /]+ are allowed
- * \param overwrite <em>true</em> enforces overwriting an existing file.
- * \return PendingOperation enabling the requester to cancel this request.
- * \throw SecurityError PERMISSION_DENIED_ERROR when
- * access is denied by the security policy.
- * \throw DeviceAPIError IO_ERROR if it is attempted to move to a directory.
- * \throw DeviceAPIError IO_ERROR if overwrite is <em>false</em> and target file exists.
- * \throw DeviceAPIError IO_ERROR if any characters in the path are not supported.
- * \throw DeviceAPIError IO_ERROR if the file cannot be copied.
- */
- PendingOperation copyTo(in FileSystemSuccessCallback successCallback,
- in ErrorCallback errorCallback,
- in DOMString filePath,
- in boolean overwrite)
- raises(SecurityError, DeviceAPIError);
-
- /**
- * \brief Moves this file.
- *
- * The file will be moved atomically to the given path. This is
- * different to copyTo and deleting the old file, because this
- * operation does not need extra disk space on certain platforms.
- * If this function fails and the error callback is called, it
- * will pass an DeviceAPIError IO_ERROR to the callback.
- *
- * The encoding of file paths is <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>.
- *
- * \api-feature http://bondi.omtp.org/api/filesystem.write
- *
- * \code
- * // moves this file to /temp/file.move
- * var op = file.moveTo(function(movedFile) { file = movedFile; }, null, "/temp/file.move");
- * \endcode
- *
- * \param successCallback called when the file has been copied.
- * \param errorCallback called if an error occured.
- * \param filePath the new file name, [a-Z0-9_- /]+ are allowed
- * \param overwrite <em>true</em> enforces overwriting an existing file.
- * \return PendingOperation enabling the requester to cancel this request.
- * \throw SecurityError PERMISSION_DENIED_ERROR when
- * access is denied by the security policy.
- * \throw DeviceAPIError IO_ERROR if it is attempted to move to a directory.
- * \throw DeviceAPIError IO_ERROR if overwrite is <em>false</em> and target file exists.
- * \throw DeviceAPIError IO_ERROR if any characters in the path are not supported.
- * \throw DeviceAPIError IO_ERROR if the file cannot be moved.
- */
- PendingOperation moveTo(in FileSystemSuccessCallback successCallback,
- in ErrorCallback errorCallback,
- in DOMString filePath,
- in boolean overwrite)
- raises(SecurityError, DeviceAPIError);
-
- /**
- * \brief Creates a directory.
- *
- * The new directory will be created relatively to the current
- * directory this operation is performed on. It will attempt to
- * create all necessary sub-directories as well. The use of "."
- * or ".." in path components is not supported. If the
- * bottom-most directory being created already exists this
- * method will throw an IO_ERROR.
- *
- * The encoding of file paths is <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>.
- *
- * \api-feature http://bondi.omtp.org/api/filesystem.write
- *
- * \code
- * var newDir = dir.createDirectory("newDir");
- * var anotherNewDir = dir.createDirectory("newDir1/subNewDir1");
- * \endcode
- *
- * \param dirPath the new directory path, it should only contain
- * characters supported by the underlying filesystem.
- * \return file handle of the new directory
- * \throw SecurityError PERMISSION_DENIED_ERROR when
- * access is denied by the security policy.
- * \throw DeviceAPIError IO_ERROR if this is not a directory.
- * \throw DeviceAPIError IO_ERROR if any path component does not exist.
- * \throw DeviceAPIError IO_ERROR if a file with the same name exists.
- * \throw DeviceAPIError IO_ERROR if any characters in the path are not supported.
- * \throw DeviceAPIError IO_ERROR if the directory cannot be created.
- */
- File createDirectory(in DOMString dirPath)
- raises(SecurityError, DeviceAPIError);
-
- /**
- * \brief Creates a new empty file.
- *
- * The new empty file is created in the given path relatively
- * to the current directory the operation is performed on. The
- * use of "." or ".." in path components is not supported. If
- * the bottom-most file being created already exists this
- * method will throw an IO_ERROR. If any path component does
- * not exist this method will throw an IO_ERROR.
- *
- * The encoding of file paths is <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>.
- *
- * \api-feature http://bondi.omtp.org/api/filesystem.write
- *
- * \code
- * var newFile = dir.createFile("newFile");
- * \endcode
- *
- * \param filePath the new file path, it should only contain
- * characters supported by the underlying filesystem.
- * \return file handle of the new empty file
- * \throw SecurityError PERMISSION_DENIED_ERROR when
- * access is denied by the security policy.
- * \throw DeviceAPIError IO_ERROR if this is not a directory.
- * \throw DeviceAPIError IO_ERROR if any path component does not exist.
- * \throw DeviceAPIError IO_ERROR if the file already exists.
- * \throw DeviceAPIError IO_ERROR if any characters in the path are not supported.
- * \throw DeviceAPIError IO_ERROR if the file cannot be created.
- */
- File createFile(in DOMString filePath)
- raises(SecurityError, DeviceAPIError);
-
- /**
- * \brief Resolves an existing file or directory relatively to
- * the current directory this operation is performed on; and
- * returns a file handle for it.
- *
- * The filePath is not allowed to contain the "." or ".." directories.
- *
- * The encoding of file paths is <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>.
- *
- * \api-feature http://bondi.omtp.org/api/filesystem.read
- *
- * \code
- * var hellofile = dir.resolve("foo/hello.txt");
- * \endcode
- *
- * \param filePath the relative file/directory path to resolve.
- * \return file handle of the file or <em>null</em> if it cannot be resolved.
- * \throw SecurityError PERMISSION_DENIED_ERROR when
- * access is denied by the security policy.
- * \throw DeviceAPIError IO_ERROR if this is not a directory.
- * \throw DeviceAPIError IO_ERROR if any characters in the path are not supported.
- * \throw DeviceAPIError IO_ERROR if the file or directory cannot be resolved.
- */
- File resolve(in DOMString filePath)
- raises(SecurityError, DeviceAPIError);
-
- /**
- * \brief Deletes this directory.
- *
- * This function attempts to delete a directory or directory
- * tree synchronously and returns <em>true</em> on success,
- * <em>false</em> otherwise. It may throw an IO_ERROR if a
- * recursive deletion partially fails and any deleted data so
- * far cannot be recovered. This might happen due the lack of
- * filesystem permissions or if any directories or files are
- * openened by other processes.
- *
- * \api-feature http://bondi.omtp.org/api/filesystem.write
- *
- * \code
- * var fullPath = dir.fullPath;
- * if(dir.deleteDirectory(true)) {
- * // subsequent accesses to dir will throw an error
- * alert(fullPath + ' deleted');
- * }
- * \endcode
- *
- * \param recursive <em>true</em> means a recursive deletion, this
- * will destroy all data recursively, use with caution.
- * \return <em>true</em> on success
- * \throw SecurityError PERMISSION_DENIED_ERROR when
- * access is denied by the security policy.
- * \throw DeviceAPIError IO_ERROR if this is a file.
- * \throw DeviceAPIError IO_ERROR if the directory is not empty and
- * this operation is not performed recursively.
- * \throw DeviceAPIError IO_ERROR if the directory or any file or sub-directory cannot be deleted.
- */
- boolean deleteDirectory(in boolean recursive)
- raises(SecurityError, DeviceAPIError);
-
- /**
- * \brief Deletes this file.
- *
- * Returns <em>true</em> on success, <em>false</em> otherwise.
- *
- * \api-feature http://bondi.omtp.org/api/filesystem.write
- *
- * \code
- * var fullPath = dir.fullPath;
- * if(dir.deleteFile()) {
- * // subsequent accesses to dir will throw an error
- * alert(fullPath + ' deleted');
- * }
- * \endcode
- *
- * \return <em>true</em> on success
- * \throw SecurityError PERMISSION_DENIED_ERROR when
- * access is denied by the security policy.
- * \throw DeviceAPIError IO_ERROR if this is a directory.
- * \throw DeviceAPIError IO_ERROR if the file cannot be deleted due
- * the lack of filesystem permissions or if it is locked or
- * opened by another process.
- */
- boolean deleteFile()
- raises(SecurityError, DeviceAPIError);
- };
-
- /**
- * \brief FileStream API.
- *
- * A FileStream represents a handle to a File opened for read and/or
- * write operations. Read and write operations are performed relative
- * to a file pointer which represents the current position in the file.
- *
- * A series of read/write methods are available that permit both binary and
- * text to be processed.
- *
- * Once a file stream is closed, any operation attempted on this stream
- * will result in a normal JavaScript error.
- */
- interface FileStream {
-
- /**
- * \brief Indicates whether or not the current file pointer is at the end
- * of the file.
- *
- * <em>true</em> if the position is at the end of the current file stream.
- *
- * \code
- * if(stream.eof) {
- * // file has been read completely
- * }
- * \endcode
- */
- readonly attribute boolean eof;
-
- /**
- * \brief Get/set stream position for reads/writes.
- *
- * The stream position is an offset of bytes from the start of
- * the file stream. When invoking an operation that reads or
- * writes from the stream, the operation will take place from
- * the position in the position attribute.
- *
- * \code
- * alert(stream.position); // displays current stream position
- * // alters current stream position to the begin of the file,
- * // like seek() in C
- * stream.position = 0;
- * \endcode
- * \throw DeviceAPIError IO_ERROR if a position was given that is out of the stream range.
- */
- attribute unsigned long position
- setraises(DeviceAPIError);
-
- /**
- * \brief Returns the number of bytes that are available for
- * reading from the stream.
- *
- * The number of bytes available for reading is the maximum
- * amount of bytes that can be read in the next read operation.
- *
- * -1 if eof is <em>true</em>.
- *
- * \code
- * alert(stream.bytesAvailable); // displays the available bytes to be read
- * \endcode
- */
- readonly attribute unsigned long bytesAvailable;
-
- /**
- * \brief Closes this FileStream.
- *
- * Flushes any pending buffered writes and closes the File. Always succeeds.
- * Note that pending writes might not succeed.
- *
- * \code
- * stream.close(); // closes this stream, no subsequent access to stream allowed
- * \endcode
- */
- void close();
-
- /**
- * \brief Reads the specified number of characters.
- *
- * Reads specified number of characters and returns them as string.
- * The resulting string length might be shorter than charCount if eof
- * is <em>true</em>.
- *
- * \code
- * var text = stream.read(0);
- * stream.close();
- * \endcode
- *
- * \param charCount number of characters being read, if
- * <em>0</em> it will read as long as bytes are available.
- * \return the result of read characters as a string.
- * \throw DeviceAPIError IO_ERROR if an error occurs during read.
- */
- DOMString read(in unsigned long charCount)
- raises(DeviceAPIError);
-
- /**
- * \brief Reads the specified number of bytes from this FileStream.
- *
- * If 0 is supplied it will read all available bytes in a
- * single read operation.
- *
- * \code
- * // reads up to 256 bytes from the stream
- * var raw = stream.readBytes(256);
- * for(var i = 0; i &lt; raw.length; i++) {
- * // raw[i] contains the i-th byte of the current data chunk
- * }
- * \endcode
- *
- * \param byteCount number of bytes being read. Must not be <em>0</em>.
- * \return the result of read bytes as a byte (or number) array.
- * \throw DeviceAPIError IO_ERROR if an error occurs during readBytes.
- */
- ByteArray readBytes(in unsigned long byteCount)
- raises(DeviceAPIError);
-
- /**
- * \brief Reads the specified number of bytes from this FileStream, encoding
- * the result in base64.
- *
- * If 0 is supplied it will read all available bytes in a
- * single read operation.
- *
- * \code
- * // reads up to 256 bytes from the stream
- * var base64 = stream.readBase64(256);
- * \endcode
- *
- * \param byteCount number of bytes being read. Must not be <em>0</em>.
- * \return the result of read bytes as base64 encoding string.
- * \throw DeviceAPIError IO_ERROR if an error occurs during readBase64.
- */
- DOMString readBase64(in unsigned long byteCount)
- raises(DeviceAPIError);
-
- /**
- * \brief Writes the specified DOMString to this FileStream.
- *
- * \code
- * var text = "Hello world";
- * stream.write(text);
- * \endcode
- *
- * \param stringData the actual string to be written.
- * \throw DeviceAPIError IO_ERROR if an error occurs during write.
- */
- void write(in DOMString stringData)
- raises(DeviceAPIError);
-
- /**
- * \brief Writes the specified bytes to this FileStream.
- *
- * \code
- * var bytes = in.readBytes(256);
- * out.writeBytes(bytes); // writes the bytes read from in to out
- * \endcode
- *
- * \param byteData the byte data array being written.
- * \throw DeviceAPIError IO_ERROR if an error occurs during writeBytes.
- */
- void writeBytes(in ByteArray byteData)
- raises(DeviceAPIError);
-
- /**
- * \brief Converts the specified base64 DOMString to bytes and writes the
- * result to this FileStream.
- *
- * \code
- * var base64 = in.readBase64(256);
- * out.writeBase64(base64); // writes the base64 data read from in to out
- * \endcode
- *
- * \param base64Data the base64 data being written.
- * \throw DeviceAPIError IO_ERROR if an error occurs during writeBase64.
- */
- void writeBase64(in DOMString base64Data)
- raises(DeviceAPIError);
- };
-
- /**
- * \brief Specifies what is instantiated at feature request
- * \def-instantiated
- * \api-feature http://bondi.omtp.org/api/filesystem.read
- * \api-feature http://bondi.omtp.org/api/filesystem.write
- */
- interface FileSystemManagerObject {
- readonly attribute FileSystemManager fileSystemManager;
- };
- bondi implements FileSystemManagerObject;
-
-};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/spectowidl.xsl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/spectowidl.xsl
deleted file mode 100644
index 44252770940..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/spectowidl.xsl
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--====================================================================
-$Id$
-Copyright 2009 Aplix Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-XSLT stylesheet to extract Web IDL snippets from Web IDL spec.
-=====================================================================-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-<xsl:output method="text" encoding="utf-8"/>
-
-<xsl:template match="code[@class='idl-code']">
- <xsl:value-of select="."/><xsl:text>
-</xsl:text>
-</xsl:template>
-
-<xsl:template match="text()"/>
-
-</xsl:stylesheet>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/widlhtml.css b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/widlhtml.css
deleted file mode 100644
index 8543097a3cc..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/examples/widlhtml.css
+++ /dev/null
@@ -1,100 +0,0 @@
-body {
- padding: 2em;
- margin: 0;
- font-family: sans-serif;
- color: black;
- background: white;
- background-position: top left;
- background-attachment: fixed;
- background-repeat: no-repeat;
-}
-:link { color: #00C; background: transparent }
-:visited { color: #609; background: transparent }
-a:active { color: #C00; background: transparent }
-a:link img, a:visited img { border-style: none } /* no border on img links */
-
-h1, h2, h3, h4, h5, h6 { text-align: left }
-/* background should be transparent, but WebTV has a bug */
-h1, h2, h3 { color: #009393; background: white }
-h1 { font: 170% sans-serif }
-h2 { font: 140% sans-serif }
-h3 { font: 120% sans-serif }
-h4 { font: bold 100% sans-serif }
-h5 { font: italic 100% sans-serif }
-h6 { font: small-caps 100% sans-serif; margin-bottom: 0 }
-
-.hide { display: none }
-
-code { font-size: 120% }
-
-ul.toc, ol.toc, ul.authors {
- list-style: none;
-}
-
-.hide { display: none }
-
-div.head { margin-bottom: 1em }
-div.head h1 { margin-top: 2em; clear: both }
-div.head table { margin-left: 2em; margin-top: 2em }
-div.constraint, div.issue, div.note, div.notice { margin-left: 2em; }
-div.exampleInner pre { margin-left: 1em; margin-top: 0em; margin-bottom: 0em}
-div.exampleOuter {border: 4px double gray; margin: 0em; padding: 0em}
-div.exampleInner { background-color: #d5dee3;
- border-top-width: 4px;
- border-top-style: double;
- border-top-color: #d3d3d3;
- border-bottom-width: 4px;
- border-bottom-style: double;
- border-bottom-color: #d3d3d3;
- padding: 4px; margin: 0em }
-div.exampleWrapper { margin: 4px }
-div.exampleHeader { font-weight: bold; margin: 4px}
-div.term { font: 100% sans-serif; color:#000000; font-weight: bold; line-height: 60%}
-div.list { font: 100% sans-serif; color:#000000; font-weight: normal; line-height: 60%}
-
-.optional {text-decoration: line-through; display: none;}
-
-.copyright,.legalnotice { font-size: small }
-.copyright small { font-size: small }
-
-@media screen { /* hide from IE3 */
-a[href]:hover { background: #ffa }
-}
-
-ol.enumar { list-style-type: decimal; }
-ol.enumla { list-style-type: lower-alpha; }
-ol.enumlr { list-style-type: lower-roman; }
-ol.enumua { list-style-type: upper-alpha; }
-ol.enumur { list-style-type: upper-roman; }
-
-/* BONDI additions */
-
-.toc {
- list-style-type: none;
-}
-
-pre {
- background-color:#D5DEE3;
- overflow: auto;
- padding: 1em;
-}
-
-.examplecode {
- background-color: #EEE;
-}
-
-.def-api-feature-set dt, .def-api-feature dt, dt .def-device-cap, dt.const code { font: bold 100% sans-serif; }
-dt.attribute code, dt.method code { font: italic 100% sans-serif; }
-
-.def-device-caps dd { margin-bottom: 2em }
-
-dt.method { margin-top: 2em }
-
-.summary td {
- text-align: left;
- background-color: #BBDDDD;
- color: inherit;
- font-family: monospace;
- white-space:pre;
- padding: .3em 1em .3em 1em;
-}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/comment.c b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/comment.c
deleted file mode 100644
index 622a7bea7b4..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/comment.c
+++ /dev/null
@@ -1,1827 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "comment.h"
-#include "entities.h"
-#include "lex.h"
-#include "misc.h"
-#include "node.h"
-#include "os.h"
-#include "process.h"
-
-/* struct cnode : a node in the comment parse tree */
-struct cnode {
- struct cnode *next;
- struct cnode *children;
- struct cnode *parent;
- const struct cnodefuncs *funcs;
- const char *attrtext;
- const char *filename;
- unsigned int linenum;
-};
-
-struct cnodefuncs {
- int indesc; /* non-zero if it outputs its own xml element that does
- not want to be inside <description> */
- int needpara; /* non-zero if text must be in a para node that is a child
- of this one */
- int (*askend)(struct cnode *cnode, const struct cnodefuncs *type);
- void (*end)(struct cnode *cnode);
- void (*output)(struct cnode *cnode, unsigned int indent);
-};
-
-struct paramcnode {
- struct cnode cn;
- int inout;
- char name[1];
-};
-
-/* struct comment : a doxygen comment */
-struct comment {
- struct comment *next;
- struct node *node;
- unsigned int type;
- const char *filename;
- unsigned int linenum;
- struct cnode root;
- int back; /* Whether the comment refers back rather than forward. */
- char *text;
-};
-
-
-static struct node *lastidentifier;
-static struct comment *comments;
-static int incode, inhtmlblock;
-static struct comment *curcomment;
-
-/***********************************************************************
- * htmleldescs : table of recnogized HTML elements
- */
-#define HTMLEL_EMPTY 1
-#define HTMLEL_INLINE 2
-#define HTMLEL_BLOCK 4
-#define HTMLEL_AUTOCLOSE 8
-#define HTMLEL_LI 0x10
-#define HTMLEL_DLCONTENTS 0x20
-#define HTMLEL_TABLECONTENTS 0x40
-#define HTMLEL_TRCONTENTS 0x80
-
-#define HTMLEL_FLOW (HTMLEL_BLOCK | HTMLEL_INLINE)
-
-struct htmleldesc {
- unsigned int namelen;
- const char *name;
- unsigned int flags;
- unsigned int content;
-};
-
-static const struct htmleldesc htmleldescs[] = {
- { 1, "a", HTMLEL_INLINE, 0 },
- { 1, "b", HTMLEL_INLINE, 0 },
- { 2, "br", HTMLEL_INLINE, HTMLEL_EMPTY },
- { 3, "img", HTMLEL_INLINE, HTMLEL_EMPTY },
- { 2, "dd", HTMLEL_DLCONTENTS, HTMLEL_FLOW },
- { 2, "dl", HTMLEL_BLOCK, HTMLEL_DLCONTENTS },
- { 2, "dt", HTMLEL_DLCONTENTS, HTMLEL_INLINE },
- { 2, "em", HTMLEL_INLINE, 0 },
- { 2, "li", HTMLEL_LI, HTMLEL_FLOW },
- { 2, "ol", HTMLEL_BLOCK, HTMLEL_LI },
- { 1, "p", HTMLEL_BLOCK, HTMLEL_INLINE },
- { 2, "td", HTMLEL_TRCONTENTS | HTMLEL_AUTOCLOSE, HTMLEL_FLOW },
- { 2, "th", HTMLEL_TRCONTENTS | HTMLEL_AUTOCLOSE, HTMLEL_FLOW },
- { 2, "tr", HTMLEL_TABLECONTENTS | HTMLEL_AUTOCLOSE, HTMLEL_TRCONTENTS },
- { 5, "table", HTMLEL_BLOCK, HTMLEL_TABLECONTENTS },
- { 2, "ul", HTMLEL_BLOCK, HTMLEL_LI },
- { 0, 0, 0, 0 }
-};
-#define HTMLELDESC_B (htmleldescs + 1)
-#define HTMLELDESC_BR (htmleldescs + 2)
-
-/***********************************************************************
- * addcomment : add a comment to the list of comments if it has doxygen syntax
- *
- * Enter: tok struct
- */
-void
-addcomment(struct tok *tok)
-{
- if (tok->len >= 1 && (tok->start[0] == '!'
- || (tok->type == TOK_BLOCKCOMMENT && tok->start[0] == '*')
- || (tok->type == TOK_INLINECOMMENT && tok->start[0] == '/')))
- {
- struct comment *comment;
- comment = memalloc(sizeof(struct comment));
- comment->text = memalloc(tok->len + 1);
- memcpy(comment->text, tok->start, tok->len);
- comment->text[tok->len] = 0;
- comment->type = tok->type;
- comment->filename = tok->filename;
- comment->linenum = tok->linenum;
- comment->node = 0;
- comment->back = 0;
- if (comment->text[1] == '<') {
- comment->back = 1;
- if (!lastidentifier) {
- locerrorexit(comment->filename, comment->linenum,
- "no identifier to attach doxygen comment to");
- }
- comment->node = lastidentifier;
- }
- comment->next = comments;
- comments = comment;
- }
-}
-
-/***********************************************************************
- * setcommentnode : set parse node to attach comments to
- *
- * Enter: node2 = parse node for identifier
- */
-void
-setcommentnode(struct node *node2)
-{
- struct comment *comment = comments;
- while (comment && !comment->node) {
- comment->node = node2;
- comment = comment->next;
- }
- lastidentifier = node2;
-}
-
-/***********************************************************************
- * joininlinecomments : join adjacent inline comments
- *
- * Enter: comment = list of comment structs
- *
- * Return: new list of comment structs
- *
- * This function also discards any single inline comment that does not
- * refer back.
- */
-static struct comment *
-joininlinecomments(struct comment *comments)
-{
- struct comment **pcomment;
- pcomment = &comments;
- for (;;) {
- struct comment *comment;
- comment = *pcomment;
- if (!comment)
- break;
- if (comment->type != TOK_INLINECOMMENT) {
- /* Keep block comment as is. */
- pcomment = &comment->next;
- } else if (!comment->back && (!comment->next
- || comment->next->type != TOK_INLINECOMMENT
- || comment->next->filename != comment->filename
- || comment->next->linenum != comment->linenum + 1))
- {
- /* Discard single // comment that does not refer back. */
- *pcomment = comment->next;
-
- } else {
- /* Find sequence of adjacent // comments (adjacent lines,
- * referring to same node) and join them. We do this in two
- * passes, one to count the length of the comment and one
- * to join. Note that the list is still in reverse order,
- * so we expect the line number to decrease by 1 each time. */
- struct comment *newcomment = 0, *comment2;
- const char *filename = comment->filename;
- unsigned int linenum = comment->linenum;
- for (;;) {
- char *wp = newcomment->text;
- comment2 = comment;
- do {
- unsigned int len = strlen(comment2->text);
- if (newcomment)
- memcpy(wp, comment2->text, len);
- wp += len;
- linenum--;
- comment2 = comment2->next;
- } while (comment2 && comment2->filename == filename
- && comment2->linenum == linenum
- && comment2->node == comment->node);
- /* Finished a pass. */
- if (newcomment) {
- *wp = 0;
- break;
- }
- newcomment = memalloc(sizeof(struct comment)
- + wp - newcomment->text);
- newcomment->node = comment->node;
- newcomment->type = comment->type;
- newcomment->filename = filename;
- newcomment->linenum = linenum + 1;
- }
- /* Replace the scanned comment struct with newcomment in the
- * list. */
- newcomment->next = comment2;
- *pcomment = newcomment;
- pcomment = &newcomment->next;
- }
- }
- return comments;
-}
-
-/***********************************************************************
- * outputchildren : call output recursively on children of cnode
- *
- * Enter: cnode
- * indent = indent (nesting) level of parent
- * indesc = whether already in <description> or other top-level
- * descriptive element
- */
-static void
-outputchildren(struct cnode *cnode, unsigned int indent, int indesc)
-{
- int curindesc = indesc;
- cnode = cnode->children;
- while (cnode) {
- if (curindesc != cnode->funcs->indesc) {
- assert(!indesc);
- printf("%*s<%sdescription>\n", indent + 1, "", curindesc ? "/" : "");
- curindesc = !curindesc;
- }
- (*cnode->funcs->output)(cnode, indent + 2);
- cnode = cnode->next;
- }
- if (curindesc != indesc)
- printf("%*s<%sdescription>\n", indent + 1, "", curindesc ? "/" : "");
-}
-
-/***********************************************************************
- * default_askend : ask node if it wants to end at a para start (default
- * implementation)
- *
- * Enter: cnode
- * type = 0 else cnodefuncs for newly starting para
- *
- * Return: non-zero if this node wants to end
- */
-static int
-default_askend(struct cnode *cnode, const struct cnodefuncs *type)
-{
- return 1;
-}
-
-/***********************************************************************
- * root_askend : ask root node if it wants to end at a para start
- *
- * Enter: cnode for root
- * type = 0 else cnodefuncs for newly starting para
- *
- * Return: non-zero if this node wants to end
- */
-static int
-root_askend(struct cnode *cnode, const struct cnodefuncs *type)
-{
- return 0;
-}
-
-/***********************************************************************
- * root_output : output root cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-root_output(struct cnode *cnode, unsigned int indent)
-{
- outputchildren(cnode, indent, 0);
-}
-
-/***********************************************************************
- * cnode type root
- */
-static const struct cnodefuncs root_funcs = {
- 0, /* !indesc */
- 1, /* needpara */
- &root_askend,
- 0, /* end */
- &root_output,
-};
-
-/***********************************************************************
- * endcnode : end current cnode
- *
- * Enter: cnode = current cnode
- *
- * Return: cnode = new current code (parent of old one)
- */
-static struct cnode *
-endcnode(struct cnode *cnode)
-{
- if (cnode->funcs->end)
- (*cnode->funcs->end)(cnode);
- /* Reverse the children list. */
- {
- struct cnode *child = cnode->children;
- cnode->children = 0;
- while (child) {
- struct cnode *next = child->next;
- child->next = cnode->children;
- cnode->children = child;
- child = next;
- }
- }
- return cnode->parent;
-}
-
-/***********************************************************************
- * endspecificcnode : end a specific type of cnode
- *
- * Enter: cnode = current cnode
- * type = type of node to end
- * filename, linenum = filename and line number (for error reporting)
- *
- * Return: new current cnode
- */
-static struct cnode *
-endspecificcnode(struct cnode *cnode, const struct cnodefuncs *type,
- const char *filename, unsigned int linenum)
-{
- while (cnode->funcs != type) {
- if (cnode->funcs == &root_funcs)
- locerrorexit(filename, linenum, "unmatched \\endcode");
- cnode = endcnode(cnode);
- }
- return cnode;
-}
-
-/***********************************************************************
- * startcnode : start a newly created cnode
- *
- * Enter: cnode = current cnode
- * newcnode = new cnode to start
- *
- * Return: new current cnode (which is the same as newcnode)
- */
-static struct cnode *
-startcnode(struct cnode *cnode, struct cnode *newcnode)
-{
- newcnode->parent = cnode;
- newcnode->next = cnode->children;
- cnode->children = newcnode;
- return newcnode;
-}
-
-/***********************************************************************
- * para_output : output para cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-para_output(struct cnode *cnode, unsigned int indent)
-{
- printf("%*s<p>\n", indent, "");
- outputchildren(cnode, indent, 1);
- printf("%*s</p>\n", indent, "");
-}
-
-/***********************************************************************
- * para_end : end a para cnode
- *
- * Enter: cnode struct
- */
-static void
-para_end(struct cnode *cnode)
-{
- /* If the para cnode is empty, remove it. */
- if (!cnode->children)
- cnode->parent->children = cnode->next;
-}
-
-/***********************************************************************
- * cnode type para
- */
-static const struct cnodefuncs para_funcs = {
- 1, /* indesc */
- 0, /* !needpara */
- &default_askend,
- &para_end, /* end */
- &para_output,
-};
-
-/***********************************************************************
- * brief_output : output brief cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-brief_output(struct cnode *cnode, unsigned int indent)
-{
- printf("%*s<brief>\n", indent, "");
- outputchildren(cnode, indent, 1);
- printf("%*s</brief>\n", indent, "");
-}
-
-/***********************************************************************
- * cnode type brief
- */
-static const struct cnodefuncs brief_funcs = {
- 0, /* !indesc */
- 0, /* !needpara */
- &default_askend,
- 0, /* end */
- &brief_output,
-};
-
-/***********************************************************************
- * return_output : output return cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-return_output(struct cnode *cnode, unsigned int indent)
-{
- printf("%*s<description><p>\n", indent, "");
- outputchildren(cnode, indent, 1);
- printf("%*s</p></description>\n", indent, "");
-}
-
-/***********************************************************************
- * cnode type return
- */
-static const struct cnodefuncs return_funcs = {
- 0, /* !indesc */
- 0, /* !needpara */
- &default_askend,
- 0, /* end */
- &return_output,
-};
-
-/***********************************************************************
- * author_output : output name cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-name_output(struct cnode *cnode, unsigned int indent)
-{
- printf("%*s<name>\n", indent, "");
- outputchildren(cnode, indent, 1);
- printf("%*s</name>\n", indent, "");
-}
-
-/***********************************************************************
- * cnode type name
- */
-static const struct cnodefuncs name_funcs = {
- 0, /* !indesc */
- 0, /* !needpara */
- &default_askend,
- 0, /* end */
- &name_output,
-};
-
-/***********************************************************************
- * author_output : output author cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-author_output(struct cnode *cnode, unsigned int indent)
-{
- printf("%*s<author>\n", indent, "");
- outputchildren(cnode, indent, 1);
- printf("%*s</author>\n", indent, "");
-}
-
-/***********************************************************************
- * cnode type author
- */
-static const struct cnodefuncs author_funcs = {
- 0, /* !indesc */
- 0, /* !needpara */
- &default_askend,
- 0, /* end */
- &author_output,
-};
-
-/***********************************************************************
- * version_output : output version cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-version_output(struct cnode *cnode, unsigned int indent)
-{
- printf("%*s<version>\n", indent, "");
- outputchildren(cnode, indent, 1);
- printf("%*s</version>\n", indent, "");
-}
-
-/***********************************************************************
- * cnode type version
- */
-static const struct cnodefuncs version_funcs = {
- 0, /* !indesc */
- 0, /* !needpara */
- &default_askend,
- 0, /* end */
- &version_output,
-};
-
-/***********************************************************************
- * cnode type code
- */
-/***********************************************************************
- * code_end : end a code cnode
- *
- * Enter: cnode struct
- */
-static void
-code_end(struct cnode *cnode)
-{
- if (incode) {
- /* The incode flag has not been cleared, so this code cnode is
- * being ended implicitly. We complain about that. */
- locerrorexit(cnode->filename, cnode->linenum, "mismatched \\code");
- }
-}
-
-/***********************************************************************
- * code_output : output code cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-code_output(struct cnode *cnode, unsigned int indent)
-{
- /* Note capitalization to differentiate it from HTML code element. */
- if(cnode->attrtext)
- printf("%*s<Code %s>", indent, "", cnode->attrtext);
- else
- printf("%*s<Code>", indent, "");
- outputchildren(cnode, indent, 1);
- printf("</Code>\n");
-}
-
-static const struct cnodefuncs code_funcs = {
- 0, /* indesc */
- 0, /* !needpara */
- &default_askend,
- &code_end, /* end */
- &code_output,
-};
-
-/***********************************************************************
- * startpara : start a new para cnode in the parse tree
- *
- * Enter: cnode = current cnode
- * type = vtable for particular type of cnode
- *
- * Return: new current cnode
- */
-static struct cnode *
-startpara(struct cnode *cnode, const struct cnodefuncs *type)
-{
- struct cnode *newcnode;
- while ((*cnode->funcs->askend)(cnode, type))
- cnode = endcnode(cnode);
- newcnode = memalloc(sizeof(struct cnode));
- newcnode->funcs = type;
- return startcnode(cnode, newcnode);
-}
-
-/***********************************************************************
- * cnode type text
- */
-struct textcnode {
- struct cnode cn;
- unsigned char *data;
- unsigned int len;
- unsigned int max;
-};
-
-/***********************************************************************
- * text_end : end a text cnode
- *
- * Enter: cnode struct
- */
-static void
-text_end(struct cnode *cnode)
-{
- struct textcnode *textcnode = (void *)cnode;
- textcnode->data[textcnode->len] = 0;
- textcnode->max = textcnode->len + 1;
- textcnode->data = memrealloc(textcnode->data, textcnode->max);
-}
-
-/***********************************************************************
- * text_output : output text cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-text_output(struct cnode *cnode, unsigned int indent)
-{
- /* We do not indent, in case this is inside a code cnode. */
- struct textcnode *textcnode = (void *)cnode;
- unsigned int len = textcnode->len;
- unsigned const char *p = textcnode->data;
- while (len) {
- unsigned int thislen;
- const char *thisptr;
- thislen = p[0];
- /* (void *) cast is to avoid a warning from the MS compiler.
- * I think the warning is wrong, but I could be wrong. */
- memcpy((void *)&thisptr, p + 1, sizeof(void *));
- p += 1 + sizeof(void *);
- len -= 1 + sizeof(void *);
- printtext(thisptr, thislen, 0);
- }
-}
-
-static const struct cnodefuncs text_funcs = {
- 1, /* !indesc */
- 0, /* !needpara */
- &default_askend,
- &text_end, /* end */
- &text_output,
-};
-
-/***********************************************************************
- * cnode type html (HTML element)
- */
-struct htmlcnode {
- struct cnode cn;
- const struct htmleldesc *desc;
- char attrs[1];
-};
-
-/***********************************************************************
- * html_end : end an html cnode
- *
- * Enter: cnode struct
- */
-static void
-html_end(struct cnode *cnode)
-{
- if (((struct htmlcnode *)cnode)->desc->flags & HTMLEL_BLOCK)
- inhtmlblock--;
-}
-
-/***********************************************************************
- * html_output : output html cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-html_output(struct cnode *cnode, unsigned int indent)
-{
- struct htmlcnode *htmlcnode = (void *)cnode;
- if (!(htmlcnode->desc->flags & HTMLEL_INLINE))
- printf("%*s", indent, "");
- if (htmlcnode->cn.children) {
- printf("<%s%s>", htmlcnode->desc->name, htmlcnode->attrs);
- if (!(htmlcnode->desc->flags & HTMLEL_INLINE))
- putchar('\n');
- outputchildren(&htmlcnode->cn, indent, 1);
- if (!(htmlcnode->desc->flags & HTMLEL_INLINE))
- printf("%*s", indent, "");
- printf("</%s>", htmlcnode->desc->name);
- } else
- printf("<%s%s/>", htmlcnode->desc->name, htmlcnode->attrs);
- if (!(htmlcnode->desc->flags & HTMLEL_INLINE))
- putchar('\n');
-}
-
-static const struct cnodefuncs html_funcs = {
- 1, /* indesc */
- 0, /* !needpara */
- &default_askend,
- &html_end, /* end */
- &html_output,
-};
-
-/***********************************************************************
- * starthtmlcnode : start a new html cnode
- *
- * Enter: cnode = current cnode
- * htmleldesc = html element descriptor
- * attrs = attributes text
- * attrslen = length of attributes text
- * filename
- * linenum = line number
- *
- * Return: new current cnode
- */
-static struct cnode *
-starthtmlcnode(struct cnode *cnode, const struct htmleldesc *htmleldesc,
- const char *attrs, unsigned int attrslen,
- const char *filename, unsigned int linenum)
-{
- struct htmlcnode *htmlcnode;
- /* First close enough elements to get to a content
- * model that will accept this new element. */
- for (;;) {
- if (cnode->funcs != &html_funcs) {
- /* Not in any html element. We can accept any block element
- * (in which case we need to close the current paragraph
- * first) or any inline element (in which case we need to
- * close the current text cnode first). */
- if (!(htmleldesc->flags & HTMLEL_INLINE)) {
- if (!(htmleldesc->flags & HTMLEL_BLOCK))
- locerrorexit(filename, linenum, "<%s> not valid here", htmleldesc->name);
- while ((*cnode->funcs->askend)(cnode, 0))
- cnode = endcnode(cnode);
- } else {
- while (cnode->funcs == &text_funcs)
- cnode = endcnode(cnode);
- }
- break;
- }
- htmlcnode = (struct htmlcnode *)cnode;
- if (!(htmleldesc->flags & htmlcnode->desc->content))
- locerrorexit(filename, linenum, "<%s> not valid here", htmleldesc->name);
- break;
- }
- if (htmleldesc->flags & HTMLEL_BLOCK)
- inhtmlblock++;
- /* Create the new html cnode. */
- htmlcnode = memalloc(sizeof(struct htmlcnode) + attrslen);
- htmlcnode->desc = htmleldesc;
- htmlcnode->cn.funcs = &html_funcs;
- htmlcnode->cn.filename = filename;
- htmlcnode->cn.linenum = linenum;
- memcpy(htmlcnode->attrs, attrs, attrslen);
- htmlcnode->attrs[attrslen] = 0;
- /* Start the html cnode. */
- cnode = startcnode(cnode, &htmlcnode->cn);
- return cnode;
-}
-
-/***********************************************************************
- * param_output : output param cnode
- *
- * Enter: cnode for param
- * indent = indent (nesting) level
- *
- * This is only used for a \param inside a \def-device-cap. A normal
- * \param that gets attached to a function argument gets changed to
- * a \return so it does not use this output function.
- */
-static void
-param_output(struct cnode *cnode, unsigned int indent)
-{
- struct paramcnode *paramcnode = (void *)cnode;
- printf("%*s<param identifier=\"%s\">\n", indent, "", paramcnode->name);
- outputchildren(&paramcnode->cn, indent, 1);
- printf("%*s</param>\n", indent, "");
-}
-
-/***********************************************************************
- * cnode type param
- */
-static const struct cnodefuncs param_funcs = {
- 0, /* !indesc */
- 0, /* !needpara */
- &default_askend,
- 0, /* end */
- &param_output,
-};
-
-/***********************************************************************
- * cnode type throw
- */
-static const struct cnodefuncs throw_funcs = {
- 0, /* !indesc */
- 0, /* !needpara */
- &default_askend,
- 0, /* end */
- &return_output,
-};
-
-/***********************************************************************
- * startparamcnode : start param (or throw) cnode
- *
- * Enter: cnode = current cnode
- * word = name of param
- * wordlen = length of name
- * inout = bit 0 = in, bit 1 = out
- * type = &param_funcs or &throw_funcs
- *
- * Return: new current cnode
- */
-static struct cnode *
-startparamcnode(struct cnode *cnode, const char *word, unsigned int wordlen,
- int inout, const struct cnodefuncs *funcs)
-{
- struct paramcnode *paramcnode;
- paramcnode = memalloc(sizeof(struct paramcnode) + wordlen);
- paramcnode->cn.funcs = funcs;
- memcpy(paramcnode->name, word, wordlen);
- paramcnode->name[wordlen] = 0;
- paramcnode->inout = inout;
- return startcnode(cnode, &paramcnode->cn);
-}
-
-/***********************************************************************
- * api_feature_output : output api-feature cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-api_feature_output(struct cnode *cnode, unsigned int indent)
-{
- struct paramcnode *paramcnode = (void *)cnode;
- printf("%*s<api-feature identifier=\"%s\">\n", indent, "", paramcnode->name);
- outputchildren(cnode, indent, 1);
- printf("%*s</api-feature>\n", indent, "");
-}
-
-/***********************************************************************
- * cnode type api_feature
- */
-static const struct cnodefuncs api_feature_funcs = {
- 0, /* !indesc */
- 0, /* needpara */
- &default_askend,
- 0, /* end */
- &api_feature_output,
-};
-
-/***********************************************************************
- * device_cap_output : output device-cap cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-device_cap_output(struct cnode *cnode, unsigned int indent)
-{
- struct paramcnode *paramcnode = (void *)cnode;
- printf("%*s<device-cap identifier=\"%s\">\n", indent, "", paramcnode->name);
- outputchildren(cnode, indent, 1);
- printf("%*s</device-cap>\n", indent, "");
-}
-
-/***********************************************************************
- * cnode type device_cap
- */
-static const struct cnodefuncs device_cap_funcs = {
- 0, /* !indesc */
- 0, /* needpara */
- &default_askend,
- 0, /* end */
- &device_cap_output,
-};
-
-/***********************************************************************
- * def_api_feature_askend : ask if def-api-feature cnode wants to end at new para
- *
- * Enter: cnode for def-api-feature
- * type = cnodefuncs for new para (0 if html block element)
- *
- * Return: non-zero to end the def-api-feature
- */
-static int
-def_api_feature_askend(struct cnode *cnode, const struct cnodefuncs *type)
-{
- /* A def-api-feature does not end at a plain para, an html block element,
- * a brief para, or a device-cap. */
- if (!type || type == &para_funcs || type == &device_cap_funcs || type == &brief_funcs)
- return 0;
- return 1;
-}
-
-/***********************************************************************
- * def_api_feature_output : output def-api-feature cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-def_api_feature_output(struct cnode *cnode, unsigned int indent)
-{
- struct paramcnode *paramcnode = (void *)cnode;
- printf("%*s<def-api-feature identifier=\"%s\">\n", indent, "", paramcnode->name);
- printf("%*s<descriptive>\n", indent + 2, "");
- outputchildren(cnode, indent + 2, 0);
- printf("%*s</descriptive>\n", indent + 2, "");
- printf("%*s</def-api-feature>\n", indent, "");
-}
-
-/***********************************************************************
- * cnode type def_api_feature
- */
-static const struct cnodefuncs def_api_feature_funcs = {
- 0, /* !indesc */
- 1, /* needpara */
- &def_api_feature_askend,
- 0, /* end */
- &def_api_feature_output,
-};
-
-/***********************************************************************
- * def_api_feature_set_askend : ask if def-api-feature-set cnode wants to end at new para
- *
- * Enter: cnode for def-api-feature-set
- * type = cnodefuncs for new para (0 if html block element)
- *
- * Return: non-zero to end the def-api-feature-set
- */
-static int
-def_api_feature_set_askend(struct cnode *cnode, const struct cnodefuncs *type)
-{
- /* A def-api-feature-set does not end at a plain para, an html block element,
- * a brief para, or an api-feature. */
- if (!type || type == &para_funcs || type == &api_feature_funcs || type == &brief_funcs)
- return 0;
- return 1;
-}
-
-/***********************************************************************
- * def_api_feature_set_output : output def-api-feature-set cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-def_api_feature_set_output(struct cnode *cnode, unsigned int indent)
-{
- struct paramcnode *paramcnode = (void *)cnode;
- printf("%*s<def-api-feature-set identifier=\"%s\">\n", indent, "", paramcnode->name);
- printf("%*s<descriptive>\n", indent + 2, "");
- outputchildren(cnode, indent + 2, 0);
- printf("%*s</descriptive>\n", indent + 2, "");
- printf("%*s</def-api-feature-set>\n", indent, "");
-}
-
-/***********************************************************************
- * cnode type def_api_feature_set
- */
-static const struct cnodefuncs def_api_feature_set_funcs = {
- 0, /* !indesc */
- 1, /* needpara */
- &def_api_feature_set_askend,
- 0, /* end */
- &def_api_feature_set_output,
-};
-
-/***********************************************************************
- * def_instantiated_askend : ask if def-instantiated cnode wants to end at new para
- *
- * Enter: cnode for def-instantiated
- * type = cnodefuncs for new para (0 if html block element)
- *
- * Return: non-zero to end the def-instantiated
- */
-static int
-def_instantiated_askend(struct cnode *cnode, const struct cnodefuncs *type)
-{
- /* A def-instantiated does not end at a plain para, an html block element,
- * a brief para, or an api-feature. */
- if (!type || type == &para_funcs || type == &api_feature_funcs || type == &brief_funcs)
- return 0;
- return 1;
-}
-
-/***********************************************************************
- * def_instantiated_output : output def-instantiated cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-def_instantiated_output(struct cnode *cnode, unsigned int indent)
-{
- printf("%*s<def-instantiated>\n", indent, "");
- printf("%*s<descriptive>\n", indent + 2, "");
- outputchildren(cnode, indent + 2, 0);
- printf("%*s</descriptive>\n", indent + 2, "");
- printf("%*s</def-instantiated>\n", indent, "");
-}
-
-/***********************************************************************
- * cnode type def_instantiated
- */
-static const struct cnodefuncs def_instantiated_funcs = {
- 0, /* !indesc */
- 1, /* needpara */
- &def_instantiated_askend,
- 0, /* end */
- &def_instantiated_output,
-};
-
-/***********************************************************************
- * def_device_cap_askend : ask if def-device-cap cnode wants to end at new para
- *
- * Enter: cnode for def-device-cap
- * type = cnodefuncs for new para (0 if html block element)
- *
- * Return: non-zero to end the def-device-cap
- */
-static int
-def_device_cap_askend(struct cnode *cnode, const struct cnodefuncs *type)
-{
- /* A def-device-cap does not end at a plain para, an html block element,
- * a \brief para, or a param. */
- if (!type || type == &para_funcs || type == &param_funcs || type == &brief_funcs)
- return 0;
- return 1;
-}
-
-/***********************************************************************
- * def_device_cap_output : output def_device-cap cnode
- *
- * Enter: cnode for root
- * indent = indent (nesting) level
- */
-static void
-def_device_cap_output(struct cnode *cnode, unsigned int indent)
-{
- struct paramcnode *paramcnode = (void *)cnode;
- printf("%*s<def-device-cap identifier=\"%s\">\n", indent, "", paramcnode->name);
- printf("%*s<descriptive>\n", indent + 2, "");
- outputchildren(cnode, indent + 2, 0);
- printf("%*s</descriptive>\n", indent + 2, "");
- printf("%*s</def-device-cap>\n", indent, "");
-}
-
-/***********************************************************************
- * cnode type def_device_cap
- */
-static const struct cnodefuncs def_device_cap_funcs = {
- 0, /* !indesc */
- 1, /* needpara */
- &def_device_cap_askend,
- 0, /* end */
- &def_device_cap_output,
-};
-
-/***********************************************************************
- * addtext : add text to current text node, starting one if necessary
- *
- * Enter: cnode = current cnode
- * text
- * len = length of text
- *
- * Return: new current cnode
- */
-static struct cnode *
-addtext(struct cnode *cnode, const char *text, unsigned int len)
-{
- struct textcnode *textcnode;
- if (!len)
- return cnode;
- if (cnode->funcs != &text_funcs) {
- /* Start new text cnode. */
- textcnode = memalloc(sizeof(struct textcnode));
- textcnode->cn.funcs = &text_funcs;
- cnode = startcnode(cnode, &textcnode->cn);
- }
- textcnode = (void *)cnode;
- do {
- unsigned char buf[1 + sizeof(void *)];
- unsigned int thislen = len;
- if (thislen > 255)
- thislen = 255;
- /* Encode a record as a single byte length followed by a pointer. */
- buf[0] = thislen;
- memcpy(buf + 1, &text, sizeof(void *));
- /* Add to the text cnode's data. */
- if (textcnode->len + sizeof(buf) >= textcnode->max) {
- /* Need to reallocate (or allocate) data buffer. */
- textcnode->max = textcnode->max ? 2 * textcnode->max : 1024;
- textcnode->data = memrealloc(textcnode->data, textcnode->max);
- }
- memcpy(textcnode->data + textcnode->len, buf, sizeof(buf));
- textcnode->len += sizeof(buf);
- text += thislen;
- len -= thislen;
- } while (len);
- return &textcnode->cn;
-}
-
-/***********************************************************************
- * iswhitespace : determine if character is whitespace
- *
- * Enter: ch = character
- *
- * Return: 1 if whitespace
- */
-static inline int
-iswhitespace(int ch)
-{
- unsigned int i = ch - 1;
- if (i >= 32)
- return 0;
- return 0x80001100 >> i & 1;
-}
-
-/***********************************************************************
- * parseword : parse the next word, ignoring leading whitespace
- *
- * Enter: *pp = text pointer
- *
- * Return: 0 else start of word (*pp updated to just beyond end)
- */
-static const char *
-parseword(const char **pp)
-{
- const char *p = *pp, *word = 0;
- int ch = *p;
- while (iswhitespace(ch))
- ch = *++p;
- word = p;
- while ((unsigned)((ch & ~0x20) - 'A') <= 'Z' - 'A'
- || (unsigned)(ch - '0') < 10 || ch == '_' || ch == '.'
- || ch == ':' || ch == '/' || ch == '-')
- {
- ch = *++p;
- }
- if (p == word)
- return 0;
- *pp = p;
- return word;
-}
-
-/***********************************************************************
- * Doxygen command handlers
- *
- * Enter: p = text just after command
- * *pcnode = pointer to current cnode struct
- * type = 0 else cnodefuncs pointer for type of node to start
- * filename, linenum = current filename and line number (for error reporting)
- *
- * Return: p = updated if extra text was eaten
- *
- * On return, *pnode is updated if any node was closed or opened.
- */
-
-/***********************************************************************
- * Doxygen command handler : \b
- */
-static const char *
-dox_b(const char *p, struct cnode **pcnode, const struct cnodefuncs *type,
- const char *filename, unsigned int linenum, const char *cmdname)
-{
- struct cnode *cnode = *pcnode;
- const char *word = parseword(&p);
- /* Silently ignore \b with no following word. */
- if (word) {
- struct cnode *mycnode;
- mycnode = cnode = starthtmlcnode(cnode, HTMLELDESC_B, 0, 0, filename, linenum);
- cnode = addtext(cnode, word, p - word);
- while (cnode != mycnode)
- cnode = endcnode(cnode);
- cnode = endcnode(cnode);
- }
- *pcnode = cnode;
- return p;
-}
-
-/***********************************************************************
- * Doxygen command handler : \n
- */
-static const char *
-dox_n(const char *p, struct cnode **pcnode, const struct cnodefuncs *type,
- const char *filename, unsigned int linenum, const char *cmdname)
-{
- struct cnode *cnode = *pcnode;
- cnode = starthtmlcnode(cnode, HTMLELDESC_BR, 0, 0, filename, linenum);
- cnode = endcnode(cnode);
- *pcnode = cnode;
- return p;
-}
-
-/***********************************************************************
- * Doxygen command handler : \code
- */
-static const char *
-dox_code(const char *p, struct cnode **pcnode, const struct cnodefuncs *type,
- const char *filename, unsigned int linenum, const char *cmdname)
-{
- *pcnode = startpara(*pcnode, &code_funcs);
- (*pcnode)->filename = filename;
- (*pcnode)->linenum = linenum; /* for reporting mismatched \code error */
- incode = 1;
- return p;
-}
-
-/***********************************************************************
- * Doxygen command handler : \endcode
- */
-static const char *
-dox_endcode(const char *p, struct cnode **pcnode, const struct cnodefuncs *type,
- const char *filename, unsigned int linenum, const char *cmdname)
-{
- incode = 0;
- *pcnode = endspecificcnode(*pcnode, &code_funcs, filename, linenum);
- return p;
-}
-
-/***********************************************************************
- * Doxygen command handler : \param
- */
-static const char *
-dox_param(const char *p, struct cnode **pcnode, const struct cnodefuncs *type,
- const char *filename, unsigned int linenum, const char *cmdname)
-{
- struct cnode *cnode = *pcnode;
- unsigned int inout = 0;
- const char *word;
- /* Check for "in", "out" or both as attributes. */
- if (*p == '[') {
- for (;;) {
- p++;
- if (!memcmp(p, "in", 2)) {
- inout |= 1;
- p += 2;
- } else if (!memcmp(p, "out", 3)) {
- inout |= 2;
- p += 3;
- } else
- break;
- if (*p != ',')
- break;
- }
- if (*p != ']')
- locerrorexit(filename, linenum, "bad attributes on \\param");
- p++;
- }
- /* Get the next word as the parameter name. */
- word = parseword(&p);
- if (!word)
- locerrorexit(filename, linenum, "expected word after \\param");
- /* Close any open nodes. */
- while ((*cnode->funcs->askend)(cnode, type))
- cnode = endcnode(cnode);
- /* Create a new param cnode. */
- cnode = startparamcnode(cnode, word, p - word, inout, type);
- cnode->filename = filename;
- cnode->linenum = linenum;
- *pcnode = cnode;
- return p;
-}
-
-/***********************************************************************
- * Doxygen command handler : \brief, \return
- */
-static const char *
-dox_para(const char *p, struct cnode **pcnode, const struct cnodefuncs *type,
- const char *filename, unsigned int linenum, const char *cmdname)
-{
- *pcnode = startpara(*pcnode, type);
- return p;
-}
-
-/***********************************************************************
- * Doxygen command handler : \throw
- */
-static const char *
-dox_throw(const char *p, struct cnode **pcnode, const struct cnodefuncs *type,
- const char *filename, unsigned int linenum, const char *cmdname)
-{
- struct cnode *cnode = *pcnode;
- const char *word;
- /* Get the next word as the exception name. */
- word = parseword(&p);
- if (!word)
- locerrorexit(filename, linenum, "expected word after \\throw");
- /* Close any open nodes. */
- while ((*cnode->funcs->askend)(cnode, type))
- cnode = endcnode(cnode);
- /* Create a new throw cnode. */
- cnode = startparamcnode(cnode, word, p - word, 0, type);
- cnode->filename = filename;
- cnode->linenum = linenum;
- *pcnode = cnode;
- return p;
-}
-
-/***********************************************************************
- * Doxygen command handler : \lang
- */
-static const char *
-dox_attr(const char *p, struct cnode **pcnode, const struct cnodefuncs *type,
- const char *filename, unsigned int linenum, const char *cmdname)
-{
- struct cnode *cnode = *pcnode;
- const char *word;
- int len, wordlen, offset = 0;
- char *attrtext;
- /* Get the next word as the attribute value. */
- word = parseword(&p);
- if (!word)
- locerrorexit(filename, linenum, "expected word after \\%s", cmdname);
-
- len = strlen(cmdname) + (wordlen = p-word) + 4; /* p="word"\0 */
- if(cnode->attrtext)
- len += (offset = strlen(cnode->attrtext)) + 1; /* add space for space */
- attrtext = memalloc(len);
- if(offset) {
- memcpy(attrtext, cnode->attrtext, offset);
- attrtext[offset++] = ' ';
- memfree(((void*)cnode->attrtext));
- }
- offset += sprintf(&attrtext[offset], "%s=\"", cmdname);
- memcpy(&attrtext[offset], word, wordlen);
- strcpy(&attrtext[offset + wordlen], "\"");
- cnode->attrtext = attrtext;
- /* skip delimiter because it won't be done otherwise */
- if(incode && iswhitespace(*p)) ++p;
- return p;
-}
-
-/***********************************************************************
- * commands : table of Doxygen commands
- */
-struct command {
- const char *(*func)(const char *p, struct cnode **pcnode, const struct cnodefuncs *type, const char *filename, unsigned int linenum, const char *cmdname);
- const struct cnodefuncs *type;
- unsigned int namelen;
- const char *name;
-};
-static const struct command commands[] = {
- { &dox_throw, &def_api_feature_funcs, 15, "def-api-feature" },
- { &dox_throw, &def_api_feature_set_funcs, 19, "def-api-feature-set" },
- { &dox_para, &def_instantiated_funcs, 16, "def-instantiated" },
- { &dox_para, &name_funcs, 4, "name" },
- { &dox_para, &author_funcs, 6, "author" },
- { &dox_b, 0, 1, "b" },
- { &dox_para, &brief_funcs, 5, "brief" },
- { &dox_code, 0, 4, "code" },
- { &dox_throw, &def_device_cap_funcs, 14, "def-device-cap" },
- { &dox_attr, 0, 4, "lang" },
- { &dox_endcode, 0, 7, "endcode" },
- { &dox_n, 0, 1, "n" },
- { &dox_param, &param_funcs, 5, "param" },
- { &dox_para, &return_funcs, 6, "return" },
- { &dox_throw, &throw_funcs, 5, "throw" },
- { &dox_throw, &api_feature_funcs, 11, "api-feature" },
- { &dox_throw, &device_cap_funcs, 10, "device-cap" },
- { &dox_para, &version_funcs, 7, "version" },
- { 0, 0, 0 }
-};
-
-/***********************************************************************
- * parsehtmltag : parse html tag
- *
- * Enter: start = start of tag, the '<' char
- * *pcnode = current cnode
- * filename = filename
- * *plinenum = current line number
- *
- * Return: just after the tag
- * *pcnode and *plinenum updated if applicable
- */
-static const char *
-parsehtmltag(const char *start, struct cnode **pcnode,
- const char *filename, unsigned int *plinenum)
-{
- struct cnode *cnode = *pcnode;
- const char *end = start + 1, *endname = 0, *name = end;
- int ch = *end;
- int quote = 0;
- int close = 0;
- unsigned int linenum = *plinenum;
- const struct htmleldesc *htmleldesc;
- if (ch == '/') {
- close = 1;
- ch = *++end;
- name = end;
- }
- /* Find the end of the tag. */
- for (;;) {
- if (!ch)
- locerrorexit(filename, *plinenum, "unterminated HTML tag");
- if (ch == '\n')
- linenum++;
- else if (iswhitespace(ch) || ch == '/') {
- if (!endname)
- endname = end;
- } else if (!quote) {
- if (ch == '"' || ch == '\'')
- quote = ch;
- else if (ch == '>')
- break;
- } else {
- if (ch == quote)
- quote = 0;
- }
- ch = *++end;
- }
- if (!endname)
- endname = end;
- end++;
- /* See if it's an xml open-close tag. */
- if (!close && endname != name && end[-2] == '/')
- close = 2;
- /* Find the tag from our list. */
- htmleldesc = htmleldescs;
- for (;;) {
- if (!htmleldesc->namelen) {
- locerrorexit(filename, *plinenum, "unrecognized HTML tag %.*s",
- end - start, start);
- }
- if (htmleldesc->namelen == endname - name
- && !strncasecmp(htmleldesc->name, name, endname - name))
- {
- break;
- }
- htmleldesc++;
- }
- if (close == 1) {
- /* Closing tag. Find open element to close. */
- for (;;) {
- struct htmlcnode *htmlcnode;
- if (cnode->funcs != &text_funcs) {
- if (cnode->funcs != &html_funcs) {
- locerrorexit(filename, *plinenum, "mismatched %.*s",
- end - start, start);
- }
- htmlcnode = (struct htmlcnode *)cnode;
- if (htmlcnode->desc == htmleldesc)
- break;
- if (!(htmlcnode->desc->flags & HTMLEL_AUTOCLOSE)) {
- locerrorexit(filename, htmlcnode->cn.linenum,
- "mismatched <%.*s>",
- htmlcnode->desc->namelen, htmlcnode->desc->name);
- }
- }
- cnode = endcnode(cnode);
- }
- cnode = endcnode(cnode);
- } else {
- /* Opening tag. */
- if (close !=2)
- cnode = starthtmlcnode(cnode, htmleldesc, endname, end - 1 - endname, filename, *plinenum);
- else // don't include the closing "/" in the attributes list
- cnode = starthtmlcnode(cnode, htmleldesc, endname, end - 2 - endname, filename, *plinenum);
- if (close == 2 || (htmleldesc->content & HTMLEL_EMPTY)) {
- /* Empty element -- close it again. */
- cnode = endcnode(cnode);
- }
- }
- *pcnode = cnode;
- *plinenum = linenum;
- return end;
-}
-
-/***********************************************************************
- * parsecomment : parse one comment
- *
- * Enter: comment struct
- */
-static void
-parsecomment(struct comment *comment)
-{
- struct cnode *cnode = &comment->root;
- const char *p = comment->text + comment->back;
- unsigned int linenum = comment->linenum - 1;
- int ch;
- curcomment = comment;
- incode = 0;
- inhtmlblock = 0;
- cnode->funcs = &root_funcs;
- for (;;) {
- /* Start of new line. */
- const char *starttext;
- ch = *p;
- linenum++;
- {
- /* Find first non-whitespace character. */
- const char *p2 = p;
- int ch2 = ch;
- while (iswhitespace(ch2))
- ch2 = *++p2;
- if (comment->type == TOK_BLOCKCOMMENT && ch2 == '*') {
- /* Ignore initial * in block comment (even in \code block). */
- ch2 = *++p2;
- ch = ch2;
- p = p2;
- if (ch == '*')
- goto checkforlineofstars;
- while (iswhitespace(ch2))
- ch2 = *++p2;
- }
- if (comment->type == TOK_INLINECOMMENT && ch2 == '/') {
-checkforlineofstars:
- if (!incode) {
- /* Ignore whole line of * for block comment or / for inline
- * comment if that is the only thing on the line. */
- const char *p3 = p2;
- int ch3;
- do ch3 = *++p3; while (ch3 == ch2);
- while (iswhitespace(ch3)) ch3 = *++p3;
- if (!ch3 || ch3 == '\n') {
- /* Reached end of line (or whole comment) -- treat as
- * empty line. */
- ch2 = ch3;
- p2 = p3;
- }
- }
- }
- if (!incode) {
- /* Only allow whitespace omission above to take effect if
- * not in \code block. */
- ch = ch2;
- p = p2;
- }
- }
- if (!ch) {
- /* End of comments -- finish. */
- break;
- }
- if (!incode && !inhtmlblock && ch == '\n') {
- /* Blank line -- finish any para, but only if not in code and
- * not in any HTML block element. */
- while ((*cnode->funcs->askend)(cnode, 0))
- cnode = endcnode(cnode);
- p++;
- continue;
- }
- /* Start new para if there isn't already one going. */
- if (cnode->funcs->needpara)
- cnode = startpara(cnode, &para_funcs);
- /* Process text on the line. */
- starttext = p;
- while (ch && ch != '\n') {
- if (ch != '\\' && ch != '<' /* && ch != '@' */ && ch != '$'
- && ch != '&' && ch != '\r')
- {
- ch = *++p;
- continue;
- }
- /* Output any pending text. */
- if (p - starttext)
- cnode = addtext(cnode, starttext, p - starttext);
- /* Ignore \r in DOS line returns */
- if (ch == '\r') {
- ch = *++p;
- starttext = p;
- continue;
- }
- if (ch == '$')
- locerrorexit(comment->filename, linenum, "use \\$ instead of $");
- /* See if it is an html named entity. */
- if (ch == '&' && p[1] != '#') {
- const char *entity = ENTITIES;
- /* This search could be faster if the entity names were put
- * in a hash table or something. */
- const char *semicolon = strchr(p, ';');
- unsigned int len;
- if (!semicolon)
- locerrorexit(comment->filename, linenum, "unterminated HTML entity");
- p++;
- for (;;) {
- len = strlen(entity);
- if (!len)
- locerrorexit(comment->filename, linenum, "unrecognised HTML entity &%.*s;", semicolon - p, p);
- if (len == semicolon - p && !memcmp(p, entity, len))
- break;
- entity += len + 1;
- entity += strlen(entity) + 1;
- }
- entity += len + 1;
- cnode = addtext(cnode, entity, strlen(entity));
- p = semicolon + 1;
- ch = *p;
- starttext = p;
- continue;
- }
- /* See if it is a backslash escape sequence. */
- else if (ch == '\\') {
- const char *match = "\\@&$#<>%";
- const char *pos;
- ch = p[1];
- pos = strchr(match, ch);
- if (pos) {
- /* Got a \ escape sequence. */
- const char *text =
- "\\\0 @\0 &amp;\0$\0 #\0 &lt;\0 >\0 %"
- + 6 * (pos - match);
- cnode = addtext(cnode, text, strlen(text));
- p += 2;
- ch = *p;
- starttext = p;
- continue;
- }
- } else if (ch == '<') {
- if (incode) {
- ch = *++p;
- starttext = p;
- continue;
- }
- /* It's an html tag. */
- p = parsehtmltag(p, &cnode, comment->filename, &linenum);
- ch = *p;
- starttext = p;
- continue;
- }
- {
- /* Got a doxygen command. First work out its length. */
- const char *start = ++p;
- unsigned int cmdlen;
- const struct command *command;
- ch = *p;
- while ((unsigned)((ch & ~0x20) - 'A') <= 'Z' - 'A'
- || (unsigned)(ch - '0') < 10 || ch == '_' || ch == '-')
- {
- ch = *++p;
- }
- cmdlen = p - start;
- if (!cmdlen)
- locerrorexit(comment->filename, linenum, "\\ or @ without Doxygen command");
- /* Look it up in the table. */
- command = commands;
- for (;;) {
- if (!command->namelen) {
- locerrorexit(comment->filename, linenum, "unrecognized Doxygen command '%.*s'",
- cmdlen + 1, start - 1);
- }
- if (command->namelen == cmdlen
- && !memcmp(command->name, start, cmdlen))
- {
- break;
- }
- command++;
- }
- p = (*command->func)(p, &cnode, command->type,
- comment->filename, linenum, command->name);
- ch = *p;
- starttext = p;
- }
- }
- if (p - starttext) {
- /* Start new para if there isn't already one going. */
- if (cnode->funcs->needpara)
- cnode = startpara(cnode, &para_funcs);
- cnode = addtext(cnode, starttext, p - starttext);
- }
- if (!ch)
- break;
- if (cnode->funcs == &text_funcs)
- addtext(cnode, "\n", 1);
- p++;
- }
- /* Finish the root cnode. */
- do
- cnode = endcnode(cnode);
- while (cnode);
- assert(!incode);
- assert(!inhtmlblock);
-}
-
-/***********************************************************************
- * parsecomments : parse comments
- *
- * Enter: comment = first comment in list
- */
-static void
-parsecomments(struct comment *comment)
-{
- while (comment) {
- parsecomment(comment);
- comment = comment->next;
- }
-}
-
-/***********************************************************************
- * attachcommenttonode : attach comment struct to node
- *
- * Enter: node = parse node for identifier
- * comment = comment struct
- */
-static void
-attachcommenttonode(struct node *node, struct comment *comment)
-{
- comment->next = node->comments;
- node->comments = comment;
-}
-
-/***********************************************************************
- * attachcomments : attach comments to applicable parse nodes
- *
- * Enter: comment = first in (reversed) list of comment structs
- * root = root parse node (for attaching \file comment blocks to)
- */
-static void
-attachcomments(struct comment *comment, struct node *root)
-{
- while (comment) {
- struct comment *next = comment->next;
- /* See if there are any \param, \return, \throw, \def-api-feature or
- * \def-device-cap cnodes to detach and attach
- * elsewhere. (This only looks at top-level nodes, direct children
- * of the root, so does not detach a \param inside a
- * \def-device-cap.) */
- struct cnode **pcnode = &comment->root.children;
- for (;;) {
- struct cnode *cnode = *pcnode;
- if (!cnode)
- break;
- if (cnode->funcs == &param_funcs || cnode->funcs == &return_funcs
- || cnode->funcs == &throw_funcs)
- {
- /* Found a \param or \return or \throw to detach. Find the
- * parameter/exception of the same name, or the return type. */
- struct node *node;
- struct comment *newcomment;
- if (cnode->funcs == &param_funcs) {
- node = findparamidentifier(comment->node,
- ((struct paramcnode *)cnode)->name);
- if (!node)
- locerrorexit(comment->filename, cnode->linenum, "no parameter '%s' found", ((struct paramcnode *)cnode)->name);
- } else if (cnode->funcs == &return_funcs) {
- node = findreturntype(comment->node);
- if (!node)
- locerrorexit(comment->filename, cnode->linenum, "no return type found");
- } else {
- node = findthrowidentifier(comment->node,
- ((struct paramcnode *)cnode)->name);
- if (!node)
- locerrorexit(comment->filename, cnode->linenum, "no exception '%s' found", ((struct paramcnode *)cnode)->name);
- }
- /* Detach the cnode from its old comment. */
- *pcnode = cnode->next;
- /* Create a new comment struct to contain this cnode. */
- newcomment = memalloc(sizeof(struct comment));
- newcomment->root.funcs = &root_funcs;
- newcomment->linenum = cnode->linenum;
- /* Attach the cnode. */
- newcomment->root.children = cnode;
- cnode->parent = &newcomment->root;
- cnode->next = 0;
- /* Make the cnode a \return one, just so even a \param
- * uses return_output. */
- cnode->funcs = &return_funcs;
- /* Attach the new comment struct to the parse node. */
- attachcommenttonode(node, newcomment);
- } else {
- pcnode = &cnode->next;
- }
- }
- /* Now attach the comment to its identifier parse node. */
- {
- struct node *node = comment->node;
- if (!node)
- node = root;
- attachcommenttonode(node, comment);
- }
- comment = next;
- }
-}
-
-/***********************************************************************
- * processcomments : join, parse and attach comments
- *
- * Enter: root = root parse node
- */
-void
-processcomments(struct node *root)
-{
- comments = joininlinecomments(comments);
- parsecomments(comments);
- attachcomments(comments, root);
-}
-
-/***********************************************************************
- * outputdescriptive : output descriptive elements for a node
- *
- * Enter: node = identifier node that might have some comments
- * indent = indent (nesting) level
- */
-void
-outputdescriptive(struct node *node, unsigned int indent)
-{
- struct comment *comment = node->comments;
- int indescriptive = 0;
- while (comment) {
- struct cnode *root = &comment->root;
- if (!indescriptive)
- printf("%*s<descriptive>\n", indent, "");
- indescriptive = 1;
- (*root->funcs->output)(root, indent + 2);
- comment = comment->next;
- }
- if (indescriptive)
- printf("%*s</descriptive>\n", indent, "");
-}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/comment.h b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/comment.h
deleted file mode 100644
index 96d18e2cc8a..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/comment.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#ifndef comment_h
-#define comment_h
-
-struct tok;
-struct node;
-
-void addcomment(struct tok *tok);
-void setcommentnode(struct node *node2);
-void processcomments(struct node *root);
-void outputdescriptive(struct node *node, unsigned int indent);
-
-#endif /* ndef comment_h */
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/entities.h b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/entities.h
deleted file mode 100644
index ff74c1cb3b2..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/entities.h
+++ /dev/null
@@ -1,271 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#ifndef entities_h
-#define entities_h
-
-#define ENTITIES \
-"nbsp\0&#160;\0" \
-"iexcl\0&#161;\0" \
-"cent\0&#162;\0" \
-"pound\0&#163;\0" \
-"curren\0&#164;\0" \
-"yen\0&#165;\0" \
-"brvbar\0&#166;\0" \
-"sect\0&#167;\0" \
-"uml\0&#168;\0" \
-"copy\0&#169;\0" \
-"ordf\0&#170;\0" \
-"laquo\0&#171;\0" \
-"not\0&#172;\0" \
-"shy\0&#173;\0" \
-"reg\0&#174;\0" \
-"macr\0&#175;\0" \
-"deg\0&#176;\0" \
-"plusmn\0&#177;\0" \
-"sup2\0&#178;\0" \
-"sup3\0&#179;\0" \
-"acute\0&#180;\0" \
-"micro\0&#181;\0" \
-"para\0&#182;\0" \
-"middot\0&#183;\0" \
-"cedil\0&#184;\0" \
-"sup1\0&#185;\0" \
-"ordm\0&#186;\0" \
-"raquo\0&#187;\0" \
-"frac14\0&#188;\0" \
-"frac12\0&#189;\0" \
-"frac34\0&#190;\0" \
-"iquest\0&#191;\0" \
-"Agrave\0&#192;\0" \
-"Aacute\0&#193;\0" \
-"Acirc\0&#194;\0" \
-"Atilde\0&#195;\0" \
-"Auml\0&#196;\0" \
-"Aring\0&#197;\0" \
-"AElig\0&#198;\0" \
-"Ccedil\0&#199;\0" \
-"Egrave\0&#200;\0" \
-"Eacute\0&#201;\0" \
-"Ecirc\0&#202;\0" \
-"Euml\0&#203;\0" \
-"Igrave\0&#204;\0" \
-"Iacute\0&#205;\0" \
-"Icirc\0&#206;\0" \
-"Iuml\0&#207;\0" \
-"ETH\0&#208;\0" \
-"Ntilde\0&#209;\0" \
-"Ograve\0&#210;\0" \
-"Oacute\0&#211;\0" \
-"Ocirc\0&#212;\0" \
-"Otilde\0&#213;\0" \
-"Ouml\0&#214;\0" \
-"times\0&#215;\0" \
-"Oslash\0&#216;\0" \
-"Ugrave\0&#217;\0" \
-"Uacute\0&#218;\0" \
-"Ucirc\0&#219;\0" \
-"Uuml\0&#220;\0" \
-"Yacute\0&#221;\0" \
-"THORN\0&#222;\0" \
-"szlig\0&#223;\0" \
-"agrave\0&#224;\0" \
-"aacute\0&#225;\0" \
-"acirc\0&#226;\0" \
-"atilde\0&#227;\0" \
-"auml\0&#228;\0" \
-"aring\0&#229;\0" \
-"aelig\0&#230;\0" \
-"ccedil\0&#231;\0" \
-"egrave\0&#232;\0" \
-"eacute\0&#233;\0" \
-"ecirc\0&#234;\0" \
-"euml\0&#235;\0" \
-"igrave\0&#236;\0" \
-"iacute\0&#237;\0" \
-"icirc\0&#238;\0" \
-"iuml\0&#239;\0" \
-"eth\0&#240;\0" \
-"ntilde\0&#241;\0" \
-"ograve\0&#242;\0" \
-"oacute\0&#243;\0" \
-"ocirc\0&#244;\0" \
-"otilde\0&#245;\0" \
-"ouml\0&#246;\0" \
-"divide\0&#247;\0" \
-"oslash\0&#248;\0" \
-"ugrave\0&#249;\0" \
-"uacute\0&#250;\0" \
-"ucirc\0&#251;\0" \
-"uuml\0&#252;\0" \
-"yacute\0&#253;\0" \
-"thorn\0&#254;\0" \
-"yuml\0&#255;\0" \
-"fnof\0&#402;\0" \
-"Alpha\0&#913;\0" \
-"Beta\0&#914;\0" \
-"Gamma\0&#915;\0" \
-"Delta\0&#916;\0" \
-"Epsilon\0&#917;\0" \
-"Zeta\0&#918;\0" \
-"Eta\0&#919;\0" \
-"Theta\0&#920;\0" \
-"Iota\0&#921;\0" \
-"Kappa\0&#922;\0" \
-"Lambda\0&#923;\0" \
-"Mu\0&#924;\0" \
-"Nu\0&#925;\0" \
-"Xi\0&#926;\0" \
-"Omicron\0&#927;\0" \
-"Pi\0&#928;\0" \
-"Rho\0&#929;\0" \
-"Sigma\0&#931;\0" \
-"Tau\0&#932;\0" \
-"Upsilon\0&#933;\0" \
-"Phi\0&#934;\0" \
-"Chi\0&#935;\0" \
-"Psi\0&#936;\0" \
-"Omega\0&#937;\0" \
-"alpha\0&#945;\0" \
-"beta\0&#946;\0" \
-"gamma\0&#947;\0" \
-"delta\0&#948;\0" \
-"epsilon\0&#949;\0" \
-"zeta\0&#950;\0" \
-"eta\0&#951;\0" \
-"theta\0&#952;\0" \
-"iota\0&#953;\0" \
-"kappa\0&#954;\0" \
-"lambda\0&#955;\0" \
-"mu\0&#956;\0" \
-"nu\0&#957;\0" \
-"xi\0&#958;\0" \
-"omicron\0&#959;\0" \
-"pi\0&#960;\0" \
-"rho\0&#961;\0" \
-"sigmaf\0&#962;\0" \
-"sigma\0&#963;\0" \
-"tau\0&#964;\0" \
-"upsilon\0&#965;\0" \
-"phi\0&#966;\0" \
-"chi\0&#967;\0" \
-"psi\0&#968;\0" \
-"omega\0&#969;\0" \
-"thetasym\0&#977;\0" \
-"upsih\0&#978;\0" \
-"piv\0&#982;\0" \
-"bull\0&#8226;\0" \
-"hellip\0&#8230;\0" \
-"prime\0&#8242;\0" \
-"Prime\0&#8243;\0" \
-"oline\0&#8254;\0" \
-"frasl\0&#8260;\0" \
-"weierp\0&#8472;\0" \
-"image\0&#8465;\0" \
-"real\0&#8476;\0" \
-"trade\0&#8482;\0" \
-"alefsym\0&#8501;\0" \
-"larr\0&#8592;\0" \
-"uarr\0&#8593;\0" \
-"rarr\0&#8594;\0" \
-"darr\0&#8595;\0" \
-"harr\0&#8596;\0" \
-"crarr\0&#8629;\0" \
-"lArr\0&#8656;\0" \
-"uArr\0&#8657;\0" \
-"rArr\0&#8658;\0" \
-"dArr\0&#8659;\0" \
-"hArr\0&#8660;\0" \
-"forall\0&#8704;\0" \
-"part\0&#8706;\0" \
-"exist\0&#8707;\0" \
-"empty\0&#8709;\0" \
-"nabla\0&#8711;\0" \
-"isin\0&#8712;\0" \
-"notin\0&#8713;\0" \
-"ni\0&#8715;\0" \
-"prod\0&#8719;\0" \
-"sum\0&#8721;\0" \
-"minus\0&#8722;\0" \
-"lowast\0&#8727;\0" \
-"radic\0&#8730;\0" \
-"prop\0&#8733;\0" \
-"infin\0&#8734;\0" \
-"ang\0&#8736;\0" \
-"and\0&#8743;\0" \
-"or\0&#8744;\0" \
-"cap\0&#8745;\0" \
-"cup\0&#8746;\0" \
-"int\0&#8747;\0" \
-"there4\0&#8756;\0" \
-"sim\0&#8764;\0" \
-"cong\0&#8773;\0" \
-"asymp\0&#8776;\0" \
-"ne\0&#8800;\0" \
-"equiv\0&#8801;\0" \
-"le\0&#8804;\0" \
-"ge\0&#8805;\0" \
-"sub\0&#8834;\0" \
-"sup\0&#8835;\0" \
-"nsub\0&#8836;\0" \
-"sube\0&#8838;\0" \
-"supe\0&#8839;\0" \
-"oplus\0&#8853;\0" \
-"otimes\0&#8855;\0" \
-"perp\0&#8869;\0" \
-"sdot\0&#8901;\0" \
-"lceil\0&#8968;\0" \
-"rceil\0&#8969;\0" \
-"lfloor\0&#8970;\0" \
-"rfloor\0&#8971;\0" \
-"lang\0&#9001;\0" \
-"rang\0&#9002;\0" \
-"loz\0&#9674;\0" \
-"spades\0&#9824;\0" \
-"clubs\0&#9827;\0" \
-"hearts\0&#9829;\0" \
-"diams\0&#9830;\0" \
-"quot\0&#34;\0" \
-"amp\0&#38;\0" \
-"lt\0&#60;\0" \
-"gt\0&#62;\0" \
-"OElig\0&#338;\0" \
-"oelig\0&#339;\0" \
-"Scaron\0&#352;\0" \
-"scaron\0&#353;\0" \
-"Yuml\0&#376;\0" \
-"circ\0&#710;\0" \
-"tilde\0&#732;\0" \
-"ensp\0&#8194;\0" \
-"emsp\0&#8195;\0" \
-"thinsp\0&#8201;\0" \
-"zwnj\0&#8204;\0" \
-"zwj\0&#8205;\0" \
-"lrm\0&#8206;\0" \
-"rlm\0&#8207;\0" \
-"ndash\0&#8211;\0" \
-"mdash\0&#8212;\0" \
-"lsquo\0&#8216;\0" \
-"rsquo\0&#8217;\0" \
-"sbquo\0&#8218;\0" \
-"ldquo\0&#8220;\0" \
-"rdquo\0&#8221;\0" \
-"bdquo\0&#8222;\0" \
-"dagger\0&#8224;\0" \
-"Dagger\0&#8225;\0" \
-"permil\0&#8240;\0" \
-"lsaquo\0&#8249;\0" \
-"rsaquo\0&#8250;\0" \
-"euro\0&#8364;\0"
-
-#endif /* ndef entities_h */
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/lex.c b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/lex.c
deleted file mode 100644
index 9f9103386bd..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/lex.c
+++ /dev/null
@@ -1,560 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include "lex.h"
-#include "misc.h"
-#include "node.h"
-#include "process.h"
-
-struct file {
- struct file *next;
- const char *filename;
- char *buf;
- const char *pos, *end;
- unsigned int linenum;
-};
-
-const char keywords[] = KEYWORDS;
-
-static struct file *file, *firstfile;
-static struct tok tok;
-
-/***********************************************************************
- * readinput : read all input files into memory
- *
- * Enter: argv = 0-terminated array of filenames
- */
-void
-readinput(const char *const *argv)
-{
- struct file **pfile = &file;
- for (;;) {
- struct file *file;
- const char *filename = *argv++;
- char *buf = 0;
- int len = 0, thislen, isstdin;
- FILE *handle;
- if (!filename)
- break;
- /* Read the file. */
- isstdin = !strcmp(filename, "-");
- if (isstdin) {
- handle = stdin;
- filename = "<stdin>";
- } else {
- handle = fopen(filename, "rb");
- if (!handle)
- errorexit("%s: %s", filename, strerror(errno));
- }
- for (;;) {
- thislen = len ? len * 2 : 4096;
- buf = memrealloc(buf, len + thislen + 1);
- thislen = fread(buf + len, 1, thislen, handle);
- if (!thislen)
- break;
- len += thislen;
- }
- if (ferror(handle))
- errorexit("%s: I/O error", filename);
- if (!isstdin)
- fclose(handle);
- buf[len] = 0;
- buf = memrealloc(buf, len + 1);
- /* Create the file struct for it. */
- file = memalloc(sizeof(struct file));
- *pfile = file;
- pfile = &file->next;
- file->filename = filename;
- file->pos = file->buf = buf;
- file->end = buf + len;
- file->linenum = 1;
- }
- *pfile = 0;
- firstfile = file;
-}
-
-/***********************************************************************
- * lexerrorexit : error and exit with line number
- */
-static void
-lexerrorexit(const char *format, ...)
-{
- va_list ap;
- va_start(ap, format);
- vlocerrorexit(file->filename, file->linenum, format, ap);
- va_end(ap);
-}
-
-/***********************************************************************
- * lexblockcomment : lex a block comment
- *
- * Enter: start = start of comment
- *
- * Return: tok struct, lifetime until next call to lex
- */
-static struct tok *
-lexblockcomment(const char *start)
-{
- const char *p = start + 1;
- tok.filename = file->filename;
- tok.linenum = file->linenum;
- for (;;) {
- int ch = *++p;
- if (!ch)
- lexerrorexit("unterminated block comment");
- if (ch != '*') {
- if (ch == '\n')
- file->linenum++;
- continue;
- }
- ch = p[1];
- if (!ch)
- lexerrorexit("unterminated block comment");
- if (ch == '/')
- break;
- }
- p += 2;
- file->pos = p;
- tok.type = TOK_BLOCKCOMMENT;
- tok.start = start + 2;
- tok.len = p - start - 4;
- return &tok;
-}
-
-/***********************************************************************
- * lexinlinecomment : lex an inline comment
- *
- * Enter: start = start of comment, starts with "//"
- *
- * Return: tok struct, lifetime until next call to lex
- */
-static struct tok *
-lexinlinecomment(const char *start)
-{
- const char *p = start + 2;
- p = start + 1;
- for (;;) {
- int ch = *++p;
- if (!ch || ch == '\n')
- break;
- }
- p++;
- file->pos = p;
- tok.type = TOK_INLINECOMMENT;
- tok.start = start + 2;
- tok.len = p - start - 2;
- tok.filename = file->filename;
- tok.linenum = file->linenum++;
- return &tok;
-}
-
-/***********************************************************************
- * lexnumber : lex a number (or just a '-' symbol)
- *
- * Enter: start = start of token
- *
- * Return: tok struct, lifetime until next call to lex
- *
- * The IDL grammar seems to say that a float can't start with a
- * decimal point, so that's what we have implemented here.
- */
-static struct tok *
-lexnumber(const char *start)
-{
- for (;;) {
- const char *p = start;
- const char *octalend = start;
- int ch = *p;
- enum { STATE_START, STATE_INT, STATE_HEX, STATE_OCTAL, STATE_BADOCTAL,
- STATE_DP, STATE_EXPSTART, STATE_EXPSIGN, STATE_EXP
- } state = STATE_START;
- if (ch == '-') {
- ch = *++p;
- if (ch == 'I') { // starts of Infinity
- char * infinity = "-Infinity";
- unsigned int len = strlen(infinity);
- if (!memcmp(start, infinity, len)) {
- tok.type = TOK_minusinfinity;
- tok.start = start;
- tok.len = len;
- tok.filename = file->filename;
- tok.linenum = file->linenum;
- file->pos = start + len;
- return &tok;
- }
- }
- }
- if (ch == '0') {
- state = STATE_OCTAL;
- ch = *++p;
- if ((ch & ~0x20) == 'X') {
- state = STATE_HEX;
- ch = *++p;
- }
- }
-
- for (;;) {
- if ((unsigned)(ch - '0') >= 8) {
- if ((ch & -2) == '8') {
- if (state == STATE_OCTAL) {
- state = STATE_BADOCTAL;
- octalend = p;
- }
- } else if ((unsigned)((ch & ~0x20) - 'A') <= 'F' - 'A') {
- if (state != STATE_HEX) {
- if ((ch & ~0x20) != 'E')
- break;
- if (state == STATE_HEX || state >= STATE_EXPSTART || state == STATE_START)
- break;
- state = STATE_EXPSTART;
- }
- } else if (ch == '.') {
- if (state == STATE_HEX || state >= STATE_DP)
- break;
- state = STATE_DP;
- } else if (ch == '-') {
- if (state != STATE_EXPSTART)
- break;
- state = STATE_EXPSIGN;
- } else
- break;
- }
- ch = *++p;
- if (state == STATE_START)
- state = STATE_INT;
- else if (state == STATE_EXPSTART || state == STATE_EXPSIGN)
- state = STATE_EXP;
- }
- switch (state) {
- case STATE_START:
- /* Must have just been a - character by itself. */
- tok.type = '-';
- p = start + 1;
- break;
- case STATE_BADOCTAL:
- p = octalend;
- /* fall through... */
- case STATE_INT:
- case STATE_OCTAL:
- tok.type = TOK_INTEGER;
- break;
- case STATE_HEX:
- if (p - start == 2 || (p - start == 3 && *start == '-'))
- p = start + 1;
- tok.type = TOK_INTEGER;
- break;
- case STATE_EXP:
- case STATE_DP:
- tok.type = TOK_FLOAT;
- break;
- case STATE_EXPSIGN:
- p--;
- /* fall through... */
- case STATE_EXPSTART:
- p--;
- tok.type = TOK_FLOAT;
- break;
- }
- tok.start = start;
- tok.len = p - start;
- tok.filename = file->filename;
- tok.linenum = file->linenum;
- file->pos = p;
- return &tok;
- }
-}
-
-/***********************************************************************
- * lexstring : lex a quoted string
- *
- * Enter: start = start of token
- *
- * Return: tok struct, lifetime until next call to lex
- */
-static struct tok *
-lexstring(const char *start)
-{
- for (;;) {
- const char *p = start + 1;
- int ch = *p;
- for (;;) {
- if (!ch || ch == '\n')
- lexerrorexit("unterminated string");
- if (ch == '"') {
- tok.type = TOK_STRING;
- tok.start = start + 1;
- tok.len = p - start - 1;
- tok.filename = file->filename;
- tok.linenum = file->linenum;
- file->pos = p + 1;
- return &tok;
- }
- /* Note the IDL spec doesn't seem to allow for escape sequences
- * in strings. */
- ch = *++p;
- }
- }
-}
-
-/***********************************************************************
- * lexidentifier : lex an identifier
- *
- * Enter: start = start of token
- *
- * Return: tok struct, lifetime until next call to lex
- */
-static struct tok *
-lexidentifier(const char *start)
-{
- const char *p = start + 1;
- for (;;) {
- int ch = *p;
- if (ch != '_' && (unsigned)(ch - '0') >= 10
- && (unsigned)((ch & ~0x20) - 'A') > 'Z' - 'A')
- {
- break;
- }
- p++;
- }
- tok.type = TOK_IDENTIFIER;
- tok.start = start;
- tok.len = p - start;
- tok.filename = file->filename;
- tok.linenum = file->linenum;
- file->pos = p;
- /* See if this is a keyword. (This search is a bit n-squared.) */
- {
- unsigned int type = TOK_DOMString;
- p = keywords;
- for (;;) {
- unsigned int len = strlen(p);
- if (!len)
- break;
- if (len == tok.len && !memcmp(start, p, len)) {
- tok.type = type;
- break;
- }
- p += len + 1;
- type++;
- }
- }
- return &tok;
-}
-
-/***********************************************************************
- * lex : retrieve next token
- *
- * Return: tok struct, lifetime until next call to lex
- */
-struct tok *
-lex(void)
-{
- const char *p;
- int ch;
- for (;;) {
- if (!file) {
- tok.type = TOK_EOF;
- tok.start = "end of file";
- tok.len = strlen(tok.start);
- return &tok;
- }
- tok.prestart = p = file->pos;
- /* Flush whitespace. */
- for (;;) {
- ch = *p++;
- switch (ch) {
- case ' ':
- case '\t':
- case '\r':
- continue;
- case '\n':
- ++file->linenum;
- tok.prestart = p;
- continue;
- }
- break;
- }
- p--;
- if (ch)
- break;
- if (p != file->end)
- lexerrorexit("\\0 byte not allowed");
- file = file->next;
- }
- /* See if we have a comment. */
- tok.start = p;
- if (ch == '/') {
- switch (*++p) {
- case '*':
- return lexblockcomment(p - 1);
- case '/':
- return lexinlinecomment(p - 1);
- }
- tok.type = '/';
- } else {
- /* Handle things that start with '-', which is either '-' as a token,
- * or a number. Handle numbers. */
- if (ch == '-' || (unsigned)(ch - '0') < 10)
- return lexnumber(p);
- /* Handle string. */
- if (ch == '"')
- return lexstring(p);
- /* Handle identifier. */
- if (ch == '_' || (unsigned)((ch & ~0x20) - 'A') <= 'Z' - 'A')
- return lexidentifier(p);
- /* The only multi-symbol token are ... and [] */
- if (ch == '.') {
- tok.type = '.';
- if (*++p == '.' && p[1] == '.') {
- tok.type = TOK_ELLIPSIS;
- p += 2;
- }
- goto done;
- }
- if (ch == '[') {
- tok.type = '[';
- if (*++p == ']') {
- tok.type = TOK_DOUBLEBRACKET;
- p++;
- }
- goto done;
- }
- }
- /* Single symbol token. */
- tok.type = ch;
- p++;
-done:
- tok.filename = file->filename;
- tok.linenum = file->linenum;
- tok.len = p - tok.start;
- file->pos = p;
- return &tok;
-}
-
-/***********************************************************************
- * outputwidl : output literal Web IDL input that node was parsed from
- *
- * Enter: node = parse node to output literal Web IDL for
- */
-void
-outputwidl(struct node *node)
-{
- const char *start = node->wsstart, *end = node->end;
- /* Find the file that start is in. */
- struct file *file = firstfile;
- while (start < file->buf || start >= file->end) {
- file = file->next;
- assert(file);
- }
- /* Find the (current or) next node that has node->start set. Any such
- * node needs to be put inside a <ref> element. */
- while (node && !node->start)
- node = nodewalk(node);
- /* Output until we get to the end. This has to cope with the text
- * spanning multiple input files. */
- for (;;) {
- int final = end >= file->buf && end <= file->end;
- const char *thisend = final ? end : file->end;
- /* Output the Web IDL, omitting comments. */
- while (start != end) {
- const char *p, *p2, *comment, *endcomment;
- int ch;
- if (node && start == node->start) {
- /* We are on the start of the present node in the tree
- * walk. Put it in a <ref>. */
- fputs("<ref>", stdout);
- printtext(node->start, node->end - node->start, 1);
- fputs("</ref>", stdout);
- start = node->end;
- /* Skip to the next node with node->start set if any. */
- do
- node = nodewalk(node);
- while (node && !node->start);
- continue;
- }
- p2 = thisend;
- if (node && node->start >= file->buf && node->start < p2)
- p2 = node->start;
- p = memchr(start, '/', p2 - start);
- if (!p) {
- printtext(start, p2 - start, 1);
- if (p2 != thisend) {
- start = p2;
- continue;
- }
- break;
- }
- /* See if we're at the start of a comment. If so find the end. */
- comment = 0;
- if (p + 1 != thisend) {
- switch (p[1]) {
- case '*':
- /* Block comment. */
- comment = p;
- p++;
- do
- p = memchr(p + 1, '*', thisend - p - 1);
- while (p[1] != '/');
- endcomment = p + 2;
- break;
- case '/':
- /* Inline comment. */
- comment = p;
- p = memchr(p, '\n', thisend - p);
- if (!p)
- p = thisend;
- endcomment = p;
- break;
- }
- }
- if (!comment) {
- /* Not at start of comment. */
- p++;
- printtext(start, p - start, 1);
- start = p;
- assert(start <= end);
- continue;
- }
- /* If the comment has only whitespace before it on the line,
- * eat that up. */
- p = comment;
- while (p != start && ((ch = p[-1]) == ' ' || ch == '\t'))
- p--;
- if (p == start || p[-1] == '\n') {
- comment = p;
- /* If the comment has only whitespace after it to the end
- * of the line, eat that and the newline up. This always
- * happens for an inline comment on a line by itself. */
- p = endcomment;
- while (p != thisend && ((ch = *p) == ' ' || ch == '\t'))
- p++;
- if (p != thisend && *p == '\n')
- p++;
- endcomment = p;
- }
- printtext(start, comment - start, 1);
- start = endcomment;
- if (start > thisend)
- start = thisend;
- }
- if (final)
- break;
- file = file->next;
- assert(file);
- start = file->buf;
- }
-}
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/lex.h b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/lex.h
deleted file mode 100644
index e30b77b365c..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/lex.h
+++ /dev/null
@@ -1,141 +0,0 @@
-
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#ifndef lex_h
-#define lex_h
-
-// starting from "attribute" are the list of names allowed as arguments identifier
-#define KEYWORDS \
- "DOMString\0" \
- "ByteString\0" \
- "Date\0" \
- "RegExp\0" \
- "false\0" \
- "object\0" \
- "true\0" \
- "any\0" \
- "boolean\0" \
- "byte\0" \
- "double\0" \
- "float\0" \
- "Infinity\0" \
- "-Infinity\0" \
- "iterator\0" \
- "long\0" \
- "NaN\0" \
- "null\0" \
- "octet\0" \
- "optional\0" \
- "or\0" \
- "readonly\0" \
- "sequence\0" \
- "short\0" \
- "unsigned\0" \
- "void\0" \
- "attribute\0" \
- "callback\0" \
- "const\0" \
- "creator\0" \
- "deleter\0" \
- "dictionary\0" \
- "enum\0" \
- "exception\0" \
- "getter\0" \
- "implements\0" \
- "inherit\0" \
- "interface\0" \
- "legacycaller\0" \
- "partial\0" \
- "serializer\0" \
- "setter\0" \
- "static\0" \
- "stringifier\0" \
- "typedef\0" \
- "unrestricted\0"
-
-
-enum toktype {
- TOK_EOF = -1,
- TOK_BLOCKCOMMENT = 0x80,
- TOK_INLINECOMMENT, TOK_INTEGER, TOK_FLOAT, TOK_IDENTIFIER,
- TOK_STRING, TOK_ELLIPSIS, TOK_DOUBLEBRACKET,
- /* Keywords must be in the same order as above. */
- TOK_DOMString,
- TOK_ByteString,
- TOK_Date,
- TOK_RegExp,
- TOK_false,
- TOK_object,
- TOK_true,
- TOK_any,
- TOK_boolean,
- TOK_byte,
- TOK_double,
- TOK_float,
- TOK_infinity,
- TOK_minusinfinity,
- TOK_iterator,
- TOK_long,
- TOK_NaN,
- TOK_null,
- TOK_octet,
- TOK_optional,
- TOK_or,
- TOK_readonly,
- TOK_sequence,
- TOK_short,
- TOK_unsigned,
- TOK_void,
- /* Below that line are keywords that are allowed as arguments names */
- TOK_attribute,
- TOK_callback,
- TOK_const,
- TOK_creator,
- TOK_deleter,
- TOK_dictionary,
- TOK_enum,
- TOK_exception,
- TOK_getter,
- TOK_implements,
- TOK_inherit,
- TOK_interface,
- TOK_legacycaller,
- TOK_partial,
- TOK_serializer,
- TOK_setter,
- TOK_static,
- TOK_stringifier,
- TOK_typedef,
- TOK_unrestricted,
-};
-
-struct tok {
- enum toktype type;
- const char *filename;
- unsigned int linenum;
- const char *prestart;
- const char *start;
- unsigned int len;
-};
-
-extern const char *filename;
-extern const char keywords[];
-
-struct node;
-
-void readinput(const char *const *argv);
-struct tok *lex(void);
-void outputwidl(struct node *node);
-
-#endif /* ndef lex_h */
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/main.c b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/main.c
deleted file mode 100644
index df90e347de8..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/main.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#include <string.h>
-#include "misc.h"
-#include "process.h"
-
-static const char nodtdopt[] = "-no-dtd-ref";
-const char *progname;
-
-/***********************************************************************
- * options : process command line options
- *
- * Enter: argv
- *
- * Return: argv stepped to point to first non-option argument
- */
-static const char *const *
-options(int argc, const char *const *argv)
-{
- /* Set progname for error messages etc. */
- {
- const char *base;
- progname = argv[0];
- base = strrchr(progname, '/');
-#ifdef DIRSEP
- {
- const char *base2 = strrchr(base, '\\');
- if (base2 > base)
- base = base2;
- }
-#endif /* def DIRSEP */
- if (base)
- progname = base + 1;
- }
- return (argc > 1 && strncmp(argv[1], nodtdopt, sizeof nodtdopt) == 0)
- ? argv + 2 : argv + 1;
-}
-
-/***********************************************************************
- * main : main code for bondiidl command
- */
-int
-main(int argc, char **argv)
-{
- const char *const *parg;
- parg = options(argc, (const char *const *)argv);
- if (!*parg)
- errorexit("usage: %s [-no-dtd-ref] <interface>.widl ...", progname);
- processfiles(parg, parg == (const char *const *)argv + 1);
- return 0;
-}
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/misc.c b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/misc.c
deleted file mode 100644
index 37aff3f34db..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/misc.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "misc.h"
-#include "os.h" /* to get va_copy on windows */
-
-extern const char *progname;
-
-/***********************************************************************
- * memory allocation wrappers
- */
-void *
-memalloc(size_t size)
-{
- void *ptr = malloc(size);
- if (!ptr)
- errorexit("out of memory");
- /* Zero initialise memory from memalloc. */
- memset(ptr, 0, size);
- return ptr;
-}
-
-void *
-memrealloc(void *ptr, size_t size)
-{
- void *newptr = realloc(ptr, size);
- if (!newptr)
- errorexit("out of memory");
- return newptr;
-}
-
-void
-memfree(void *ptr)
-{
- *(int *)ptr = 0xfefefefe;
- free(ptr);
-}
-
-/***********************************************************************
- * vmemprintf, memprintf : allocate buffer and sprintf into it
- */
-char *
-memprintf(const char *format, ...)
-{
- va_list ap;
- char *buf;
- va_start(ap, format);
- buf = vmemprintf(format, ap);
- va_end(ap);
- return buf;
-}
-
-char *
-vmemprintf(const char *format, va_list ap)
-{
- char *buf;
- unsigned int max, len;
- va_list ap2;
- max = 16;
- for (;;) {
- va_copy(ap2, ap);
- buf = memalloc(max);
- len = vsnprintf(buf, max, format, ap2);
- va_end(ap2);
- if (len < max)
- break;
- memfree(buf);
- max *= 2;
- }
- return buf;
-}
-
-/***********************************************************************
- * errorexit : print error message then exit
- */
-void
-vlocerrorexit(const char *filename, unsigned int linenum,
- const char *format, va_list ap)
-{
- if (filename)
- fprintf(stderr, linenum ? "%s: %i: " : "%s: ", filename, linenum);
- vfprintf(stderr, format, ap);
- fputc('\n', stderr);
- exit(1);
-}
-
-void
-locerrorexit(const char *filename, unsigned int linenum,
- const char *format, ...)
-{
- va_list ap;
- va_start(ap, format);
- vlocerrorexit(filename, linenum, format, ap);
- va_end(ap);
-}
-
-void
-errorexit(const char *format, ...)
-{
- va_list ap;
- va_start(ap, format);
- vlocerrorexit(0, 0, format, ap);
- va_end(ap);
-}
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/misc.h b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/misc.h
deleted file mode 100644
index 01c36d218ed..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/misc.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#ifndef misc_h
-#define misc_h
-#include <stdarg.h>
-#include <stdlib.h>
-
-void *memalloc(size_t size);
-void *memrealloc(void *ptr, size_t size);
-void memfree(void *ptr);
-
-char *vmemprintf(const char *format, va_list ap);
-char *memprintf(const char *format, ...);
-
-void vlocerrorexit(const char *filename, unsigned int linenum, const char *format, va_list ap);
-void locerrorexit(const char *filename, unsigned int linenum, const char *format, ...);
-void errorexit(const char *format, ...);
-
-#endif /* ndef misc_h */
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/node.c b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/node.c
deleted file mode 100644
index d8f737909a4..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/node.c
+++ /dev/null
@@ -1,331 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Node-specific functions
- ***********************************************************************/
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include "comment.h"
-#include "lex.h"
-#include "misc.h"
-#include "node.h"
-#include "process.h"
-
-struct node *
-newelement(const char *name)
-{
- struct element *element = memalloc(sizeof(struct element));
- element->n.type = NODE_ELEMENT;
- element->name = name;
- return &element->n;
-}
-
-struct node *
-newattr(const char *name, const char *val)
-{
- struct attr *attr = memalloc(sizeof(struct attr));
- attr->n.type = NODE_ATTR;
- attr->name = name;
- attr->value = val;
- return &attr->n;
-}
-
-struct node *
-newattrlist(void)
-{
- struct attrlist *attrlist = memalloc(sizeof(struct attrlist));
- attrlist->n.type = NODE_ATTRLIST;
- return &attrlist->n;
-}
-
-/***********************************************************************
- * addnode : add node as child of another node
- *
- * Enter: parent node
- * child node
- *
- * The children list is constructed backwards. This is fixed later with
- * a call to reversechildren.
- *
- * If child is an attrlist, its children are added to parent and the
- * attrlist is freed.
- */
-void
-addnode(struct node *parent, struct node *child)
-{
- if (!child)
- return;
- if (child->type == NODE_ATTRLIST) {
- /* Add the attrs in the attrlist to parent. */
- struct node *child2;
- reversechildren(child);
- child2 = child->children;
- memfree(child);
- while (child2) {
- struct node *next = child2->next;
- addnode(parent, child2);
- child2 = next;
- }
- } else {
- child->next = parent->children;
- parent->children = child;
- child->parent = parent;
- }
-}
-
-/***********************************************************************
- * reversechildren : recursively reverse child lists
- *
- * Also sets parent field on each node.
- */
-void
-reversechildren(struct node *node)
-{
- struct node *newlist = 0;
- struct node *child = node->children;
- while (child) {
- struct node *next = child->next;
- child->parent = node;
- child->next = newlist;
- newlist = child;
- reversechildren(child);
- child = next;
- }
- node->children = newlist;
-}
-
-/***********************************************************************
- * nodeisempty : test if node is empty (has no children)
- */
-int
-nodeisempty(struct node *node)
-{
- return !node->children;
-}
-
-/***********************************************************************
- * nodewalk : single step of depth last traversal of node tree
- *
- * Return: next node in walk, 0 if finished
- */
-struct node *
-nodewalk(struct node *node)
-{
- if (node->children)
- return node->children;
- if (node->next)
- return node->next;
- do {
- node = node->parent;
- if (!node)
- return 0;
- } while (!node->next);
- return node->next;
-}
-
-/***********************************************************************
- * findchildelement : find child element of a particular name
- *
- * Enter: node = element
- * name = name to find
- *
- * Return: 0 else child element of that name
- */
-static struct node *
-findchildelement(struct node *node, const char *name)
-{
- node = node->children;
- while (node) {
- if (node->type == NODE_ELEMENT) {
- struct element *element = (void *)node;
- if (!strcmp(element->name, name))
- break;
- }
- node = node->next;
- }
- return node;
-}
-
-/***********************************************************************
- * getattr : get value of attribute
- *
- * Enter: node = element to find attribute in
- * name = name of attribute
- *
- * Return: 0 if not found, else 0-terminated string value
- */
-const char *
-getattr(struct node *node, const char *name)
-{
- node = node->children;
- while (node) {
- if (node->type == NODE_ATTR) {
- struct attr *attr = (void *)node;
- if (!strcmp(attr->name, name))
- return attr->value;
- }
- node = node->next;
- }
- return 0;
-}
-
-/***********************************************************************
- * findchildelementwithnameattr : find child element with a name attribute
- * of a particular value
- *
- * Enter: node = element
- * name = name to find
- *
- * Return: 0 else child element with name attr of that value
- */
-static struct node *
-findchildelementwithnameattr(struct node *node, const char *name)
-{
- node = node->children;
- while (node) {
- if (node->type == NODE_ELEMENT) {
- const char *s = getattr(node, "name");
- if (s && !strcmp(s, name))
- break;
- }
- node = node->next;
- }
- return node;
-}
-
-/***********************************************************************
- * findreturntype : find Type parse node for return type
- *
- * Enter: node = Operation element
- *
- * Return: 0 if not found, else Type parse node for return type
- */
-struct node *
-findreturntype(struct node *node)
-{
- return findchildelement(node, "Type");
-}
-
-/***********************************************************************
- * findparamidentifier : find identifier parse node for parameter
- *
- * Enter: node = Operation element
- * name = parameter name to find
- *
- * Return: 0 if not found, else node struct for parameter identifier
- */
-struct node *
-findparamidentifier(struct node *node, const char *name)
-{
- node = findchildelement(node, "ArgumentList");
- if (node)
- node = findchildelementwithnameattr(node, name);
- return node;
-}
-
-/***********************************************************************
- * findthrowidentifier : find identifier parse node for exception name
- *
- * Enter: node = Operation element
- * name = exception name to find
- *
- * Return: 0 if not found, else node for Name element, child of Raises
- * or SetRaises
- */
-struct node *
-findthrowidentifier(struct node *node, const char *name)
-{
- struct node *node2 = findchildelement(node, "Raises");
- if (node2)
- node2 = findchildelementwithnameattr(node2, name);
- if (!node2) {
- node2 = findchildelement(node, "SetRaises");
- if (node2)
- node2 = findchildelementwithnameattr(node2, name);
- }
- return node2;
-}
-
-/***********************************************************************
- * outputid : output the id of a node
- */
-static void
-outputid(struct node *node)
-{
- if (node->parent)
- outputid(node->parent);
- if (node->id) {
- fputs("::", stdout);
- printtext(node->id, strlen(node->id), 1);
- }
-}
-
-/***********************************************************************
- * outputnode : output node and its children
- *
- * Enter: node = node to output, assumed to be an element
- * indent
- */
-void
-outputnode(struct node *node, unsigned int indent)
-{
- struct element *element = (void *)node;
- struct node *child;
- int empty = 1;
- printf("%*s<%s", indent, "", element->name);
- child = element->n.children;
- while (child) {
- switch(child->type) {
- case NODE_ELEMENT:
- empty = 0;
- break;
- case NODE_ATTR:
- {
- struct attr *attr = (void *)child;
- printf(" %s=\"", attr->name);
- printtext(attr->value, strlen(attr->value), 1);
- printf("\"");
- }
- break;
- }
- child = child->next;
- }
- if (node->id) {
- printf(" id=\"");
- outputid(node);
- printf("\"");
- }
- if (!empty || node->comments || node->wsstart) {
- printf(">\n");
- if (node->wsstart) {
- printf("%*s <webidl>", indent, "");
- outputwidl(node);
- printf("</webidl>\n");
- }
- outputdescriptive(node, indent + 2);
- child = element->n.children;
- while (child) {
- switch(child->type) {
- case NODE_ELEMENT:
- outputnode(child, indent + 2);
- break;
- }
- child = child->next;
- }
- printf("%*s</%s>\n", indent, "", element->name);
- } else
- printf("/>\n");
-}
-
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/node.h b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/node.h
deleted file mode 100644
index 2d6e38e5323..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/node.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#ifndef node_h
-#define node_h
-
-/* struct node : a node in the parse tree (excluding comments) */
-enum { NODE_ELEMENT, NODE_ATTR, NODE_ATTRLIST };
-struct node {
- int type;
- struct node *next;
- struct node *parent;
- struct node *children;
- struct comment *comments; /* list of comments attached to this node */
- /* If wsstart and end are set, they give the literal Web IDL that can
- * be output in a <webidl> element. */
- const char *wsstart;
- /* If start and end are set, they give the text of a scoped name that
- * can be enclosed in a <ref> when outputting a <webidl> element for
- * an ancestor element. */
- const char *start;
- const char *end;
- const char *id;
-};
-
-struct element {
- struct node n;
- const char *name;
-};
-
-struct attr {
- struct node n;
- const char *name;
- const char *value;
-};
-
-struct attrlist {
- struct node n;
-};
-
-struct node *newelement(const char *name);
-struct node *newattr(const char *name, const char *val);
-struct node *newattrlist(void);
-void addnode(struct node *parent, struct node *child);
-void reversechildren(struct node *node);
-int nodeisempty(struct node *node);
-const char *getattr(struct node *node, const char *name);
-struct node *nodewalk(struct node *node);
-struct node *findreturntype(struct node *node);
-struct node *findparamidentifier(struct node *node, const char *name);
-struct node *findthrowidentifier(struct node *node, const char *name);
-void outputnode(struct node *node, unsigned int indent);
-
-#endif /* ndef node_h */
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/os.h b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/os.h
deleted file mode 100644
index ac8f4189d19..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/os.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#ifndef os_h
-#define os_h
-
-/* Linux configuration */
-#if defined(__gnu_linux__)
-
-
-/* Windows configuration */
-#elif defined(_MSC_VER)
-
-#define inline __inline
-#define strncasecmp strnicmp
-#define snprintf _snprintf
-#define va_copy(a,b) ((a)=(b))
-
-#endif
-
-#endif /* ndef os_h */
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/parse.c b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/parse.c
deleted file mode 100644
index c0e8454ceac..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/parse.c
+++ /dev/null
@@ -1,1414 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Hand-crafted recursive descent parser for Web IDL grammar.
- ***********************************************************************/
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "comment.h"
-#include "lex.h"
-#include "misc.h"
-#include "node.h"
-#include "parse.h"
-
-/***********************************************************************
- * tokerrorexit : error and exit with line number from token
- */
-static void
-tokerrorexit(struct tok *tok, const char *format, ...)
-{
- va_list ap;
- char *m;
- va_start(ap, format);
- m = vmemprintf(format, ap);
- if (tok->type == TOK_EOF)
- locerrorexit(tok->filename, tok->linenum, "at end of input: %s", m);
- else
- locerrorexit(tok->filename, tok->linenum, "at '%.*s': %s", tok->len, tok->start, m);
- va_end(ap);
-}
-
-/***********************************************************************
- * lexnocomment : lex next token, discarding or storing comments
- *
- * A block comment starting with |** or |*! is a doxygen comment.
- * If it starts with |**< or |*!< then it refers to the previous
- * identifier, not the next one. (I am using | to represent / otherwise
- * this comment would be illegal.)
- *
- * An inline comment starting with /// or //! is a doxygen comment.
- * If it starts with ///< or //!< then it refers to the previous
- * identifier, not the next one.
- */
-static struct tok *
-lexnocomment(void)
-{
- struct tok *tok;
- for (;;) {
- tok = lex();
- if (tok->type != TOK_BLOCKCOMMENT && tok->type != TOK_INLINECOMMENT)
- break;
- addcomment(tok);
- }
- return tok;
-}
-
-/***********************************************************************
- * eat : check token then read the following one
- *
- * Enter: tok struct
- * type = type of token expected, error given if no match
- *
- * On return, tok is updated to the following token.
- */
-static void
-eat(struct tok *tok, int type)
-{
- if (tok->type != type) {
- const char *p;
- if (type < TOK_DOMString)
- tokerrorexit(tok, "expected '%c'", type);
- p = keywords;
- while (type != TOK_DOMString) {
- p += strlen(p) + 1;
- type--;
- }
- tokerrorexit(tok, "expected '%s'", p);
- }
- lexnocomment();
-}
-
-/***********************************************************************
- * setid : flag that an id attribute is required on node
- *
- * Enter: node
- *
- * node->id is set to the value of the name attribute. This makes
- * outputnode give it an id attribute whose value is the id attribute
- * of the parent if any, then "::", then node->id.
- */
-static void
-setid(struct node *node)
-{
- node->id = getattr(node, "name");
-}
-
-/***********************************************************************
- * setidentifier : allocate 0-terminated string for identifier token
- *
- * Enter: tok = token, error given if not identifier
- *
- * Return: allocated 0-terminated string
- */
-static char *
-setidentifier(struct tok *tok)
-{
- char *s;
- if (tok->type != TOK_IDENTIFIER)
- tokerrorexit(tok, "expected identifier");
- s = memprintf("%.*s", tok->len, tok->start);
- return s;
-}
-
-/***********************************************************************
- * setargumentname : allocate 0-terminated string for identifier token
- *
- * Enter: tok = token, error given if not identifier
- *
- * Return: allocated 0-terminated string
- */
-static char *
-setargumentname(struct tok *tok)
-{
- char *s;
- if (tok->type != TOK_IDENTIFIER && tok->type < TOK_attribute)
- tokerrorexit(tok, "expected argument name");
- s = memprintf("%.*s", tok->len, tok->start);
- return s;
-}
-
-
-/* Prototypes for funcs that have a forward reference. */
-static struct node *parsetype(struct tok *tok);
-static struct node *parsedefaultvalue(struct tok *tok, struct node *parent);
-static struct node *parseuniontype(struct tok *tok);
-static struct node *parseargumentlist(struct tok *tok);
-static void parsedefinitions(struct tok *tok, struct node *parent);
-static struct node *parsetypesuffixstartingwitharray(struct tok *tok, struct node *node);
-
-/***********************************************************************
- * parsescopedname : parse [53] ScopedName
- *
- * Enter: tok = next token
- * name = name of attribute to put scoped name in
- * ref = whether to enable enclosing of the name in <ref> in
- * outputwidl
- *
- * Return: node struct for new attribute
- * tok updated
- */
-static struct node *
-parsescopedname(struct tok *tok, const char *name, int ref)
-{
- const char *start = tok->start, *end;
- struct node *node;
- unsigned int len = 0;
- char *s = memalloc(3);
- if (tok->type != TOK_IDENTIFIER)
- tokerrorexit(tok, "expected identifier");
- s = memrealloc(s, len + tok->len + 1);
- memcpy(s + len, tok->start, tok->len);
- len += tok->len;
- end = tok->start + tok->len;
- lexnocomment();
- s[len] = 0;
- node = newattr(name, s);
- if (ref) {
- node->start = start;
- node->end = end;
- }
- return node;
-}
-
-/***********************************************************************
- * parsescopednamelist : parse [51] ScopedNameList
- *
- * Enter: tok = next token
- * name = name of element for scoped name list
- * name2 = name of element for entry in list
- * comment = whether to attach documentation to each name
- *
- * Return: node for list of scoped names
- * tok updated
- */
-static struct node *
-parsescopednamelist(struct tok *tok, const char *name, const char *name2,
- int comment)
-{
- struct node *node = newelement(name);
- for (;;) {
- struct node *attr = parsescopedname(tok, "name", 1);
- struct node *n = newelement(name2);
- if (comment)
- setcommentnode(n);
- addnode(n, attr);
- addnode(node, n);
- if (tok->type != ',')
- break;
- lexnocomment();
- }
- return node;
-}
-
-/***********************************************************************
- * parsereturntype : parse [50] ReturnType
- *
- * Enter: tok = next token
- *
- * Return: node for type
- * tok updated
- */
-static struct node *
-parsereturntype(struct tok *tok)
-{
- if (tok->type == TOK_void) {
- struct node *node = newelement("Type");
- addnode(node, newattr("type", "void"));
- lexnocomment();
- return node;
- }
- return parsetype(tok);
-}
-
-/***********************************************************************
- * parseunsignedintegertype : parse [46] UnsignedIntegerType
- *
- * Enter: tok = next token (one of "unsigned", "short" or "long")
- *
- * Return: 0-terminated canonical string for the type
- * tok updated to just past UnsignedIntegerType
- */
-static const char *
-parseunsignedintegertype(struct tok *tok)
-{
- static const char *names[] = {
- "short", "long", "long long", 0,
- "unsigned short", "unsigned long", "unsigned long long" };
- enum { TYPE_SHORT, TYPE_LONG, TYPE_LONGLONG,
- TYPE_UNSIGNED = 4 };
- int type = 0;
- if (tok->type == TOK_unsigned) {
- type = TYPE_UNSIGNED;
- lexnocomment();
- }
- if (tok->type == TOK_short) {
- type |= TYPE_SHORT;
- lexnocomment();
- } else if (tok->type != TOK_long)
- tokerrorexit(tok, "expected 'short' or 'long' after 'unsigned'");
- else {
- type |= TYPE_LONG;
- lexnocomment();
- if (tok->type == TOK_long) {
- type += TYPE_LONGLONG - TYPE_LONG;
- lexnocomment();
- }
- }
- return names[type];
-}
-/***********************************************************************
- * parsetypesuffix : parse [44] TypeSuffix
- *
- * Enter: tok = next token
- *
- * Return: node for type
- * tok updated
- */
-static struct node *
-parsetypesuffix(struct tok *tok, struct node *node)
-{
- if (tok->type == TOK_DOUBLEBRACKET) {
- struct node *typenode = node;
- node = newelement("Type");
- addnode(node, newattr("type", "array"));
- addnode(node, typenode);
- lexnocomment();
- node = parsetypesuffix(tok, node);
- } else if (tok->type == '?') {
- addnode(node, newattr("nullable", "nullable"));
- lexnocomment();
- node = parsetypesuffixstartingwitharray(tok, node);
- }
- return node;
-}
-
-/***********************************************************************
- * parsetypesuffixstartingwitharray : parse [44] TypeSuffixStartingWithArray
- *
- * Enter: tok = next token
- *
- * Return: node for type
- * tok updated
- */
-static struct node *
-parsetypesuffixstartingwitharray(struct tok *tok, struct node *node)
-{
- if (tok->type == TOK_DOUBLEBRACKET) {
- struct node *typenode = node;
- node = newelement("Type");
- addnode(node, newattr("type", "array"));
- addnode(node, typenode);
- lexnocomment();
- node = parsetypesuffix(tok, node);
- }
- return node;
-}
-
-/***********************************************************************
- * parseprimitiveorstringtype : parse [45] PrimitiveOrString
- *
- * Enter: tok = next token
- *
- * Return: node for type
- * tok updated
- */
-static struct node *
-parseprimitiveorstringtype(struct tok *tok)
-{
- struct node *node;
- switch (tok->type) {
- case TOK_unsigned:
- case TOK_short:
- case TOK_long:
- node = newelement("Type");
- addnode(node, newattr("type", parseunsignedintegertype(tok)));
- break;
- default:
- node = newelement("Type");
- switch (tok->type) {
- default:
- tokerrorexit(tok, "expected type");
- break;
- case TOK_unrestricted:
- lexnocomment();
- if (tok->type == TOK_float) {
- addnode(node, newattr("type", "unrestricted float"));
- } else if (tok->type == TOK_double) {
- addnode(node, newattr("type", "unrestricted double"));
- } else {
- tokerrorexit(tok, "expected float or double after unrestricted");
- }
- break;
- case TOK_boolean:
- addnode(node, newattr("type", "boolean"));
- break;
- case TOK_byte:
- addnode(node, newattr("type", "byte"));
- break;
- case TOK_octet:
- addnode(node, newattr("type", "octet"));
- break;
- case TOK_float:
- addnode(node, newattr("type", "float"));
- break;
- case TOK_double:
- addnode(node, newattr("type", "double"));
- break;
- case TOK_DOMString:
- addnode(node, newattr("type", "DOMString"));
- break;
- case TOK_ByteString:
- addnode(node, newattr("type", "ByteString"));
- break;
- case TOK_Date:
- addnode(node, newattr("type", "Date"));
- break;
- case TOK_RegExp:
- addnode(node, newattr("type", "RegExp"));
- break;
-
- }
- lexnocomment();
- }
- return node;
-}
-
-/***********************************************************************
- * parsenonanytype : parse NonAnyType
- *
- * Enter: tok = next token
- *
- * Return: node for type
- * tok updated
- */
-static struct node *
-parsenonanytype(struct tok *tok)
-{
- struct node *node;
- switch (tok->type) {
- case TOK_IDENTIFIER:
- node = newelement("Type");
- addnode(node, parsescopedname(tok, "name", 1));
- node = parsetypesuffix(tok, node);
- break;
- case TOK_sequence:
- node = newelement("Type");
- addnode(node, newattr("type", "sequence"));
- lexnocomment();
- eat(tok, '<');
- addnode(node, parsetype(tok));
- eat(tok, '>');
- if (tok->type == '?') {
- addnode(node, newattr("nullable", "nullable"));
- lexnocomment();
- }
- break;
- case TOK_object:
- node = newelement("Type");
- addnode(node, newattr("type", "object"));
- lexnocomment();
- node = parsetypesuffix(tok, node);
- break;
- default:
- node = parseprimitiveorstringtype(tok);
- node = parsetypesuffix(tok, node);
- break;
- }
- return node;
-}
-
-/***********************************************************************
- * parseunionmembertype: parse UnionMemberType
- *
- * Enter: tok = next token
- *
- * Return: node for type
- * tok updated
- */
-static struct node *
-parseunionmembertype(struct tok *tok)
-{
- struct node *node;
- if (tok->type == TOK_any) {
- struct node *typenode = newelement("Type");
- addnode(typenode, newattr("type", "any"));
- lexnocomment();
- eat(tok, TOK_DOUBLEBRACKET);
- node = newelement("Type");
- addnode(node, newattr("type", "array"));
- addnode(node, typenode);
- lexnocomment();
- node = parsetypesuffix(tok, node);
- } else if (tok->type == '(') {
- node = parseuniontype(tok);
- } else {
- node = parsenonanytype(tok);
- }
- return node;
-}
-
-
-/***********************************************************************
- * parseuniontype : parse UnionType
- *
- * Enter: tok = next token
- *
- * Return: node for type
- * tok updated
- */
-static struct node *
-parseuniontype(struct tok *tok)
-{
- struct node *node;
- eat(tok, '(');
- node = newelement("Type");
- addnode(node, newattr("type", "union"));
- if (tok->type != ')') {
- for (;;) {
- addnode(node, parseunionmembertype(tok));
- if (tok->type != TOK_or)
- break;
- lexnocomment();
- }
- }
- eat(tok, ')');
- node = parsetypesuffix(tok, node);
- return node;
-}
-
-/***********************************************************************
- * parsetype : parse [44] Type
- *
- * Enter: tok = next token
- *
- * Return: node for type
- * tok updated
- */
-static struct node *
-parsetype(struct tok *tok)
-{
- struct node *node;
- if (tok->type == '(') {
- node = parseuniontype(tok);
- } else if (tok->type == TOK_any) {
- node = newelement("Type");
- addnode(node, newattr("type", "any"));
- lexnocomment();
- node = parsetypesuffixstartingwitharray(tok, node);
- } else {
- node = parsenonanytype(tok);
- }
- return node;
-}
-
-
-/***********************************************************************
- * parseextendedattribute : parse [39] ExtendedAttribute
- *
- * Enter: tok = next token
- *
- * Return: node for extended attribute
- *
- * This parses the various forms of extended attribute, as in
- * rules [57] [58] [59] [60] [61].
- *
- * This does not spot the error that you cannot have a ScopedName
- * and an ArgumentList.
- */
-static struct node *
-parseextendedattribute(struct tok *tok)
-{
- const char *start ;
- struct node *node = newelement("ExtendedAttribute");
- char *attrname = setidentifier(tok);
- addnode(node, newattr("name", attrname));
- start = tok->prestart;
- node->wsstart = start;
- node->end = tok->start + tok->len;
- if(!strcmp(attrname, "Constructor") || !strcmp(attrname, "NamedConstructor")) {
- setcommentnode(node);
- }
- lexnocomment();
- if (tok->type == '=') {
- lexnocomment();
- addnode(node, parsescopedname(tok, "value", 0));
- }
- if (tok->type == '(') {
- lexnocomment();
- addnode(node, parseargumentlist(tok));
- node->end = tok->start + tok->len;
- eat(tok, ')');
- }
- return node;
-}
-
-/***********************************************************************
- * parseextendedattributelist : parse [37] ExtendedAttributeList
- *
- * Enter: tok = next token
- *
- * Return: 0 else node for extended attribute list
- * tok updated if anything parsed
- */
-static struct node *
-parseextendedattributelist(struct tok *tok)
-{
- struct node *node;
- if (tok->type != '[')
- return 0;
- node = newelement("ExtendedAttributeList");
- for (;;) {
- lexnocomment();
- addnode(node, parseextendedattribute(tok));
- if (tok->type != ',')
- break;
- }
- if (tok->type != ']')
- tokerrorexit(tok, "expected ',' or ']'");
- lexnocomment();
- return node;
-}
-
-/***********************************************************************
- * parseexceptionfield : parse [36] ExceptionField
- *
- * Enter: tok = next token
- * eal = 0 else extended attribute list node
- *
- * Return: new node for the exceptionfield
- * tok updated
- */
-static struct node *
-parseexceptionfield(struct tok *tok, struct node *eal)
-{
- struct node *node = newelement("ExceptionField");
- if (eal) addnode(node, eal);
- setcommentnode(node);
- addnode(node, parsetype(tok));
- addnode(node, newattr("name", setidentifier(tok)));
- tok = lexnocomment();
- return node;
-}
-
-/***********************************************************************
- * parseargument : parse [31] Argument
- *
- * Enter: tok = next token
- *
- * Return: new node
- *
- * tok updated on return
- */
-static struct node *
-parseargument(struct tok *tok)
-{
- struct node *node = newelement("Argument");
- struct node *eal = parseextendedattributelist(tok);
- setcommentnode(node);
- if (eal) addnode(node, eal);
- if (tok->type == TOK_optional) {
- addnode(node, newattr("optional", "optional"));
- lexnocomment();
- }
- addnode(node, parsetype(tok));
- if (tok->type == TOK_ELLIPSIS) {
- addnode(node, newattr("ellipsis", "ellipsis"));
- lexnocomment();
- }
- addnode(node, newattr("name", setargumentname(tok)));
- lexnocomment();
- // Optional default value
- if (tok->type == '=') {
- tok = lexnocomment();
- node = parsedefaultvalue(tok, node);
- }
- return node;
-}
-
-/***********************************************************************
- * parseargumentlist : parse [29] ArgumentList
- *
- * Enter: tok = next token
- *
- * Return: new node for the arglist
- * tok updated
- */
-static struct node *
-parseargumentlist(struct tok *tok)
-{
- struct node *node = newelement("ArgumentList");
- /* We rely on the fact that ArgumentList is always followed by ')'. */
- if (tok->type != ')') {
- for (;;) {
- addnode(node, parseargument(tok));
- if (tok->type != ',')
- break;
- lexnocomment();
- }
- }
- return node;
-}
-
-
-/***********************************************************************
- * parseoperationrest : parse [25] OperationRest
- *
- * Enter: tok = next token
- * node
- *
- * Return: node
- * tok on terminating ';'
- */
-static struct node *
-parseoperationrest(struct tok *tok, struct node *node)
-{
- if (tok->type == TOK_IDENTIFIER) {
- addnode(node, newattr("name", setidentifier(tok)));
- lexnocomment();
- }
- eat(tok, '(');
- addnode(node, parseargumentlist(tok));
- eat(tok, ')');
- return node;
-}
-
-/***********************************************************************
- * parsereturntypeandoperationrest: parse ReturnType OperationRest
- * Enter: tok = next token
- * eal
- * attrs list of attributes
- * Return: node
- * tok on terminating ';'
- */
-static struct node *
-parsereturntypeandoperationrest(struct tok *tok, struct node *eal, struct node *attrs)
-{
- struct node *node = newelement("Operation");
- struct node *nodeType = parsereturntype(tok);
- if (eal) addnode(node, eal);
- setcommentnode(node);
- addnode(node, attrs);
- addnode(node, nodeType);
- return parseoperationrest(tok, node);
-}
-
-/***********************************************************************
- * parseiteratorrest : parse OptionalIteratorInterface
- *
- * Enter: tok = next token
- * node
- *
- * Return: node
- * tok on terminating ';'
- */
-static struct node *
-parseoptionaliteratorinterface(struct tok *tok, struct node *node)
-{
- if (tok->type == '=') {
- lexnocomment();
- addnode(node, newattr("interface", setidentifier(tok)));
- lexnocomment();
- }
- return node;
-}
-
-/***********************************************************************
- * parseoperationoriteratorrest : parse [25] OperationOrIteratorRest
- *
- * Enter: tok = next token
- * eal = 0 else extended attribute list node
- * attrs = list-of-attrs node containing attrs to add to new node
- *
- * Return: new node
- * tok on terminating ';'
- */
-static struct node *
-parseoperationoriteratorrest(struct tok *tok, struct node *eal, struct node *attrs)
-{
- struct node *node;
- struct node *nodeType = parsereturntype(tok);
- unsigned int isIterator = 0;
- if (tok->type == TOK_iterator) {
- lexnocomment();
- if (tok->type == TOK_object) {
- lexnocomment();
- node = newelement("IteratorObject");
- addnode(node, nodeType);
- return node;
- } else {
- node = newelement("Iterator");
- isIterator = 1;
- }
- } else {
- node = newelement("Operation");
- }
- if (eal) addnode(node, eal);
- setcommentnode(node);
- addnode(node, attrs);
- addnode(node, nodeType);
- if (isIterator)
- return parseoptionaliteratorinterface(tok, node);
- else
- return parseoperationrest(tok, node);
-}
-
-
-/***********************************************************************
- * parseattribute : parse [17] Attribute
- *
- * Enter: tok = next token ("readonly" or "attribute")
- * eal = 0 else extended attribute list node
- * attrs = list-of-attrs node containing attrs to add to new node
- *
- * Return: node
- * tok on terminating ';'
- */
-static struct node *
-parseattribute(struct tok *tok, struct node *eal, struct node *attrs)
-{
- struct node *node = newelement("Attribute");
- if (eal) addnode(node, eal);
- setcommentnode(node);
- addnode(node, attrs);
- if (tok->type == TOK_inherit) {
- lexnocomment();
- addnode(node, newattr("inherit", "inherit"));
- }
- if (tok->type == TOK_readonly) {
- lexnocomment();
- addnode(node, newattr("readonly", "readonly"));
- }
- eat(tok, TOK_attribute);
- addnode(node, parsetype(tok));
- addnode(node, newattr("name", setidentifier(tok)));
- lexnocomment();
- return node;
-}
-
-/***********************************************************************
- * parseserializer : parse Serializer
- *
- * Enter: tok = next token
- * eal
- *
- * Return: node updated with value
- * tok updated
- */
-static struct node *
-parseserializer (struct tok *tok, struct node *eal) {
- struct node *nodeAttribute;
- struct node *node = newelement("Serializer");
- if (tok->type == '=') {
- if (eal) addnode(node, eal);
- lexnocomment();
- if (tok->type == TOK_IDENTIFIER) {
- addnode(node, newattr("attribute", setidentifier(tok)));
- lexnocomment();
- } else if (tok->type == '{') {
- unsigned int done = 0;
- struct node *nodeMap = newelement("Map");
- lexnocomment();
- if (tok->type == TOK_getter) {
- addnode(nodeMap, newattr("pattern", "getter"));
- done = 1;
- } else if (tok->type == TOK_attribute) {
- addnode(nodeMap, newattr("pattern", "all"));
- done = 1;
- } else if (tok->type == TOK_inherit) {
- addnode(nodeMap, newattr("inherit", "inherit"));
- lexnocomment();
- eat(tok, ',');
- if (tok->type == TOK_attribute) {
- addnode(nodeMap, newattr("pattern", "all"));
- done = 1;
- }
- } else if (tok->type != TOK_IDENTIFIER) {
- tokerrorexit(tok, "expected 'attribute', 'getter', 'inherit' or attribute identifiers in serializer map");
- }
- if (done) {
- lexnocomment();
- eat(tok, '}');
- } else {
- addnode(nodeMap, newattr("pattern", "selection"));
- do {
- if (tok->type != TOK_IDENTIFIER)
- tokerrorexit(tok, "expected attribute identifiers in serializer map %s", tok->prestart);
- nodeAttribute = newelement("PatternAttribute");
- addnode(nodeAttribute, newattr("name", setidentifier(tok)));
- addnode(nodeMap, nodeAttribute);
- lexnocomment();
- if (tok->type == ',')
- lexnocomment();
- } while (tok->type != '}');
- eat(tok, '}');
- }
- addnode(node, nodeMap);
- } else if (tok->type == '[') {
- struct node *nodeList = newelement("List");
- lexnocomment();
- if (tok->type == TOK_getter) {
- addnode(nodeList, newattr("pattern", "getter"));
- lexnocomment();
- eat(tok, ']');
- } else {
- addnode(nodeList, newattr("pattern", "selection"));
- do {
- if (tok->type != TOK_IDENTIFIER)
- tokerrorexit(tok, "expected attribute identifiers in serializer list");
- nodeAttribute = newelement("PatternAttribute");
- addnode(nodeAttribute, newattr("name", setidentifier(tok)));
- addnode(nodeList, nodeAttribute);
- lexnocomment();
- if (tok->type == ',')
- lexnocomment();
- } while (tok->type != ']');
- eat(tok, ']');
- }
- addnode(node, nodeList);
- } else {
- tokerrorexit(tok, "Expected '{', '[' or an attribute identifier in the serializer declaration");
- }
- return node;
- } else {
- if (eal) addnode(node, eal);
- return node;
- }
-}
-
-/***********************************************************************
- * parseattributeoroperationoriterator : parse [15] AttributeOrOperationOrIterator
- *
- * Enter: tok = next token
- * eal = 0 else extended attribute list node
- *
- * Return: new node
- * tok on terminating ';'
- */
-static struct node *
-parseattributeoroperationoriterator(struct tok *tok, struct node *eal)
-{
- int alreadyseen ;
- struct node *attrs = newattrlist();
- if (tok->type == TOK_serializer) {
- lexnocomment();
- if (tok->type == '=' || tok->type ==';') {
- return parseserializer(tok, eal);
- } else {
- addnode(attrs, newattr("serializer", "serializer"));
- return parsereturntypeandoperationrest(tok, eal, attrs);
- }
- }
- if (tok->type == TOK_stringifier) {
- addnode(attrs, newattr("stringifier", "stringifier"));
- lexnocomment();
- if (tok->type == ';') {
- struct node *node = newelement("Stringifier");
- if (eal) addnode(node, eal);
- return node;
- }
- }
- if (tok->type == TOK_static) {
- lexnocomment();
- addnode(attrs, newattr("static", "static"));
- }
- if (tok->type == TOK_inherit || tok->type == TOK_readonly || tok->type == TOK_attribute)
- return parseattribute(tok, eal, attrs);
- if (!nodeisempty(attrs))
- return parsereturntypeandoperationrest(tok, eal, attrs);
- alreadyseen = 0;
- for (;;) {
- static const int t[] = { TOK_getter,
- TOK_setter, TOK_creator, TOK_deleter, TOK_legacycaller,
- 0 };
- const int *tt = t;
- char *s;
- while (*tt && *tt != tok->type)
- tt++;
- if (!*tt)
- break;
- s = memprintf("%.*s", tok->len, tok->start);
- if (alreadyseen & (1 << (tt - t)))
- tokerrorexit(tok, "'%s' qualifier cannot be repeated", s);
- alreadyseen |= 1 << (tt - t);
- addnode(attrs, newattr(s, s));
- lexnocomment();
- }
- if (!nodeisempty(attrs))
- return parsereturntypeandoperationrest(tok, eal, attrs);
- else
- return parseoperationoriteratorrest(tok, eal, attrs);
-}
-
-
-/***********************************************************************
- * parseconstexpr : parse ConstValue
- *
- * Enter: tok = next token
- * node
- *
- * Return: node updated with value
- * tok updated
- */
-static struct node *
-parseconstexpr (struct tok *tok, struct node *node) {
- char *s;
- switch(tok->type) {
- case TOK_true:
- case TOK_false:
- case TOK_minusinfinity:
- case TOK_INTEGER:
- case TOK_FLOAT:
- case TOK_null:
- case TOK_infinity:
- case TOK_NaN:
- break;
- default:
- tokerrorexit(tok, "expected constant value");
- break;
- }
- s = memalloc(tok->len + 1);
- memcpy(s, tok->start, tok->len);
- s[tok->len] = 0;
- if (tok->type != TOK_STRING) {
- addnode(node, newattr("value", s));
- } else {
- addnode(node, newattr("stringvalue", s));
- }
- lexnocomment();
- return node;
-}
-
-/***********************************************************************
- * parsedefaultvalue : parse DefaultValue
- *
- * Enter: tok = next token
- * node
- *
- * Return: node updated with value
- * tok updated
- */
-static struct node *
-parsedefaultvalue (struct tok *tok, struct node *node) {
- char *s;
- if (tok->type == TOK_STRING) {
- s = memalloc(tok->len + 1);
- memcpy(s, tok->start, tok->len);
- s[tok->len] = 0;
- addnode(node, newattr("stringvalue", s));
- lexnocomment();
- return node;
- } else {
- return parseconstexpr(tok, node);
- }
-}
-
-
-
-/***********************************************************************
- * parsedictionarymember : parse DictionaryMember
- *
- * Enter: tok = next token
- * eal = 0 else extended attribute list node
- *
- * Return: new node
- * tok on terminating ';'
- */
-static struct node *
-parsedictionarymember(struct tok *tok, struct node *eal)
-{
- struct node *node = newelement("DictionaryMember");
- if (eal) addnode(node, eal);
- setcommentnode(node);
- addnode(node, parsetype(tok));
- addnode(node, newattr("name", setidentifier(tok)));
- tok = lexnocomment();
- // Optional value
- if (tok->type == '=') {
- tok = lexnocomment();
- node = parsedefaultvalue(tok, node);
- }
- return node;
-}
-
-/***********************************************************************
- * parseconst : parse [12] Const
- *
- * Enter: tok = next token, known to be TOK_const
- * eal = 0 else extended attribute list node
- *
- * Return: new node for the const
- * tok on terminating ';'
- */
-static struct node *
-parseconst(struct tok *tok, struct node *eal)
-{
- struct node *node = newelement("Const");
- setcommentnode(node);
- if (eal) addnode(node, eal);
- tok = lexnocomment();
- switch(tok->type) {
- case TOK_boolean:
- case TOK_byte:
- case TOK_octet:
- case TOK_float:
- case TOK_double:
- case TOK_unsigned:
- case TOK_unrestricted:
- case TOK_short:
- case TOK_long:
- addnode(node, parsetype(tok));
- break;
- default:
- tokerrorexit(tok, "expected acceptable constant type");
- break;
- }
- addnode(node, newattr("name", setidentifier(tok)));
- tok = lexnocomment();
- eat(tok, '=');
- node = parseconstexpr(tok, node);
- return node;
-}
-
-/***********************************************************************
- * parseimplementsstatement : parse [11] ImplementsStatement
- *
- * Enter: tok = next token, known to be :: or TOK_IDENTIFIER
- * eal = 0 else extended attribute list node
- *
- * Return: new node for the typedef
- * tok updated to the terminating ';'
- */
-static struct node *
-parseimplementsstatement(struct tok *tok, struct node *eal)
-{
- struct node *node = newelement("Implements");
- setcommentnode(node);
- if (eal) addnode(node, eal);
- addnode(node, parsescopedname(tok, "name1", 1));
- eat(tok, TOK_implements);
- addnode(node, parsescopedname(tok, "name2", 1));
- return node;
-}
-
-/***********************************************************************
- * parsetypedef : parse [10] Typedef
- *
- * Enter: tok = next token, known to be TOK_typedef
- * eal = 0 else extended attribute list node
- *
- * Return: new node for the typedef
- * tok updated to the terminating ';'
- */
-static struct node *
-parsetypedef(struct tok *tok, struct node *eal)
-{
-struct node *ealtype;
-struct node *typenode;
- struct node *node = newelement("Typedef");
- setcommentnode(node);
- if (eal) addnode(node, eal);
- tok = lexnocomment();
- ealtype = parseextendedattributelist(tok);
- typenode = parsetype(tok);
- if (ealtype) addnode(typenode, ealtype);
- addnode(node, typenode);
- addnode(node, newattr("name", setidentifier(tok)));
- tok = lexnocomment();
- return node;
-}
-
-/***********************************************************************
- * parseexception : parse [8] Exception
- *
- * Enter: tok = next token, known to be TOK_exception
- * eal = 0 else extended attribute list node
- *
- * Return: new node for the exception
- * tok updated to the terminating ';'
- */
-static struct node *
-parseexception(struct tok *tok, struct node *eal)
-{
- struct node *node = newelement("Exception");
- setcommentnode(node);
- if (eal) addnode(node, eal);
- tok = lexnocomment();
- addnode(node, newattr("name", setidentifier(tok)));
- lexnocomment();
- if (tok->type == ':') {
- lexnocomment();
- addnode(node, parsescopednamelist(tok, "ExceptionInheritance", "Name", 1));
- }
- eat(tok, '{');
- while (tok->type != '}') {
- const char *start = tok->prestart;
- struct node *node2;
- struct node *eal = parseextendedattributelist(tok);
- if (tok->type == TOK_const)
- node2 = parseconst(tok, eal);
- else
- node2 = parseexceptionfield(tok, eal);
- addnode(node, node2);
- node2->wsstart = start;
- node2->end = tok->start + tok->len;
- setid(node2);
- eat(tok, ';');
- }
- lexnocomment();
- return node;
-}
-
-/***********************************************************************
- * parseinterface : parse [4] Interface
- *
- * Enter: tok = next token, known to be TOK_interface
- * eal = 0 else extended attribute list node
- *
- * Return: new node for the interface
- * tok updated to the terminating ';'
- */
-static struct node *
-parseinterface(struct tok *tok, struct node *eal)
-{
- struct node *node = newelement("Interface");
- if (eal) addnode(node, eal);
- setcommentnode(node);
- tok = lexnocomment();
- addnode(node, newattr("name", setidentifier(tok)));
- tok = lexnocomment();
- if (tok->type == ':') {
- lexnocomment();
- addnode(node, parsescopednamelist(tok, "InterfaceInheritance", "Name", 1));
- }
- eat(tok, '{');
- while (tok->type != '}') {
- const char *start = tok->prestart;
- struct node *eal = parseextendedattributelist(tok);
- struct node *node2;
- if (tok->type == TOK_const)
- addnode(node, node2 = parseconst(tok, eal));
- else
- addnode(node, node2 = parseattributeoroperationoriterator(tok, eal));
- node2->wsstart = start;
- node2->end = tok->start + tok->len;
- setid(node2);
- eat(tok, ';');
- }
- lexnocomment();
- return node;
-}
-
-/***********************************************************************
- * parsecallback : parse Callback
- *
- * Enter: tok = next token, known to be TOK_dictionary
- * eal = 0 else extended attribute list node
- *
- * Return: new node for the enum
- * tok updated to the terminating ';'
- */
-static struct node *
-parsecallback(struct tok *tok, struct node *eal)
-{
- struct node *node;
- if (tok->type == TOK_interface) {
- node = parseinterface(tok, eal);
- addnode(node, newattr("callback", "callback"));
- } else {
- node = newelement("Callback");
- if (eal) addnode(node, eal);
- setcommentnode(node);
- addnode(node, newattr("name", setidentifier(tok)));
- tok = lexnocomment();
- eat(tok, '=');
- addnode(node, parsereturntype(tok));
- eat(tok, '(');
- addnode(node, parseargumentlist(tok));
- eat(tok, ')');
- }
- return node;
-}
-
-/***********************************************************************
- * parsedictionary : parse Dictionary
- *
- * Enter: tok = next token, known to be TOK_dictionary
- * eal = 0 else extended attribute list node
- *
- * Return: new node for the dictionary
- * tok updated to the terminating ';'
- */
-static struct node *
-parsedictionary(struct tok *tok, struct node *eal)
-{
- struct node *node = newelement("Dictionary");
- if (eal) addnode(node, eal);
- setcommentnode(node);
- tok = lexnocomment();
- addnode(node, newattr("name", setidentifier(tok)));
- tok = lexnocomment();
- if (tok->type == ':') {
- lexnocomment();
- addnode(node, parsescopednamelist(tok, "DictionaryInheritance", "Name", 1));
- }
- eat(tok, '{');
- while (tok->type != '}') {
- const char *start = tok->prestart;
- struct node *eal = parseextendedattributelist(tok);
- struct node *node2;
- if (tok->type == TOK_const)
- addnode(node, node2 = parseconst(tok, eal));
- else
- addnode(node, node2 = parsedictionarymember(tok, eal));
- node2->wsstart = start;
- node2->end = tok->start + tok->len;
- setid(node2);
- eat(tok, ';');
- }
- lexnocomment();
- return node;
-}
-
-/***********************************************************************
- * parseenum : parse Enum
- *
- * Enter: tok = next token, known to be TOK_dictionary
- * eal = 0 else extended attribute list node
- *
- * Return: new node for the enum
- * tok updated to the terminating ';'
- */
-static struct node *
-parseenum(struct tok *tok, struct node *eal)
-{
- char *s;
- struct node *node = newelement("Enum");
- if (eal) addnode(node, eal);
- setcommentnode(node);
- tok = lexnocomment();
- addnode(node, newattr("name", setidentifier(tok)));
- tok = lexnocomment();
- eat(tok, '{');
- while (tok->type != '}') {
- if (tok->type == TOK_STRING) {
- const char *start = tok->prestart;
- struct node *node2 = newelement("EnumValue");
- setcommentnode(node2);
-
- s = memalloc(tok->len + 1);
- memcpy(s, tok->start, tok->len);
- s[tok->len] = 0;
- addnode(node2, newattr("stringvalue", s));
- node2->wsstart = start;
- node2->end = tok->start + tok->len;
- setid(node2);
- addnode(node, node2);
- } else {
- tokerrorexit(tok, "expected string in enum");
- }
- lexnocomment();
- if (tok->type == ',') {
- lexnocomment();
- }
- }
- eat(tok, '}');
- return node;
-}
-
-/***********************************************************************
- * parsedefinitions : parse [1] Definitions
- *
- * Enter: tok = next token
- * parent = parent node to add definitions to
- *
- * On return, tok has been updated.
- */
-static void
-parsedefinitions(struct tok *tok, struct node *parent)
-{
- parent->wsstart = tok->prestart;
- for (;;) {
- const char *wsstart = tok->prestart;
- struct node *eal = parseextendedattributelist(tok);
- struct node *node;
- switch (tok->type) {
- case TOK_partial:
- eat(tok, TOK_partial);
- if (tok->type == TOK_dictionary) {
- node = parsedictionary(tok, eal);
- } else {
- node = parseinterface(tok, eal);
- }
- addnode(node, newattr("partial", "partial"));
- break;
- case TOK_interface:
- node = parseinterface(tok, eal);
- break;
- case TOK_callback:
- eat(tok, TOK_callback);
- node = parsecallback(tok, eal);
- break;
- case TOK_dictionary:
- node = parsedictionary(tok, eal);
- break;
- case TOK_enum:
- node = parseenum(tok, eal);
- break;
- case TOK_exception:
- node = parseexception(tok, eal);
- break;
- case TOK_typedef:
- node = parsetypedef(tok, eal);
- break;
- case TOK_IDENTIFIER:
- node = parseimplementsstatement(tok, eal);
- break;
- default:
- if (eal)
- tokerrorexit(tok, "expected definition after extended attribute list");
- node = 0;
- break;
- }
- if (!node)
- break;
- node->wsstart = wsstart;
- node->end = tok->start + tok->len;
- eat(tok, ';');
- addnode(parent, node);
- setid(node);
- parent->end = node->end;
- }
-}
-
-/***********************************************************************
- * parse
- *
- * Return: root element containing (possibly empty) list of definitions
- */
-struct node *
-parse(void)
-{
- struct tok *tok;
- struct node *root = newelement("Definitions");
- setcommentnode(root);
- tok = lexnocomment();
- parsedefinitions(tok, root);
- if (tok->type != TOK_EOF)
- tokerrorexit(tok, "expected end of input");
- reversechildren(root);
- return root;
-}
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/parse.h b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/parse.h
deleted file mode 100644
index ad9071b453e..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/parse.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#ifndef parse_h
-#define parse_h
-
-struct node *parse(void);
-
-#endif /* ndef parse_h */
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/process.c b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/process.c
deleted file mode 100644
index d6a343b8aa0..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/process.c
+++ /dev/null
@@ -1,319 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include "comment.h"
-#include "lex.h"
-#include "misc.h"
-#include "node.h"
-#include "os.h"
-#include "parse.h"
-#include "process.h"
-
-#if 0
-static const char ntnames[] = { NTNAMES };
-#endif /*0*/
-
-/***********************************************************************
- * printtext : print text with xml entity escapes
- *
- * Enter: s = text
- * len = number of bytes
- * escamp = whether to escape &
- *
- * This also escapes double quote mark so it can be used for an
- * attribute value. It also turns a tab into spaces.
- */
-void
-printtext(const char *s, unsigned int len, int escamp)
-{
- const char *p = s, *end = s + len;
- unsigned int count = 0;
- while (p != end) {
- int ch = *p;
- char buf[9];
- const char *seq = 0;
- count++;
- switch (ch) {
- case '<':
- seq = "&lt;";
- break;
- case '&':
- seq = escamp ? "&amp;" : "&";
- break;
- case '"':
- seq = "&quot;";
- break;
- case '\n':
- p++;
- count = 0;
- continue;
- case '\t':
- seq = " " + ((count - 1) & 7);
- count = 0;
- break;
- default:
- if ((unsigned char)ch >= 0x20) {
- p++;
- continue;
- }
- snprintf(buf, 9, "&#%i;", ch);
- seq = buf;
- break;
- }
- if (p - s != fwrite(s, 1, p - s, stdout))
- errorexit("write error");
- fputs(seq, stdout);
- s = ++p;
- }
- if (p - s != fwrite(s, 1, p - s, stdout))
- errorexit("write error");
-}
-
-#if 0
-/***********************************************************************
- * outputnodeastext : output parse node and descendants as deparsed text
- *
- * Enter: node = parse node
- * needspace = true if last output char was an identifier char
- *
- * Return: updated needspace value
- */
-static int
-outputnodeastext(struct node *node, int needspace)
-{
- if (node->type >= NT_START) {
- struct node *child = node->children;
- while (child) {
- needspace = outputnodeastext(child, needspace);
- child = child->next;
- }
- } else {
- unsigned int len = strlen(node->name);
- if (len) {
- int ch = node->name[0];
- if (ch == '_' || ((unsigned)(ch - '0') < 10
- || (unsigned)((ch & ~0x20) - 'A') < 26))
- {
- if (needspace) putchar(' ');
- }
- ch = node->name[len - 1];
- if (ch == '_' || ((unsigned)(ch - '0') < 10
- || (unsigned)((ch & ~0x20) - 'A') < 26))
- {
- needspace = 1;
- }
- printtext(node->name, len, 1);
- }
- }
- return needspace;
-}
-
-/***********************************************************************
- * printfqid : print fully-qualified id
- *
- * Enter: node struct
- *
- * Return: whether anything printed
- */
-static int
-printfqid(struct node *node)
-{
- int any = 0;
- struct node *identifier;
- if (node->parent) {
- any = printfqid(node->parent);
- }
- switch (node->type) {
- case NT_Module:
- case NT_Interface:
- case NT_Typedef:
- case NT_Operation:
- case NT_Attribute:
- case NT_Const:
- if (any)
- printf(":");
- /* Find identifier child if any. */
- identifier = node->children;
- while (identifier) {
- if (identifier->type == TOK_IDENTIFIER)
- break;
- if (identifier->type == NT_TypedefRest) {
- identifier = identifier->children;
- continue;
- }
- identifier = identifier->next;
- }
- if (identifier) {
- printtext(identifier->name, strlen(identifier->name), 1);
- any = 1;
- }
- break;
- }
- return any;
-}
-
-/***********************************************************************
- * output : output subtree of parse tree
- *
- * Enter: node = root of subtree
- * extendedattributelist = 0 else extended attribute list node
- * applying to node
- * indent = indent (nesting) level
- */
-static void outputchildren(struct node *node, struct node *identifier, unsigned int indent);
-
-static void
-output(struct node *node, struct node *extendedattributelist,
- unsigned int indent)
-{
- if (extendedattributelist) {
- node->wsstart = extendedattributelist->wsstart;
- node->start = extendedattributelist->start;
- }
- if (node->type == NT_ExtendedAttribute) {
- printf("%*s<ExtendedAttribute value=\"", indent, "");
- outputnodeastext(node, 0);
- printf("\"/>\n");
- } else if (node->type == NT_BooleanLiteral) {
- printf("%*s<BooleanLiteral value=\"%s\"/>", indent, "",
- node->children->name);
- } else if (node->type == NT_ReadOnly) {
- printf("%*s<ReadOnly/>\n", indent, "");
- } else if (node->type >= NT_START) {
- const char *ntname;
- /* Find identifier child if any. */
- struct node *identifier = node->children;
- while (identifier) {
- if (identifier->type == TOK_IDENTIFIER)
- break;
- identifier = identifier->next;
- }
- /* Find nonterminal name. */
- ntname = ntnames + 2;
- while (node->type - NT_START != ((unsigned char)ntname[-2] | (unsigned char)ntname[-1] << 8))
- ntname += strlen(ntname) + 3;
- /* Output start of element. */
- printf("%*s<%s", indent, "", ntname);
- /* Output identifier if any as attribute. */
- if (identifier) {
- printf(" identifier=\"");
- printtext(identifier->name, strlen(identifier->name), 1);
- printf("\"");
- }
- switch (node->type) {
- case NT_Module:
- case NT_Interface:
- case NT_Typedef:
- case NT_Const:
- /* Output fully qualified id. */
- printf(" fqid=\"");
- printfqid(node);
- printf("\"");
- break;
- }
- if (!identifier && !extendedattributelist && !node->children && !node->comments)
- printf("/>\n");
- else {
- printf(">\n");
- /* Output descriptive elements (doxygen comments) for node. */
- outputdescriptive(node, indent + 2);
- /* Output descriptive elements (doxygen comments) for identifier. */
- if (identifier)
- outputdescriptive(identifier, indent + 2);
- /* Output extended attribute list. */
- if (extendedattributelist)
- output(extendedattributelist, 0, indent + 2);
- /* Output children (excluding identifier child). */
- outputchildren(node, identifier, indent + 2);
- printf("%*s</%s>\n", indent, "", ntname);
- }
- } else switch (node->type) {
- case TOK_DOMString:
- case TOK_any:
- case TOK_boolean:
- case TOK_octet:
- case TOK_float:
- case TOK_double:
- case TOK_Object:
- case TOK_unsigned:
- case TOK_short:
- case TOK_long:
- case TOK_void:
- printf("%*s<%s/>\n", indent, "", node->name);
- break;
- case TOK_INTEGER:
- printf("%*s<integer value=\"", indent, "");
- printtext(node->name, strlen(node->name), 1);
- printf("\"/>\n");
- break;
- case TOK_FLOAT:
- printf("%*s<Float value=\"", indent, "");
- printtext(node->name, strlen(node->name), 1);
- printf("\"/>\n");
- break;
- case TOK_STRING:
- printf("%*s<string value=\"", indent, "");
- printtext(node->name, strlen(node->name), 1);
- printf("\"/>\n");
- break;
- }
-}
-
-/***********************************************************************
- * outputchildren : call output for each child of node
- *
- * Enter: node
- * identifier = child node to omit from output
- * indent = indent (nesting) level
- */
-static void
-outputchildren(struct node *node, struct node *identifier, unsigned int indent)
-{
- struct node *extendedattributelist;
- struct node *child;
- child = node->children;
- extendedattributelist = 0;
- while (child) {
- if (child->type == NT_ExtendedAttributeList && node->type != NT_Argument)
- extendedattributelist = child;
- else {
- if (identifier != child)
- output(child, extendedattributelist, indent);
- extendedattributelist = 0;
- }
- child = child->next;
- }
-}
-#endif /*0*/
-
-/***********************************************************************
- * processfiles : process input files
- *
- * Enter: name = filename
- */
-void
-processfiles(const char *const *names, int dtdref)
-{
- struct node *root;
- readinput(names);
- root = parse();
- processcomments(root);
- printf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- if(dtdref)
- printf("<!DOCTYPE Definitions SYSTEM \"widlprocxml.dtd\">\n");
- outputnode(root, 0);
-}
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/process.h b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/process.h
deleted file mode 100644
index bb92b22ce13..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/process.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/***********************************************************************
- * $Id$
- * Copyright 2009 Aplix Corporation. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***********************************************************************/
-#ifndef process_h
-#define process_h
-
-#if 0
-#define NT_START 0x100
-#include "nonterminals.h"
-#endif/*0*/
-
-void printtext(const char *s, unsigned int len, int escamp);
-
-void processfiles(const char *const *names, int dtdref);
-
-#endif /* ndef process_h */
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/widlprocxmltohtml.xsl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/widlprocxmltohtml.xsl
deleted file mode 100644
index 2b583371e7d..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/src/widlprocxmltohtml.xsl
+++ /dev/null
@@ -1,828 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--====================================================================
-$Id: widlprocxmltohtml.xsl 407 2009-10-26 13:48:48Z tpr $
-Copyright 2009 Aplix Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-XSLT stylesheet to convert widlprocxml into html documentation.
-=====================================================================-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-<xsl:output method="html" encoding="utf-8" indent="yes" doctype-public="html"/>
-
-<xsl:param name="date" select="'error: missing date'"/>
-
-<xsl:variable name="title" select="concat('The ',/Definitions/descriptive/name,' Module - Version ',/Definitions/descriptive/version)"/>
-
-<!--Root of document.-->
-<xsl:template match="/">
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="widlhtml.css" media="screen"/>
- <title>
- <xsl:value-of select="$title"/>
- </title>
- </head>
- <body>
- <xsl:apply-templates/>
- </body>
- </html>
-</xsl:template>
-
-<!--Root of Definitions.-->
-<xsl:template match="Definitions">
- <div class="api" id="{@id}">
- <a href="http://bondi.omtp.org"><img src="http://www.omtp.org/images/BondiSmall.jpg" alt="Bondi logo"/></a>
- <h1><xsl:value-of select="$title"/></h1>
- <h3>12 May 2009</h3>
-
- <h2>Authors</h2>
- <ul class="authors">
- <xsl:apply-templates select="descriptive/author"/>
- </ul>
-
- <p class="copyright"><small>© The authors, 2012. All rights reserved.</small></p>
-
- <hr/>
-
- <h2>Abstract</h2>
-
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="descriptive/description"/>
- <xsl:apply-templates select="descriptive/Code"/>
-
- <h2>Table of Contents</h2>
- <ul class="toc">
- <li><a href="#intro">Introduction</a>
- <ul>
- <xsl:if test="descriptive/def-api-feature-set">
- <li><a href="#def-api-feature-sets">Feature set</a></li>
- </xsl:if>
- <xsl:if test="descriptive/def-api-feature">
- <li><a href="#def-api-features">Features</a></li>
- </xsl:if>
- <xsl:if test="descriptive/def-device-cap">
- <li><a href="#def-device-caps">Device Capabilities</a></li>
- </xsl:if>
- </ul>
- </li>
- <xsl:if test="Typedef">
- <li><a href="#typedefs">Type Definitions</a>
- <ul class="toc">
- <xsl:for-each select="Typedef[descriptive]">
- <li><a href="#{@id}"><code><xsl:value-of select="@name"/></code></a></li>
- </xsl:for-each>
- </ul>
- </li>
- </xsl:if>
- <xsl:if test="Interface">
- <li><a href="#interfaces">Interfaces</a>
- <ul class="toc">
- <xsl:for-each select="Interface[descriptive]">
- <li><a href="#{@id}"><code><xsl:value-of select="@name"/></code></a></li>
- </xsl:for-each>
- </ul>
- </li>
- </xsl:if>
- <xsl:if test="Dictionary">
- <li><a href="#dictionaries">Dictionary types</a>
- <ul class="toc">
- <xsl:for-each select="Dictionary[descriptive]">
- <li><a href="#{@id}"><code><xsl:value-of select="@name"/></code></a></li>
- </xsl:for-each>
- </ul>
- </li>
- </xsl:if>
- <xsl:if test="Callback">
- <li><a href="#callbacks">Callbacks</a>
- <ul class="toc">
- <xsl:for-each select="Callback[descriptive]">
- <li><a href="#{@id}"><code><xsl:value-of select="@name"/></code></a></li>
- </xsl:for-each>
- </ul>
- </li>
- </xsl:if>
- <xsl:if test="Enum">
- <li><a href="#enums">Enums</a>
- <ul class="toc">
- <xsl:for-each select="Enum[descriptive]">
- <li><a href="#{@id}"><code><xsl:value-of select="@name"/></code></a></li>
- </xsl:for-each>
- </ul>
- </li>
- </xsl:if>
- </ul>
-
- <hr/>
-
- <h2>Summary of Methods</h2>
- <xsl:call-template name="summary"/>
-
- <h2 id="intro">Introduction</h2>
-
- <xsl:apply-templates select="descriptive/description"/>
- <xsl:apply-templates select="descriptive/Code"/>
-
- <xsl:if test="descriptive/def-api-feature-set">
- <div id="def-api-feature-sets" class="def-api-feature-sets">
- <h3 id="features">Feature set</h3>
- <p>This is the URI used to declare this API's feature set, for use in bondi.requestFeature. For the URL, the list of features included by the feature set is provided.</p>
- <xsl:apply-templates select="descriptive/def-api-feature-set"/>
- </div>
- </xsl:if>
- <xsl:if test="descriptive/def-api-feature">
- <div id="def-api-features" class="def-api-features">
- <h3 id="features">Features</h3>
- <p>This is the list of URIs used to declare this API's features, for use in bondi.requestFeature. For each URL, the list of functions covered is provided.</p>
- <xsl:apply-templates select="Interface/descriptive/def-instantiated"/>
- <xsl:apply-templates select="descriptive/def-api-feature"/>
- </div>
- </xsl:if>
- <xsl:if test="descriptive/def-device-cap">
- <div class="def-device-caps" id="def-device-caps">
- <h3>Device capabilities</h3>
- <dl>
- <xsl:apply-templates select="descriptive/def-device-cap"/>
- </dl>
- </div>
- </xsl:if>
- <xsl:if test="Typedef">
- <div class="typedefs" id="typedefs">
- <h2>Type Definitions</h2>
- <xsl:apply-templates select="Typedef[descriptive]"/>
- </div>
- </xsl:if>
- <xsl:if test="Interface">
- <div class="interfaces" id="interfaces">
- <h2>Interfaces</h2>
- <xsl:apply-templates select="Interface"/>
- </div>
- </xsl:if>
- <xsl:if test="Dictionary">
- <div class="dictionaries" id="dictionaries">
- <h2>Dictionary types</h2>
- <xsl:apply-templates select="Dictionary"/>
- </div>
- </xsl:if>
- <xsl:if test="Callback">
- <div class="callbacks" id="callbacks">
- <h2>Callbacks</h2>
- <xsl:apply-templates select="Callback"/>
- </div>
- </xsl:if>
- <xsl:if test="Enum">
- <div class="enums" id="enums">
- <h2>Enums</h2>
- <xsl:apply-templates select="Enum"/>
- </div>
- </xsl:if>
- </div>
-</xsl:template>
-
-<!--def-api-feature-set-->
-<xsl:template match="def-api-feature-set">
- <dl class="def-api-feature-set">
- <dt><xsl:value-of select="@identifier"/></dt>
- <dd>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="descriptive/Code"/>
- <xsl:if test="descriptive/api-feature">
- <div class="api-features">
- <p>
- Includes API features:
- </p>
- <ul>
- <xsl:for-each select="descriptive/api-feature">
- <li><code><xsl:value-of select="@identifier"/></code></li>
- </xsl:for-each>
- </ul>
- </div>
- </xsl:if>
- </dd>
- </dl>
-</xsl:template>
-
-<!--def-api-feature-->
-<xsl:template match="def-api-feature">
- <dl class="def-api-feature">
- <dt><xsl:value-of select="@identifier"/></dt>
- <dd>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="descriptive/Code"/>
- <xsl:if test="descriptive/device-cap">
- <div class="device-caps">
- <p>
- Device capabilities:
- </p>
- <ul>
- <xsl:for-each select="descriptive/device-cap">
- <li><code><xsl:value-of select="@identifier"/></code></li>
- </xsl:for-each>
- </ul>
- </div>
- </xsl:if>
- </dd>
- </dl>
-</xsl:template>
-
-<!--def-device-cap-->
-<xsl:template match="def-device-cap">
- <dt class="def-device-cap"><code><xsl:value-of select="@identifier"/></code></dt>
- <dd>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="descriptive/Code"/>
- <xsl:if test="descriptive/param">
- <div class="device-caps">
- <p>Security parameters:</p>
- <ul>
- <xsl:apply-templates select="descriptive/param"/>
- </ul>
- </div>
- </xsl:if>
- </dd>
-</xsl:template>
-
-<!--Exception: not implemented-->
-<!--Valuetype: not implemented-->
-<xsl:template match="Exception|Valuetype|Const">
- <xsl:if test="descriptive">
- <xsl:message terminate="yes">element <xsl:value-of select="name()"/> not supported</xsl:message>
- </xsl:if>
-</xsl:template>
-
-<!--Typedef.-->
-<xsl:template match="Typedef[descriptive]">
- <div class="typedef" id="{@id}">
- <h3>2.<xsl:number value="position()"/>. <code><xsl:value-of select="@name"/></code></h3>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="webidl"/>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="descriptive/Code"/>
- </div>
-</xsl:template>
-
-<!--Interface.-->
-<xsl:template match="Interface[descriptive]">
- <xsl:variable name="name" select="@name"/>
- <div class="interface" id="{@id}">
- <h3><code><xsl:value-of select="@name"/></code></h3>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="webidl"/>
- <xsl:apply-templates select="../Implements[@name2=$name]/webidl"/>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="descriptive/Code"/>
- <xsl:apply-templates select="InterfaceInheritance"/>
- <xsl:if test="Const/descriptive">
- <div class="consts">
- <h4>Constants</h4>
- <dl>
- <xsl:apply-templates select="Const"/>
- </dl>
- </div>
- </xsl:if>
- <xsl:if test="ExtendedAttributeList/ExtendedAttribute/descriptive">
- <div class="constructors">
- <h4>Constructors</h4>
- <dl>
- <xsl:apply-templates select="ExtendedAttributeList/ExtendedAttribute"/>
- </dl>
- </div>
- </xsl:if>
- <xsl:if test="Attribute/descriptive">
- <div class="attributes">
- <h4>Attributes</h4>
- <dl>
- <xsl:apply-templates select="Attribute"/>
- </dl>
- </div>
- </xsl:if>
- <xsl:if test="Operation/descriptive">
- <div class="methods">
- <h4>Methods</h4>
- <dl>
- <xsl:apply-templates select="Operation"/>
- </dl>
- </div>
- </xsl:if>
- </div>
-</xsl:template>
-<xsl:template match="Interface[not(descriptive)]">
-</xsl:template>
-
-<!--Dictionary.-->
-<xsl:template match="Dictionary[descriptive]">
- <xsl:variable name="name" select="@name"/>
- <div class="dictionary" id="{@id}">
- <h3><code><xsl:value-of select="@name"/></code></h3>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="webidl"/>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="descriptive/Code"/>
- <xsl:apply-templates select="InterfaceInheritance"/>
- <xsl:if test="Const/descriptive">
- <div class="consts">
- <h4>Constants</h4>
- <dl>
- <xsl:apply-templates select="Const"/>
- </dl>
- </div>
- </xsl:if>
- <xsl:if test="Attribute/descriptive">
- <div class="attributes">
- <h4>Attributes</h4>
- <dl>
- <xsl:apply-templates select="Attribute"/>
- </dl>
- </div>
- </xsl:if>
- </div>
-</xsl:template>
-<xsl:template match="Dictionary[not(descriptive)]">
-</xsl:template>
-
-<xsl:template match="InterfaceInheritance/ScopedNameList">
- <p>
- <xsl:text>This interface inherits from: </xsl:text>
- <xsl:for-each select="Name">
- <code><xsl:value-of select="@name"/></code>
- <xsl:if test="position!=last()">, </xsl:if>
- </xsl:for-each>
- </p>
-</xsl:template>
-
-<!--Attribute-->
-<xsl:template match="Attribute">
- <dt class="attribute" id="{@name}">
- <code>
- <xsl:if test="@stringifier">
- stringifier
- </xsl:if>
- <xsl:if test="@readonly">
- readonly
- </xsl:if>
- <xsl:apply-templates select="Type"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
- </code></dt>
- <dd>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="GetRaises"/>
- <xsl:apply-templates select="SetRaises"/>
- <xsl:apply-templates select="descriptive/Code"/>
- </dd>
-</xsl:template>
-
-<!--Const-->
-<xsl:template match="Const">
- <dt class="const" id="{@id}">
- <code>
- <xsl:apply-templates select="Type"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
- </code>
- </dt>
- <dd>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="descriptive/Code"/>
- </dd>
-</xsl:template>
-
-<!--ExtendedAttribute name==Constructor || name==NamedConstructor-->
-<xsl:template match="ExtendedAttributeList/ExtendedAttribute">
- <dt class="constructor" id="{concat(@name,generate-id(.))}">
- <code>
- <xsl:value-of select="../../@name"/>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="ArgumentList">
- <xsl:with-param name="nodesc" select="1"/>
- </xsl:apply-templates>
- <xsl:text>);</xsl:text>
- </code>
- </dt>
- <dd>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="ArgumentList"/>
- <xsl:apply-templates select="Raises"/>
- <xsl:if test="descriptive/api-feature">
- <div class="api-features">
- <h6>API features</h6>
- <dl>
- <xsl:apply-templates select="descriptive/api-feature"/>
- </dl>
- </div>
- </xsl:if>
- <xsl:apply-templates select="webidl"/>
- <xsl:apply-templates select="descriptive/Code"/>
- </dd>
-</xsl:template>
-
-<!--Operation-->
-<xsl:template match="Operation">
- <dt class="method" id="{concat(@name,generate-id(.))}">
- <code>
- <xsl:if test="@stringifier">
- <xsl:value-of select="concat(@stringifier, ' ')"/>
- </xsl:if>
- <xsl:if test="@omittable">
- <xsl:value-of select="concat(@omittable, ' ')"/>
- </xsl:if>
- <xsl:if test="@getter">
- <xsl:value-of select="concat(@getter, ' ')"/>
- </xsl:if>
- <xsl:if test="@setter">
- <xsl:value-of select="concat(@setter, ' ')"/>
- </xsl:if>
- <xsl:if test="@creator">
- <xsl:value-of select="concat(@creator, ' ')"/>
- </xsl:if>
- <xsl:if test="@deleter">
- <xsl:value-of select="concat(@deleter, ' ')"/>
- </xsl:if>
- <xsl:if test="@caller">
- <xsl:value-of select="concat(@caller, ' ')"/>
- </xsl:if>
- <xsl:apply-templates select="Type"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="ArgumentList">
- <xsl:with-param name="nodesc" select="1"/>
- </xsl:apply-templates>
- <xsl:text>);</xsl:text>
- </code>
- </dt>
- <dd>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="webidl"/>
- <xsl:apply-templates select="descriptive/Code"/>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="ArgumentList"/>
- <xsl:if test="Type/descriptive">
- <div class="returntype">
- <h5>Return value</h5>
- <xsl:apply-templates select="Type/descriptive"/>
- </div>
- </xsl:if>
- <xsl:apply-templates select="Raises"/>
- <xsl:if test="descriptive/api-feature">
- <div class="api-features">
- <h6>API features</h6>
- <dl>
- <xsl:apply-templates select="descriptive/api-feature"/>
- </dl>
- </div>
- </xsl:if>
- <xsl:apply-templates select="descriptive/Code"/>
- </dd>
-</xsl:template>
-
-<!--Callback-->
-<xsl:template match="Callback">
- <xsl:variable name="name" select="@name"/>
- <div class="callback" id="{@id}">
- <h3><code><xsl:value-of select="@name"/></code></h3>
-
- <dd>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="webidl"/>
- <xsl:apply-templates select="descriptive"/>
- <div class="synopsis">
- <h6>Signature</h6>
- <pre>
- <xsl:apply-templates select="Type"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="ArgumentList">
- <xsl:with-param name="nodesc" select="1"/>
- </xsl:apply-templates>
- <xsl:text>);
-</xsl:text></pre>
- </div>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="ArgumentList"/>
- <xsl:if test="Type/descriptive">
- <div class="returntype">
- <h5>Return value</h5>
- <xsl:apply-templates select="Type/descriptive"/>
- </div>
- </xsl:if>
- <xsl:apply-templates select="descriptive/Code"/>
- </dd>
- </div>
-</xsl:template>
-
-<!--ArgumentList. This is passed $nodesc=true to output just the argument
- types and names, and not any documentation for them.-->
-<xsl:template match="ArgumentList">
- <xsl:param name="nodesc"/>
- <xsl:choose>
- <xsl:when test="$nodesc">
- <!--$nodesc is true: just output the types and names-->
- <xsl:apply-templates select="Argument[1]">
- <xsl:with-param name="nodesc" select="'nocomma'"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="Argument[position() != 1]">
- <xsl:with-param name="nodesc" select="'comma'"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="Argument">
- <!--$nodesc is false: output the documentation-->
- <div class="parameters">
- <h6>Parameters</h6>
- <ul>
- <xsl:apply-templates/>
- </ul>
- </div>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!--Argument. This is passed $nodesc=false to output the documentation,
- or $nodesc="nocomma" to output the type and name, or $nodesc="comma"
- to output a comma then the type and name. -->
-<xsl:template match="Argument">
- <xsl:param name="nodesc"/>
- <xsl:choose>
- <xsl:when test="$nodesc">
- <!--$nodesc is true: just output the types and names-->
- <xsl:if test="$nodesc = 'comma'">
- <!--Need a comma first.-->
- <xsl:text>, </xsl:text>
- </xsl:if>
- <xsl:if test="@in"><xsl:value-of select="concat(@in, ' ')"/></xsl:if>
- <xsl:if test="@optional"><xsl:value-of select="concat(@optional, ' ')"/></xsl:if>
- <xsl:apply-templates select="Type"/>
- <xsl:if test="@ellipsis"><xsl:text>...</xsl:text></xsl:if>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:if test="@value">
- <xsl:text>Default value: </xsl:text><xsl:value-of select="@value"/>
- </xsl:if>
- <xsl:if test="@stringvalue">
- <xsl:text>Default value: "</xsl:text><xsl:value-of select="@stringvalue"/><xsl:text>"</xsl:text>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <!--$nodesc is false: output the documentation-->
- <li class="param">
- <xsl:value-of select="@name"/>:
- <xsl:apply-templates select="descriptive"/>
- </li>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!--Raises (for an Operation). It is already known that the list
- is not empty.-->
-<xsl:template match="Raises">
- <div class="exceptionlist">
- <h5>Exceptions</h5>
- <ul>
- <xsl:apply-templates/>
- </ul>
- </div>
-</xsl:template>
-
-<!--RaiseException, the name of an exception in a Raises.-->
-<xsl:template match="RaiseException">
- <li class="exception">
- <xsl:value-of select="@name"/>:
- <xsl:apply-templates select="descriptive"/>
- </li>
-</xsl:template>
-
-<!--Type.-->
-<xsl:template match="Type">
- <xsl:choose>
- <xsl:when test="Type">
- <xsl:text>sequence &lt;</xsl:text>
- <xsl:apply-templates/>
- <xsl:text>></xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@name"/>
- <xsl:value-of select="@type"/>
- <xsl:if test="@nullable">
- <xsl:text>?</xsl:text>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!--Enum.-->
-<xsl:template match="Enum[descriptive]">
- <xsl:variable name="name" select="@name"/>
- <div class="enum" id="{@id}">
- <h3><code><xsl:value-of select="@name"/></code></h3>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="webidl"/>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="descriptive/Code"/>
- <div class="enumvalues">
- <h4>Values</h4>
- <dl>
- <xsl:apply-templates select="EnumValue"/>
- </dl>
- </div>
- </div>
-</xsl:template>
-<xsl:template match="Enum[not(descriptive)]">
-</xsl:template>
-
-<!--EnumValue-->
-<xsl:template match="EnumValue">
- <dt class="enumvalue" id="{@id}">
- <code>
- <xsl:value-of select="@stringvalue"/>
- </code>
- </dt>
- <dd>
- <xsl:apply-templates select="descriptive/brief"/>
- <xsl:apply-templates select="descriptive"/>
- <xsl:apply-templates select="descriptive/Code"/>
- </dd>
-</xsl:template>
-
-<xsl:template match="descriptive[not(author)]">
- <xsl:apply-templates select="version"/>
- <xsl:if test="author">
- </xsl:if>
- <xsl:apply-templates select="description"/>
-</xsl:template>
-
-<!--brief-->
-<xsl:template match="brief">
- <div class="brief">
- <p>
- <xsl:apply-templates/>
- </p>
- </div>
-</xsl:template>
-
-<!--description in ReturnType or Argument or ScopedName-->
-<xsl:template match="Type/descriptive/description|Argument/descriptive/description|Name/descriptive/description">
- <!--If the description contains just a single <p> then we omit
- the <p> and just do its contents.-->
- <xsl:choose>
- <xsl:when test="p and count(*) = 1">
- <xsl:apply-templates select="p/*|p/text()"/>
- </xsl:when>
- <xsl:otherwise>
- <div class="description">
- <xsl:apply-templates/>
- </div>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!--Other description-->
-<xsl:template match="description">
- <div class="description">
- <xsl:apply-templates/>
- </div>
-</xsl:template>
-
-<!--Code-->
-<xsl:template match="Code">
- <div class="example">
- <xsl:choose>
- <xsl:when test="@lang">
- <h5><xsl:value-of select="@lang"/></h5>
- </xsl:when>
- <xsl:otherwise>
- <h5>Code example</h5>
- </xsl:otherwise>
- </xsl:choose>
- <pre class="examplecode"><xsl:apply-templates/></pre>
- </div>
-</xsl:template>
-
-<!--webidl : literal Web IDL from input-->
-<xsl:template match="webidl">
- <h5>WebIDL</h5>
- <pre class="webidl"><xsl:apply-templates/></pre>
-</xsl:template>
-
-<!--author-->
-<xsl:template match="author">
- <li class="author"><xsl:apply-templates/></li>
-</xsl:template>
-
-<!--version-->
-<xsl:template match="version">
- <div class="version">
- <h2>
- Version: <xsl:apply-templates/>
- </h2>
- </div>
-</xsl:template>
-
-<!--api-feature-->
-<xsl:template match="api-feature">
- <dt>
- <xsl:value-of select="@identifier"/>
- </dt>
- <dd>
- <xsl:apply-templates/>
- </dd>
-</xsl:template>
-
-<!--param-->
-<xsl:template match="param">
- <li>
- <code><xsl:value-of select="@identifier"/></code>:
- <xsl:apply-templates/>
- </li>
-</xsl:template>
-
-<!--def-instantiated.
- This assumes that only one interface in the module has a def-instantiated,
- and that interface contains just one attribute.-->
-<xsl:template match="def-instantiated">
- <xsl:variable name="ifacename" select="../../@name"/>
- <p>
- <xsl:choose>
- <xsl:when test="count(descriptive/api-feature)=1">
- When the feature
- </xsl:when>
- <xsl:otherwise>
- When any of the features
- </xsl:otherwise>
- </xsl:choose>
- </p>
- <ul>
- <xsl:for-each select="descriptive/api-feature">
- <li><code>
- <xsl:value-of select="@identifier"/>
- </code></li>
- </xsl:for-each>
- </ul>
- <p>
- is successfully requested, the interface
- <code><xsl:apply-templates select="../../Attribute/Type"/></code>
- is instantiated, and the resulting object appears in the global
- namespace as
- <code><xsl:value-of select="../../../Implements[@name2=$ifacename]/@name1"/>.<xsl:value-of select="../../Attribute/@name"/></code>.
- </p>
-</xsl:template>
-
-
-
-<!--html elements-->
-<xsl:template match="a|b|br|dd|dl|dt|em|li|p|table|td|th|tr|ul">
- <xsl:element name="{name()}"><xsl:for-each select="@*"><xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute></xsl:for-each><xsl:apply-templates/></xsl:element>
-</xsl:template>
-
-<xsl:template name="summary">
- <table class="summary">
- <thead>
- <tr><th>Interface</th><th>Method</th></tr>
- </thead>
- <tbody>
- <xsl:for-each select="Interface[descriptive]">
- <tr><td><a href="#{@id}"><xsl:value-of select="@name"/></a></td>
- <td>
- <xsl:for-each select="Operation">
-
- <xsl:apply-templates select="Type"/>
- <xsl:text> </xsl:text>
- <a href="#{concat(@name,generate-id(.))}"><xsl:value-of select="@name"/></a>
- <xsl:text>(</xsl:text>
- <xsl:for-each select="ArgumentList/Argument">
- <xsl:variable name="type"><xsl:apply-templates select="Type"/></xsl:variable>
- <xsl:value-of select="concat(normalize-space($type),' ',@name)"/>
- <xsl:if test="position() != last()">, </xsl:if>
- </xsl:for-each>
- <xsl:text>)</xsl:text>
- <xsl:if test="position()!=last()"><br/></xsl:if>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:for-each>
- </tbody>
- </table>
-</xsl:template>
-
-<!--<ref> element in literal Web IDL.-->
-<xsl:template match="ref[@ref]">
- <a href="{@ref}">
- <xsl:apply-templates/>
- </a>
-</xsl:template>
-
-</xsl:stylesheet>
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/Makefile b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/Makefile
deleted file mode 100644
index c40939e36fc..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/Makefile
+++ /dev/null
@@ -1,91 +0,0 @@
-########################################################################
-# $Id: Makefile 418 2010-06-16 15:26:51Z tpr $
-# Copyright 2009 Aplix Corporation. All rights reserved.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-########################################################################
-
-UNAME = $(shell uname)
-VALIDTESTDIR = valid/idl
-VALIDTESTREFDIR = valid/xml
-VALIDTESTOBJDIR = valid/obj
-INVALIDTESTDIR = invalid/idl
-INVALIDTESTREFDIR = invalid/error
-INVALIDTESTOBJDIR = invalid/obj
-
-# The settings of SRCDIR (where to find the xsl style sheets), OBJDIR (where to
-# find widlproc and widlprocxml.dtd) and VALDTESTOBJDIR (where to put the
-# resulting XML files) reflect the directory
-# structure of the released widlproc.zip file when unzipped. ../Makefile calls
-# this Makefile with these settings overridden to reflect the directory
-# structure in svn.
-SRCDIR = ..
-OBJDIR = ..
-
-########################################################################
-# Linux configuration
-#
-ifneq (,$(filter Linux%, $(UNAME)))
-
-EXESUFFIX =
-
-else
-########################################################################
-# Darwin configuration
-#
-ifneq (,$(filter Darwin%, $(UNAME)))
-
-EXESUFFIX =
-
-else
-########################################################################
-# Windows (cygwin but using MS compiler) configuration
-#
-ifneq (,$(filter CYGWIN%, $(UNAME)))
-
-EXESUFFIX = .exe
-
-endif
-endif
-endif
-
-########################################################################
-# Common makefile
-#
-WIDLPROC = $(OBJDIR)/widlproc$(EXESUFFIX)
-DTD = $(OBJDIR)/widlprocxml.dtd
-
-VALID_WIDLS = $(patsubst $(VALIDTESTDIR)/%, %, $(wildcard $(VALIDTESTDIR)/*.widl))
-INVALID_WIDLS = $(patsubst $(INVALIDTESTDIR)/%, %, $(wildcard $(INVALIDTESTDIR)/*.widl))
-
-test : $(patsubst %.widl, $(VALIDTESTOBJDIR)/%.widlprocxml, $(VALID_WIDLS)) $(patsubst %.widl, $(INVALIDTESTOBJDIR)/%.txt, $(INVALID_WIDLS)) $(WIDLPROC)
- @echo "$@ pass"
-
-#$(EXAMPLESOBJDIR)/%.html : $(EXAMPLESOBJDIR)/%.widlprocxml $(SRCDIR)/widlprocxmltohtml.xsl Makefile
-# cp $(SRCDIR)/widlprocxmltohtml.xsl $(dir $@)/
-# xsltproc $(dir $@)/widlprocxmltohtml.xsl $< >$@
-
-
-$(VALIDTESTOBJDIR)/%.widlprocxml : $(VALIDTESTDIR)/%.widl $(WIDLPROC) $(DTD) Makefile $(patsubst %.widl, $(VALIDTESTREFDIR)/%.widlprocxml, $(VALID_WIDLS))
- mkdir -p $(dir $@)
- $(WIDLPROC) $< >$@
- cp $(OBJDIR)/widlprocxml.dtd $(dir $@)/
- xmllint --noout --dtdvalid $(DTD) $@
- diff $@ $(VALIDTESTREFDIR)/`basename $@`
-
-$(INVALIDTESTOBJDIR)/%.txt : $(INVALIDTESTDIR)/%.widl $(WIDLPROC) Makefile $(patsubst %.widl, $(INVALIDTESTREFDIR)/%.txt, $(INVALID_WIDLS))
- mkdir -p $(dir $@)
- -$(WIDLPROC) $< >$@ 2>&1
- diff $@ $(INVALIDTESTREFDIR)/`basename $@`
-
-
-
-.DELETE_ON_ERROR:
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/enum.txt b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/enum.txt
deleted file mode 100644
index 6f8ba8eef46..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/enum.txt
+++ /dev/null
@@ -1 +0,0 @@
-invalid/idl/enum.widl: 1: at '1': expected string in enum
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/module.txt b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/module.txt
deleted file mode 100644
index 7e504316e51..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/module.txt
+++ /dev/null
@@ -1 +0,0 @@
-invalid/idl/module.widl: 2: at 'gfx': expected 'implements'
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/nonnullableany.txt b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/nonnullableany.txt
deleted file mode 100644
index eeeb25f12ab..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/nonnullableany.txt
+++ /dev/null
@@ -1 +0,0 @@
-invalid/idl/nonnullableany.widl: 2: at '?': expected identifier
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/nonnullableobjects.txt b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/nonnullableobjects.txt
deleted file mode 100644
index 526622599b7..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/nonnullableobjects.txt
+++ /dev/null
@@ -1 +0,0 @@
-invalid/idl/nonnullableobjects.widl: 4: at '?': expected identifier
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/scopedname.txt b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/scopedname.txt
deleted file mode 100644
index 5646608cd37..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/scopedname.txt
+++ /dev/null
@@ -1 +0,0 @@
-invalid/idl/scopedname.widl: 2: at ':': expected identifier
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/sequenceAsAttribute.txt b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/sequenceAsAttribute.txt
deleted file mode 100644
index 15960cb8b5f..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/sequenceAsAttribute.txt
+++ /dev/null
@@ -1 +0,0 @@
-invalid/idl/sequenceAsAttribute.widl: 2: at 'sequence': expected type
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/stringconstants.idl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/stringconstants.idl
deleted file mode 100644
index 155a892c55a..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/error/stringconstants.idl
+++ /dev/null
@@ -1 +0,0 @@
-invalid/idl/stringconstants.idl: 2: at 'DOMString': expected acceptable constant type
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/enum.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/enum.widl
deleted file mode 100644
index c355c3251c0..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/enum.widl
+++ /dev/null
@@ -1 +0,0 @@
-enum foo { 1, 2, 3}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/module.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/module.widl
deleted file mode 100644
index a4c79fdf155..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/module.widl
+++ /dev/null
@@ -1,25 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-module gfx {
-
- module geom {
- interface Shape { /* ... */ };
- interface Rectangle : Shape { /* ... */ };
- interface Path : Shape { /* ... */ };
- };
-
- interface GraphicsContext {
- void fillShape(geom::Shape s);
- void strokeShape(geom::Shape s);
- };
-};
-
-module gui {
-
- interface Widget { /* ... */ };
-
- interface Window : Widget {
- gfx::GraphicsContext getGraphicsContext();
- };
-
- interface Button : Widget { /* ... */ };
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/nonnullableany.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/nonnullableany.widl
deleted file mode 100644
index 38957655523..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/nonnullableany.widl
+++ /dev/null
@@ -1,3 +0,0 @@
-interface NonNullable {
- attribute any? foo;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/nonnullableobjects.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/nonnullableobjects.widl
deleted file mode 100644
index 1deac5aeec9..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/nonnullableobjects.widl
+++ /dev/null
@@ -1,5 +0,0 @@
-interface Foo {};
-
-interface NonNullable {
- attribute Foo?? foo;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/raises.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/raises.widl
deleted file mode 100644
index ff65522f2b3..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/raises.widl
+++ /dev/null
@@ -1,18 +0,0 @@
-// getraises and setraises are not longer valid Web IDL
-interface Person {
-
- // An attribute that can raise an exception if it is set to an invalid value.
- attribute DOMString name setraises (InvalidName);
-
- // An attribute whose value cannot be assigned to, and which can raise an
- // exception some circumstances.
- readonly attribute DOMString petName getraises (NoSuchPet);
-};
-
-exception SomeException {
-};
-
-interface ExceptionThrower {
- // This attribute always throws a SomeException and never returns a value.
- attribute long valueOf getraises(SomeException);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/scopedname.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/scopedname.widl
deleted file mode 100644
index cfcb1ccc939..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/scopedname.widl
+++ /dev/null
@@ -1,2 +0,0 @@
-// scoped names are no longer valid in WebIDL
- typedef gfx::geom::geom2d::Point Point;
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/sequenceAsAttribute.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/sequenceAsAttribute.widl
deleted file mode 100644
index c23da82ac22..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/sequenceAsAttribute.widl
+++ /dev/null
@@ -1,3 +0,0 @@
-interface sequenceAsAttribute {
- attribute sequence<short> invalid;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/special-omittable.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/special-omittable.widl
deleted file mode 100644
index bdfbfa70973..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/special-omittable.widl
+++ /dev/null
@@ -1,8 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-// omittable is no longer a recognized keywoard as of 20110905
-interface Dictionary {
- readonly attribute unsigned long propertyCount;
-
- omittable getter float getProperty(DOMString propertyName);
- omittable setter void setProperty(DOMString propertyName, float propertyValue);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/stringconstants.idl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/stringconstants.idl
deleted file mode 100644
index 44fd3ff136e..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/invalid/idl/stringconstants.idl
+++ /dev/null
@@ -1,3 +0,0 @@
-interface Util {
- const DOMString hello = "world";
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/allowany.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/allowany.widl
deleted file mode 100644
index 2343bb96374..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/allowany.widl
+++ /dev/null
@@ -1,6 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface B {
- void g();
- void g(B b);
- void g([AllowAny] DOMString s);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/array.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/array.widl
deleted file mode 100644
index 22e21fb6564..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/array.widl
+++ /dev/null
@@ -1,5 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-[Constructor]
-interface LotteryResults {
- readonly attribute unsigned short[][] numbers;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/attributes.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/attributes.widl
deleted file mode 100644
index 7e1d691cbe2..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/attributes.widl
+++ /dev/null
@@ -1,14 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-exception InvalidName {
- DOMString reason;
-};
-
-exception NoSuchPet { };
-
-interface Person {
-
- // A simple attribute that can be set to any value the range an unsigned
- // short can take.
- attribute unsigned short age;
-
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/callback.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/callback.widl
deleted file mode 100644
index d92f6a18c0a..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/callback.widl
+++ /dev/null
@@ -1,5 +0,0 @@
-callback AsyncOperationCallback = void (DOMString status);
-
-callback interface EventHandler {
- void eventOccurred(DOMString details);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/caller.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/caller.widl
deleted file mode 100644
index 92acb1c0176..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/caller.widl
+++ /dev/null
@@ -1,5 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface NumberQuadrupler {
- // This operation simply returns four times the given number x.
- legacycaller float compute(float x);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/constants.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/constants.widl
deleted file mode 100644
index 5e28ae9c116..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/constants.widl
+++ /dev/null
@@ -1,18 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface Util {
- const boolean DEBUG = false;
- const short negative = -1;
- const octet LF = 10;
- const unsigned long BIT_MASK = 0x0000fc00;
- const float AVOGADRO = 6.022e23;
- const unrestricted float sobig = Infinity;
- const unrestricted double minusonedividedbyzero = -Infinity;
- const short notanumber = NaN;
-};
-
-exception Error {
- const short ERR_UNKNOWN = 0;
- const short ERR_OUT_OF_MEMORY = 1;
-
- short errorCode;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/constructor.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/constructor.widl
deleted file mode 100644
index f93ec08a6e6..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/constructor.widl
+++ /dev/null
@@ -1,9 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-[Constructor,
- Constructor(float radius)]
-interface Circle {
- attribute float r;
- attribute float cx;
- attribute float cy;
- readonly attribute float circumference;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/dictionary-inherits.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/dictionary-inherits.widl
deleted file mode 100644
index 48f8a0fdceb..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/dictionary-inherits.widl
+++ /dev/null
@@ -1,9 +0,0 @@
-dictionary PaintOptions {
- DOMString? fillPattern = "black";
- DOMString? strokePattern = null;
- Point position;
-};
-
-dictionary WetPaintOptions : PaintOptions {
- float hydrometry;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/dictionary.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/dictionary.widl
deleted file mode 100644
index f46b7ba7806..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/dictionary.widl
+++ /dev/null
@@ -1,11 +0,0 @@
-// Extracted from Web IDL editors draft May 31 2011
-dictionary PaintOptions {
- DOMString? fillPattern = "black";
- DOMString? strokePattern = null;
- Point position;
-};
-
-partial dictionary A {
- long h;
- long d;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/documentation-dos.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/documentation-dos.widl
deleted file mode 100644
index fb801101f14..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/documentation-dos.widl
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
-* \brief Testing documentation features
-*
-* This is a
-* single paragraph
-*
-* <p>This is valid.</p>
-* <p>This is <em>valid</em>.</p>
-* <p>This is <b>valid</b>.</p>
-* <p>This is <a href=''>valid</a>.</p>
-* <ul>
-* <li>This</li>
-* <li>is</li>
-* <li>valid</li>
-* </ul>
-* <dl>
-* <dt>This</dt>
-* <dd>valid</dd>
-* </dl>
-* <table>
-* <tr>
-* <td>this</td>
-* <td>is</td>
-* </tr>
-* <tr>
-* <td>valid</td>
-* </tr>
-* </table>
-* <p>This is <br> valid.</p>
-* <p>This is <br /> valid.</p>
-* <p>This is <br/> valid.</p>
-*/
-interface Documentation {}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/documentation.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/documentation.widl
deleted file mode 100644
index 003e9226f67..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/documentation.widl
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
-* \brief Testing documentation features
-*
-* This is a
-* single paragraph
-*
-* <p>This is valid.</p>
-* <p>This is <em>valid</em>.</p>
-* <p>This is <b>valid</b>.</p>
-* <p>This is <a href=''>valid</a>.</p>
-* <ul>
-* <li>This</li>
-* <li>is</li>
-* <li>valid</li>
-* </ul>
-* <dl>
-* <dt>This</dt>
-* <dd>valid</dd>
-* </dl>
-* <table>
-* <tr>
-* <td>this</td>
-* <td>is</td>
-* </tr>
-* <tr>
-* <td>valid</td>
-* </tr>
-* </table>
-* <p>This is <br> valid.</p>
-* <p>This is <br /> valid.</p>
-* <p>This is <br/> valid.</p>
-* <p><img src="foo.png" alt="Valid"/></p>
-*/
-interface Documentation {}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/enum.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/enum.widl
deleted file mode 100644
index 851fca2e6f6..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/enum.widl
+++ /dev/null
@@ -1,8 +0,0 @@
-enum MealType { "rice", "noodles", "other" };
-
-interface Meal {
- attribute MealType type;
- attribute float size; // in grams
-
- void initialize(MealType type, float size);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/equivalent-decl.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/equivalent-decl.widl
deleted file mode 100644
index 6b3e0eda284..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/equivalent-decl.widl
+++ /dev/null
@@ -1,18 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface Dictionary {
- readonly attribute unsigned long propertyCount;
-
- getter float getProperty(DOMString propertyName);
- setter void setProperty(DOMString propertyName, float propertyValue);
-};
-
-
-interface Dictionary {
- readonly attribute unsigned long propertyCount;
-
- float getProperty(DOMString propertyName);
- void setProperty(DOMString propertyName, float propertyValue);
-
- getter float (DOMString propertyName);
- setter void (DOMString propertyName, float propertyValue);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/exception-inheritance.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/exception-inheritance.widl
deleted file mode 100644
index 258fdeba6f4..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/exception-inheritance.widl
+++ /dev/null
@@ -1,7 +0,0 @@
-// from http://lists.w3.org/Archives/Public/public-script-coord/2010OctDec/0112.html
- exception DOMException {
- unsigned short code;
- };
-
- exception HierarchyRequestError : DOMException { };
- exception NoModificationAllowedError : DOMException { }; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/exception.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/exception.widl
deleted file mode 100644
index f4b6ae29e10..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/exception.widl
+++ /dev/null
@@ -1,8 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface Dahut {
- attribute DOMString type;
-};
-
-exception SomeException {
-};
-
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/getter-setter.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/getter-setter.widl
deleted file mode 100644
index bdf87e1c7c7..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/getter-setter.widl
+++ /dev/null
@@ -1,7 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface Dictionary {
- readonly attribute unsigned long propertyCount;
-
- getter float (DOMString propertyName);
- setter void (DOMString propertyName, float propertyValue);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/identifier-qualified-names.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/identifier-qualified-names.widl
deleted file mode 100644
index 33893d4c644..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/identifier-qualified-names.widl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
- // Typedef identifier: "number"
- // Qualified name: "::framework::number"
- typedef float number;
-
- // Exception identifier: "FrameworkException"
- // Qualified name: "::framework::FrameworkException"
- exception FrameworkException {
-
- // Constant identifier: "ERR_NOT_FOUND"
- // Qualified name: "::framework::FrameworkException::ERR_NOT_FOUND"
- const long ERR_NOT_FOUND = 1;
-
- // Exception field identifier: "code"
- long code;
- };
-
- // Interface identifier: "System"
- // Qualified name: "::framework::System"
- interface System {
-
- // Operation identifier: "createObject"
- // Operation argument identifier: "interface"
- object createObject(DOMString _interface);
-
- // Operation has no identifier; it declares a getter.
- getter DOMString (DOMString keyName);
- };
-
-
- // Interface identifier: "TextField"
- // Qualified name: "::framework::gui::TextField"
- interface TextField {
-
- // Attribute identifier: "const"
- attribute boolean _const;
-
- // Attribute identifier: "value"
- attribute DOMString? _value;
- };
-
-interface Foo {
- void op(object interface);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/implements.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/implements.widl
deleted file mode 100644
index 7a310926f1c..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/implements.widl
+++ /dev/null
@@ -1,14 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
- interface Node {
- readonly attribute unsigned short nodeType;
- // ...
- };
-
- interface EventTarget {
- void addEventListener(DOMString type,
- EventListener listener,
- boolean useCapture);
- // ...
- };
-
- Node implements EventTarget;
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/indexed-properties.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/indexed-properties.widl
deleted file mode 100644
index acf0ed3bf84..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/indexed-properties.widl
+++ /dev/null
@@ -1,12 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface OrderedMap {
- readonly attribute unsigned long size;
-
- getter any getByIndex(unsigned long index);
- setter void setByIndex(unsigned long index, any value);
- deleter void removeByIndex(unsigned long index);
-
- getter any get(DOMString name);
- setter creator void set(DOMString name, any value);
- deleter void remove(DOMString name);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/inherits-getter.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/inherits-getter.widl
deleted file mode 100644
index 558e8116494..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/inherits-getter.widl
+++ /dev/null
@@ -1,16 +0,0 @@
-interface Animal {
-
- // A simple attribute that can be set to any string value.
- readonly attribute DOMString name;
-};
-
-interface Person : Animal {
-
- // An attribute whose value cannot be assigned to.
- readonly attribute unsigned short age;
-
- // An attribute that can raise an exception if it is set to an invalid value.
- // Its getter behavior is inherited from Animal, and need not be specified
- // the description of Person.
- inherit attribute DOMString name;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/interface-inherits.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/interface-inherits.widl
deleted file mode 100644
index 7921def7727..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/interface-inherits.widl
+++ /dev/null
@@ -1,12 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface Animal {
- attribute DOMString name;
-};
-
-interface Human : Animal {
- attribute Dog pet;
-};
-
-interface Dog : Animal {
- attribute Human owner;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/iterator.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/iterator.widl
deleted file mode 100644
index 3bf1b36dec6..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/iterator.widl
+++ /dev/null
@@ -1,35 +0,0 @@
-interface SessionManager {
- Session getSessionForUser(DOMString username);
- readonly attribute unsigned long sessionCount;
-
- Session iterator;
-};
-
-interface Session {
- readonly attribute DOMString username;
- // ...
-};
-
-interface SessionManager2 {
- Session2 getSessionForUser(DOMString username);
- readonly attribute unsigned long sessionCount;
-
- Session2 iterator = SessionIterator;
-};
-
-interface Session2 {
- readonly attribute DOMString username;
- // ...
-};
-
-interface SessionIterator {
- readonly attribute unsigned long remainingSessions;
-};
-
- interface NodeList {
- Node iterator = NodeIterator;
- };
-
- interface NodeIterator {
- Node iterator object;
- }; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/namedconstructor.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/namedconstructor.widl
deleted file mode 100644
index c468b78f8e1..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/namedconstructor.widl
+++ /dev/null
@@ -1,6 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-[NamedConstructor=Audio,
- NamedConstructor=Audio(DOMString src)]
-interface HTMLAudioElement : HTMLMediaElement {
- // ...
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/nointerfaceobject.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/nointerfaceobject.widl
deleted file mode 100644
index c17d75ff8fd..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/nointerfaceobject.widl
+++ /dev/null
@@ -1,5 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-[NoInterfaceObject]
-interface Query {
- any lookupEntry(unsigned long key);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/nullable.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/nullable.widl
deleted file mode 100644
index ccbf625ff8a..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/nullable.widl
+++ /dev/null
@@ -1,9 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface MyConstants {
- const boolean? ARE_WE_THERE_YET = false;
-};
-
-interface Node {
- readonly attribute DOMString? namespaceURI;
- // ...
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/nullableobjects.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/nullableobjects.widl
deleted file mode 100644
index 83d1d40b2ac..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/nullableobjects.widl
+++ /dev/null
@@ -1,13 +0,0 @@
-// Extracted from WebIDL spec 2011-05-23
-
-interface A {
- // ...
-};
-interface B {
- // ...
-};
-interface C {
- void f(A? x);
- void f(B? x);
-
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/operation-optional-arg.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/operation-optional-arg.widl
deleted file mode 100644
index 379053b45f1..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/operation-optional-arg.widl
+++ /dev/null
@@ -1,4 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface ColorCreator {
- object createColor(float v1, float v2, float v3, optional float alpha = 3.5);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/overloading.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/overloading.widl
deleted file mode 100644
index ef1288a8877..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/overloading.widl
+++ /dev/null
@@ -1,20 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface A {
- // ...
-};
-
-interface B {
- // ...
-};
-
-interface C {
- void f(A x);
- void f(B x);
-};
-
-interface A {
- /* f1 */ void f(DOMString a);
- /* f2 */ void f([AllowAny] DOMString a, DOMString b, float... c);
- /* f3 */ void f();
- /* f4 */ void f(long a, DOMString b, optional DOMString c, float... d);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/overridebuiltins.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/overridebuiltins.widl
deleted file mode 100644
index 79211c29e84..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/overridebuiltins.widl
+++ /dev/null
@@ -1,6 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-[OverrideBuiltins]
-interface StringMap2 {
- readonly attribute unsigned long length;
- getter DOMString lookup(DOMString key);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/partial-interface.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/partial-interface.widl
deleted file mode 100644
index 90e7e0ea421..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/partial-interface.widl
+++ /dev/null
@@ -1,7 +0,0 @@
-interface Foo {
- attribute DOMString bar;
-};
-
-partial interface Foo {
- attribute DOMString quux;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/primitives.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/primitives.widl
deleted file mode 100644
index 92939601a1a..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/primitives.widl
+++ /dev/null
@@ -1,19 +0,0 @@
-interface Primitives {
- attribute boolean truth;
- attribute byte character;
- attribute octet value;
- attribute short number;
- attribute unsigned short positive;
- attribute long big;
- attribute unsigned long bigpositive;
- attribute long long bigbig;
- attribute unsigned long long bigbigpositive;
- attribute float real;
- attribute double bigreal;
- attribute unrestricted float realwithinfinity;
- attribute unrestricted double bigrealwithinfinity;
- attribute DOMString string;
- attribute ByteString bytes;
- attribute Date date;
- attribute RegExp regexp;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/prototyperoot.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/prototyperoot.widl
deleted file mode 100644
index 30dd5cbca13..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/prototyperoot.widl
+++ /dev/null
@@ -1,5 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-[PrototypeRoot]
-interface Node {
- readonly attribute unsigned short nodeType;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/putforwards.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/putforwards.widl
deleted file mode 100644
index 1e50a4ee394..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/putforwards.widl
+++ /dev/null
@@ -1,5 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface Person {
- [PutForwards=full] readonly attribute Name name;
- attribute unsigned short age;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/reg-operations.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/reg-operations.widl
deleted file mode 100644
index 13997cb1d12..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/reg-operations.widl
+++ /dev/null
@@ -1,17 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface Dimensions {
- attribute unsigned long width;
- attribute unsigned long height;
-};
-
-exception NoPointerDevice { };
-
-interface Button {
-
- // An operation that takes no arguments, returns a boolean
- boolean isMouseOver();
-
- // Overloaded operations.
- void setDimensions(Dimensions size);
- void setDimensions(unsigned long width, unsigned long height);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/replaceable.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/replaceable.widl
deleted file mode 100644
index c14d0c37689..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/replaceable.widl
+++ /dev/null
@@ -1,5 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface Counter {
- [Replaceable] readonly attribute unsigned long value;
- void increment();
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/sequence.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/sequence.widl
deleted file mode 100644
index a1aa931f5f0..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/sequence.widl
+++ /dev/null
@@ -1,7 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-// edited to remove sequence as attributes, now invalid
-interface Canvas {
- void drawPolygon(sequence<float> coordinates);
- sequence<float> getInflectionPoints();
- // ...
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/serializer.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/serializer.widl
deleted file mode 100644
index 6f6ccd0e8d5..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/serializer.widl
+++ /dev/null
@@ -1,64 +0,0 @@
-interface Transaction {
- readonly attribute Account from;
- readonly attribute Account to;
- readonly attribute float amount;
- readonly attribute DOMString description;
- readonly attribute unsigned long number;
-
- serializer;
-};
-
-interface Account {
- attribute DOMString name;
- attribute unsigned long number;
- serializer DOMString serialize();
-};
-
-interface Transaction2 {
- readonly attribute Account2 from;
- readonly attribute Account2 to;
- readonly attribute float amount;
- readonly attribute DOMString description;
- readonly attribute unsigned long number;
-
- serializer = { from, to, amount, description };
-};
-
-interface Account2 {
- attribute DOMString name;
- attribute unsigned long number;
- serializer = number;
-};
-
-interface Account3 {
- attribute DOMString name;
- attribute unsigned long number;
-
- serializer = { attribute };
-};
-
-interface Account4 {
- getter object getItem(unsigned long index);
- serializer = { getter };
-};
-
-interface Account5 : Account {
- attribute DOMString secondname;
- serializer = { inherit, secondname };
-};
-
-interface Account6 : Account {
- attribute DOMString secondname;
- serializer = { inherit, attribute };
-};
-
-interface Account7 {
- attribute DOMString name;
- attribute unsigned long number;
- serializer = [ name, number ];
-};
-
-interface Account8 {
- getter object getItem(unsigned long index);
- serializer = [ getter ];
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/static.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/static.widl
deleted file mode 100644
index 5b2cd36590f..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/static.widl
+++ /dev/null
@@ -1,11 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface Point { /* ... */ };
-
-interface Circle {
- attribute float cx;
- attribute float cy;
- attribute float radius;
-
- static readonly attribute long triangulationCount;
- static Point triangulate(Circle c1, Circle c2, Circle c3);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/stringifier-attribute.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/stringifier-attribute.widl
deleted file mode 100644
index c964ecb93e6..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/stringifier-attribute.widl
+++ /dev/null
@@ -1,6 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-[Constructor]
-interface Student {
- attribute unsigned long id;
- stringifier attribute DOMString name;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/stringifier-custom.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/stringifier-custom.widl
deleted file mode 100644
index b5d7c87e7f4..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/stringifier-custom.widl
+++ /dev/null
@@ -1,9 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-[Constructor]
-interface Student {
- attribute unsigned long id;
- attribute DOMString? familyName;
- attribute DOMString givenName;
-
- stringifier DOMString ();
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/stringifier.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/stringifier.widl
deleted file mode 100644
index 4eb483d9b53..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/stringifier.widl
+++ /dev/null
@@ -1,8 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface A {
- stringifier DOMString ();
-};
-
-interface A {
- stringifier;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/treatasnull.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/treatasnull.widl
deleted file mode 100644
index d3c55b008c0..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/treatasnull.widl
+++ /dev/null
@@ -1,7 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface Dog {
- attribute DOMString name;
- attribute DOMString owner;
-
- boolean isMemberOfBreed([TreatNullAs=EmptyString] DOMString breedName);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/treatasundefined.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/treatasundefined.widl
deleted file mode 100644
index e30050f8413..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/treatasundefined.widl
+++ /dev/null
@@ -1,7 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface Cat {
- attribute DOMString name;
- attribute DOMString owner;
-
- boolean isMemberOfBreed([TreatUndefinedAs=EmptyString] DOMString breedName);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/typedef.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/typedef.widl
deleted file mode 100644
index b4c17d8d36a..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/typedef.widl
+++ /dev/null
@@ -1,22 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
- interface Point {
- attribute float x;
- attribute float y;
- };
-
- typedef sequence<Point> PointSequence;
-
- interface Rect {
- attribute Point topleft;
- attribute Point bottomright;
- };
-
- interface Widget {
-
- readonly attribute Rect bounds;
-
- boolean pointWithinBounds(Point p);
- boolean allPointsWithinBounds(PointSequence ps);
- };
-
- typedef [Clamp] octet value; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/typesuffixes.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/typesuffixes.widl
deleted file mode 100644
index 95e31c16902..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/typesuffixes.widl
+++ /dev/null
@@ -1,3 +0,0 @@
-interface Suffixes {
- void test(sequence<DOMString[]?>? foo);
-};
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/uniontype.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/uniontype.widl
deleted file mode 100644
index 4d99f019630..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/uniontype.widl
+++ /dev/null
@@ -1,3 +0,0 @@
-interface Union {
- attribute (float or (Date or Event) or (Node or DOMString)?) test;
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/variadic-operations.widl b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/variadic-operations.widl
deleted file mode 100644
index 51fae4cc1ea..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/idl/variadic-operations.widl
+++ /dev/null
@@ -1,7 +0,0 @@
-// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
-interface IntegerSet {
- readonly attribute unsigned long cardinality;
-
- void union(long... ints);
- void intersection(long... ints);
-}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/allowany.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/allowany.widlprocxml
deleted file mode 100644
index 7da508bcb5c..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/allowany.widlprocxml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface B {
- void g();
- void g(<ref>B</ref> b);
- void g([AllowAny] DOMString s);
-};</webidl>
- <Interface name="B" id="::B">
- <webidl>interface B {
- void g();
- void g(<ref>B</ref> b);
- void g([AllowAny] DOMString s);
-};</webidl>
- <Operation name="g" id="::B::g">
- <webidl> void g();</webidl>
- <Type type="void"/>
- <ArgumentList/>
- </Operation>
- <Operation name="g" id="::B::g">
- <webidl> void g(<ref>B</ref> b);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="b">
- <Type name="B"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation name="g" id="::B::g">
- <webidl> void g([AllowAny] DOMString s);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="s">
- <ExtendedAttributeList>
- <ExtendedAttribute name="AllowAny">
- <webidl>AllowAny</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/array.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/array.widlprocxml
deleted file mode 100644
index 3df72ff1608..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/array.widlprocxml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>[Constructor]
-interface LotteryResults {
- readonly attribute unsigned short[][] numbers;
-};</webidl>
- <Interface name="LotteryResults" id="::LotteryResults">
- <webidl>[Constructor]
-interface LotteryResults {
- readonly attribute unsigned short[][] numbers;
-};</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="Constructor">
- <webidl>Constructor</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Attribute readonly="readonly" name="numbers" id="::LotteryResults::numbers">
- <webidl> readonly attribute unsigned short[][] numbers;</webidl>
- <Type type="array">
- <Type type="array">
- <Type type="unsigned short"/>
- </Type>
- </Type>
- </Attribute>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/attributes.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/attributes.widlprocxml
deleted file mode 100644
index 89bd8ac9b01..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/attributes.widlprocxml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>exception InvalidName {
- DOMString reason;
-};
-
-exception NoSuchPet { };
-
-interface Person {
-
- attribute unsigned short age;
-
-};</webidl>
- <Exception name="InvalidName" id="::InvalidName">
- <webidl>exception InvalidName {
- DOMString reason;
-};</webidl>
- <ExceptionField name="reason" id="::InvalidName::reason">
- <webidl> DOMString reason;</webidl>
- <Type type="DOMString"/>
- </ExceptionField>
- </Exception>
- <Exception name="NoSuchPet" id="::NoSuchPet">
- <webidl>exception NoSuchPet { };</webidl>
- </Exception>
- <Interface name="Person" id="::Person">
- <webidl>interface Person {
-
- attribute unsigned short age;
-
-};</webidl>
- <Attribute name="age" id="::Person::age">
- <webidl> attribute unsigned short age;</webidl>
- <Type type="unsigned short"/>
- </Attribute>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/callback.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/callback.widlprocxml
deleted file mode 100644
index 9eac06ce279..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/callback.widlprocxml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>callback AsyncOperationCallback = void (DOMString status);
-
-callback interface EventHandler {
- void eventOccurred(DOMString details);
-};</webidl>
- <Callback name="AsyncOperationCallback" id="::AsyncOperationCallback">
- <webidl>callback AsyncOperationCallback = void (DOMString status);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="status">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Callback>
- <Interface name="EventHandler" callback="callback" id="::EventHandler">
- <webidl>callback interface EventHandler {
- void eventOccurred(DOMString details);
-};</webidl>
- <Operation name="eventOccurred" id="::EventHandler::eventOccurred">
- <webidl> void eventOccurred(DOMString details);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="details">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/caller.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/caller.widlprocxml
deleted file mode 100644
index 9754d4e0268..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/caller.widlprocxml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface NumberQuadrupler {
- legacycaller float compute(float x);
-};</webidl>
- <Interface name="NumberQuadrupler" id="::NumberQuadrupler">
- <webidl>interface NumberQuadrupler {
- legacycaller float compute(float x);
-};</webidl>
- <Operation legacycaller="legacycaller" name="compute" id="::NumberQuadrupler::compute">
- <webidl> legacycaller float compute(float x);</webidl>
- <Type type="float"/>
- <ArgumentList>
- <Argument name="x">
- <Type type="float"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/constants.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/constants.widlprocxml
deleted file mode 100644
index 51cb4331f75..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/constants.widlprocxml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Util {
- const boolean DEBUG = false;
- const short negative = -1;
- const octet LF = 10;
- const unsigned long BIT_MASK = 0x0000fc00;
- const float AVOGADRO = 6.022e23;
- const unrestricted float sobig = Infinity;
- const unrestricted double minusonedividedbyzero = -Infinity;
- const short notanumber = NaN;
-};
-
-exception Error {
- const short ERR_UNKNOWN = 0;
- const short ERR_OUT_OF_MEMORY = 1;
-
- short errorCode;
-};</webidl>
- <Interface name="Util" id="::Util">
- <webidl>interface Util {
- const boolean DEBUG = false;
- const short negative = -1;
- const octet LF = 10;
- const unsigned long BIT_MASK = 0x0000fc00;
- const float AVOGADRO = 6.022e23;
- const unrestricted float sobig = Infinity;
- const unrestricted double minusonedividedbyzero = -Infinity;
- const short notanumber = NaN;
-};</webidl>
- <Const name="DEBUG" value="false" id="::Util::DEBUG">
- <webidl> const boolean DEBUG = false;</webidl>
- <Type type="boolean"/>
- </Const>
- <Const name="negative" value="-1" id="::Util::negative">
- <webidl> const short negative = -1;</webidl>
- <Type type="short"/>
- </Const>
- <Const name="LF" value="10" id="::Util::LF">
- <webidl> const octet LF = 10;</webidl>
- <Type type="octet"/>
- </Const>
- <Const name="BIT_MASK" value="0x0000fc00" id="::Util::BIT_MASK">
- <webidl> const unsigned long BIT_MASK = 0x0000fc00;</webidl>
- <Type type="unsigned long"/>
- </Const>
- <Const name="AVOGADRO" value="6.022e23" id="::Util::AVOGADRO">
- <webidl> const float AVOGADRO = 6.022e23;</webidl>
- <Type type="float"/>
- </Const>
- <Const name="sobig" value="Infinity" id="::Util::sobig">
- <webidl> const unrestricted float sobig = Infinity;</webidl>
- <Type type="unrestricted float"/>
- </Const>
- <Const name="minusonedividedbyzero" value="-Infinity" id="::Util::minusonedividedbyzero">
- <webidl> const unrestricted double minusonedividedbyzero = -Infinity;</webidl>
- <Type type="unrestricted double"/>
- </Const>
- <Const name="notanumber" value="NaN" id="::Util::notanumber">
- <webidl> const short notanumber = NaN;</webidl>
- <Type type="short"/>
- </Const>
- </Interface>
- <Exception name="Error" id="::Error">
- <webidl>exception Error {
- const short ERR_UNKNOWN = 0;
- const short ERR_OUT_OF_MEMORY = 1;
-
- short errorCode;
-};</webidl>
- <Const name="ERR_UNKNOWN" value="0" id="::Error::ERR_UNKNOWN">
- <webidl> const short ERR_UNKNOWN = 0;</webidl>
- <Type type="short"/>
- </Const>
- <Const name="ERR_OUT_OF_MEMORY" value="1" id="::Error::ERR_OUT_OF_MEMORY">
- <webidl> const short ERR_OUT_OF_MEMORY = 1;</webidl>
- <Type type="short"/>
- </Const>
- <ExceptionField name="errorCode" id="::Error::errorCode">
- <webidl> short errorCode;</webidl>
- <Type type="short"/>
- </ExceptionField>
- </Exception>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/constructor.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/constructor.widlprocxml
deleted file mode 100644
index 8e78fbab365..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/constructor.widlprocxml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>[Constructor,
- Constructor(float radius)]
-interface Circle {
- attribute float r;
- attribute float cx;
- attribute float cy;
- readonly attribute float circumference;
-};</webidl>
- <Interface name="Circle" id="::Circle">
- <webidl>[Constructor,
- Constructor(float radius)]
-interface Circle {
- attribute float r;
- attribute float cx;
- attribute float cy;
- readonly attribute float circumference;
-};</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="Constructor">
- <webidl>Constructor</webidl>
- </ExtendedAttribute>
- <ExtendedAttribute name="Constructor">
- <webidl> Constructor(float radius)</webidl>
- <ArgumentList>
- <Argument name="radius">
- <Type type="float"/>
- </Argument>
- </ArgumentList>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Attribute name="r" id="::Circle::r">
- <webidl> attribute float r;</webidl>
- <Type type="float"/>
- </Attribute>
- <Attribute name="cx" id="::Circle::cx">
- <webidl> attribute float cx;</webidl>
- <Type type="float"/>
- </Attribute>
- <Attribute name="cy" id="::Circle::cy">
- <webidl> attribute float cy;</webidl>
- <Type type="float"/>
- </Attribute>
- <Attribute readonly="readonly" name="circumference" id="::Circle::circumference">
- <webidl> readonly attribute float circumference;</webidl>
- <Type type="float"/>
- </Attribute>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/dictionary-inherits.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/dictionary-inherits.widlprocxml
deleted file mode 100644
index 269a83cd849..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/dictionary-inherits.widlprocxml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>dictionary PaintOptions {
- DOMString? fillPattern = &quot;black&quot;;
- DOMString? strokePattern = null;
- <ref>Point</ref> position;
-};
-
-dictionary WetPaintOptions : <ref>PaintOptions</ref> {
- float hydrometry;
-};</webidl>
- <Dictionary name="PaintOptions" id="::PaintOptions">
- <webidl>dictionary PaintOptions {
- DOMString? fillPattern = &quot;black&quot;;
- DOMString? strokePattern = null;
- <ref>Point</ref> position;
-};</webidl>
- <DictionaryMember name="fillPattern" stringvalue="black" id="::PaintOptions::fillPattern">
- <webidl> DOMString? fillPattern = &quot;black&quot;;</webidl>
- <Type type="DOMString" nullable="nullable"/>
- </DictionaryMember>
- <DictionaryMember name="strokePattern" value="null" id="::PaintOptions::strokePattern">
- <webidl> DOMString? strokePattern = null;</webidl>
- <Type type="DOMString" nullable="nullable"/>
- </DictionaryMember>
- <DictionaryMember name="position" id="::PaintOptions::position">
- <webidl> <ref>Point</ref> position;</webidl>
- <Type name="Point"/>
- </DictionaryMember>
- </Dictionary>
- <Dictionary name="WetPaintOptions" id="::WetPaintOptions">
- <webidl>dictionary WetPaintOptions : <ref>PaintOptions</ref> {
- float hydrometry;
-};</webidl>
- <DictionaryInheritance>
- <Name name="PaintOptions"/>
- </DictionaryInheritance>
- <DictionaryMember name="hydrometry" id="::WetPaintOptions::hydrometry">
- <webidl> float hydrometry;</webidl>
- <Type type="float"/>
- </DictionaryMember>
- </Dictionary>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/dictionary.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/dictionary.widlprocxml
deleted file mode 100644
index 978ccb4e271..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/dictionary.widlprocxml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>dictionary PaintOptions {
- DOMString? fillPattern = &quot;black&quot;;
- DOMString? strokePattern = null;
- <ref>Point</ref> position;
-};
-
-partial dictionary A {
- long h;
- long d;
-};</webidl>
- <Dictionary name="PaintOptions" id="::PaintOptions">
- <webidl>dictionary PaintOptions {
- DOMString? fillPattern = &quot;black&quot;;
- DOMString? strokePattern = null;
- <ref>Point</ref> position;
-};</webidl>
- <DictionaryMember name="fillPattern" stringvalue="black" id="::PaintOptions::fillPattern">
- <webidl> DOMString? fillPattern = &quot;black&quot;;</webidl>
- <Type type="DOMString" nullable="nullable"/>
- </DictionaryMember>
- <DictionaryMember name="strokePattern" value="null" id="::PaintOptions::strokePattern">
- <webidl> DOMString? strokePattern = null;</webidl>
- <Type type="DOMString" nullable="nullable"/>
- </DictionaryMember>
- <DictionaryMember name="position" id="::PaintOptions::position">
- <webidl> <ref>Point</ref> position;</webidl>
- <Type name="Point"/>
- </DictionaryMember>
- </Dictionary>
- <Dictionary name="A" partial="partial" id="::A">
- <webidl>partial dictionary A {
- long h;
- long d;
-};</webidl>
- <DictionaryMember name="h" id="::A::h">
- <webidl> long h;</webidl>
- <Type type="long"/>
- </DictionaryMember>
- <DictionaryMember name="d" id="::A::d">
- <webidl> long d;</webidl>
- <Type type="long"/>
- </DictionaryMember>
- </Dictionary>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/documentation-dos.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/documentation-dos.widlprocxml
deleted file mode 100644
index 1611f0e576a..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/documentation-dos.widlprocxml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Documentation {};</webidl>
- <Interface name="Documentation" id="::Documentation">
- <webidl>interface Documentation {};</webidl>
- <descriptive>
- <brief>
- Testing documentation features
- </brief>
- <description>
- <p>
-This is a
-single paragraph
- </p>
- <p>
-This is valid. </p>
- <p>
-This is <em>valid</em>. </p>
- <p>
-This is <b>valid</b>. </p>
- <p>
-This is <a href=''>valid</a>. </p>
- <ul>
- <li>
-This </li>
- <li>
-is </li>
- <li>
-valid </li>
- </ul>
- <dl>
- <dt>
-This </dt>
- <dd>
-valid </dd>
- </dl>
- <table>
- <tr>
- <td>
-this </td>
- <td>
-is </td>
- </tr>
- <tr>
- <td>
-valid </td>
- </tr>
- </table>
- <p>
-This is <br/> valid. </p>
- <p>
-This is <br /> valid. </p>
- <p>
-This is <br/> valid. </p>
- </description>
- </descriptive>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/documentation.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/documentation.widlprocxml
deleted file mode 100644
index afe4527c221..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/documentation.widlprocxml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Documentation {};</webidl>
- <Interface name="Documentation" id="::Documentation">
- <webidl>interface Documentation {};</webidl>
- <descriptive>
- <brief>
- Testing documentation features
- </brief>
- <description>
- <p>
-This is a
-single paragraph
- </p>
- <p>
-This is valid. </p>
- <p>
-This is <em>valid</em>. </p>
- <p>
-This is <b>valid</b>. </p>
- <p>
-This is <a href=''>valid</a>. </p>
- <ul>
- <li>
-This </li>
- <li>
-is </li>
- <li>
-valid </li>
- </ul>
- <dl>
- <dt>
-This </dt>
- <dd>
-valid </dd>
- </dl>
- <table>
- <tr>
- <td>
-this </td>
- <td>
-is </td>
- </tr>
- <tr>
- <td>
-valid </td>
- </tr>
- </table>
- <p>
-This is <br/> valid. </p>
- <p>
-This is <br /> valid. </p>
- <p>
-This is <br/> valid. </p>
- <p>
-<img src="foo.png" alt="Valid"/> </p>
- </description>
- </descriptive>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/enum.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/enum.widlprocxml
deleted file mode 100644
index e1e8258fbd0..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/enum.widlprocxml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>enum MealType { &quot;rice&quot;, &quot;noodles&quot;, &quot;other&quot; };
-
-interface Meal {
- attribute <ref>MealType</ref> type;
- attribute float size;
-
- void initialize(<ref>MealType</ref> type, float size);
-};</webidl>
- <Enum name="MealType" id="::MealType">
- <webidl>enum MealType { &quot;rice&quot;, &quot;noodles&quot;, &quot;other&quot; };</webidl>
- <EnumValue stringvalue="rice">
- <webidl> &quot;rice</webidl>
- </EnumValue>
- <EnumValue stringvalue="noodles">
- <webidl> &quot;noodles</webidl>
- </EnumValue>
- <EnumValue stringvalue="other">
- <webidl> &quot;other</webidl>
- </EnumValue>
- </Enum>
- <Interface name="Meal" id="::Meal">
- <webidl>interface Meal {
- attribute <ref>MealType</ref> type;
- attribute float size;
-
- void initialize(<ref>MealType</ref> type, float size);
-};</webidl>
- <Attribute name="type" id="::Meal::type">
- <webidl> attribute <ref>MealType</ref> type;</webidl>
- <Type name="MealType"/>
- </Attribute>
- <Attribute name="size" id="::Meal::size">
- <webidl> attribute float size;</webidl>
- <Type type="float"/>
- </Attribute>
- <Operation name="initialize" id="::Meal::initialize">
- <webidl> void initialize(<ref>MealType</ref> type, float size);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="type">
- <Type name="MealType"/>
- </Argument>
- <Argument name="size">
- <Type type="float"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/equivalent-decl.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/equivalent-decl.widlprocxml
deleted file mode 100644
index c322d0a5e22..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/equivalent-decl.widlprocxml
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Dictionary {
- readonly attribute unsigned long propertyCount;
-
- getter float getProperty(DOMString propertyName);
- setter void setProperty(DOMString propertyName, float propertyValue);
-};
-
-
-interface Dictionary {
- readonly attribute unsigned long propertyCount;
-
- float getProperty(DOMString propertyName);
- void setProperty(DOMString propertyName, float propertyValue);
-
- getter float (DOMString propertyName);
- setter void (DOMString propertyName, float propertyValue);
-};</webidl>
- <Interface name="Dictionary" id="::Dictionary">
- <webidl>interface Dictionary {
- readonly attribute unsigned long propertyCount;
-
- getter float getProperty(DOMString propertyName);
- setter void setProperty(DOMString propertyName, float propertyValue);
-};</webidl>
- <Attribute readonly="readonly" name="propertyCount" id="::Dictionary::propertyCount">
- <webidl> readonly attribute unsigned long propertyCount;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Operation getter="getter" name="getProperty" id="::Dictionary::getProperty">
- <webidl> getter float getProperty(DOMString propertyName);</webidl>
- <Type type="float"/>
- <ArgumentList>
- <Argument name="propertyName">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation setter="setter" name="setProperty" id="::Dictionary::setProperty">
- <webidl> setter void setProperty(DOMString propertyName, float propertyValue);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="propertyName">
- <Type type="DOMString"/>
- </Argument>
- <Argument name="propertyValue">
- <Type type="float"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
- <Interface name="Dictionary" id="::Dictionary">
- <webidl>interface Dictionary {
- readonly attribute unsigned long propertyCount;
-
- float getProperty(DOMString propertyName);
- void setProperty(DOMString propertyName, float propertyValue);
-
- getter float (DOMString propertyName);
- setter void (DOMString propertyName, float propertyValue);
-};</webidl>
- <Attribute readonly="readonly" name="propertyCount" id="::Dictionary::propertyCount">
- <webidl> readonly attribute unsigned long propertyCount;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Operation name="getProperty" id="::Dictionary::getProperty">
- <webidl> float getProperty(DOMString propertyName);</webidl>
- <Type type="float"/>
- <ArgumentList>
- <Argument name="propertyName">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation name="setProperty" id="::Dictionary::setProperty">
- <webidl> void setProperty(DOMString propertyName, float propertyValue);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="propertyName">
- <Type type="DOMString"/>
- </Argument>
- <Argument name="propertyValue">
- <Type type="float"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation getter="getter">
- <webidl> getter float (DOMString propertyName);</webidl>
- <Type type="float"/>
- <ArgumentList>
- <Argument name="propertyName">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation setter="setter">
- <webidl> setter void (DOMString propertyName, float propertyValue);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="propertyName">
- <Type type="DOMString"/>
- </Argument>
- <Argument name="propertyValue">
- <Type type="float"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/exception-inheritance.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/exception-inheritance.widlprocxml
deleted file mode 100644
index 3a1f868a4b4..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/exception-inheritance.widlprocxml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl> exception DOMException {
- unsigned short code;
- };
-
- exception HierarchyRequestError : <ref>DOMException</ref> { };
- exception NoModificationAllowedError : <ref>DOMException</ref> { };</webidl>
- <Exception name="DOMException" id="::DOMException">
- <webidl> exception DOMException {
- unsigned short code;
- };</webidl>
- <ExceptionField name="code" id="::DOMException::code">
- <webidl> unsigned short code;</webidl>
- <Type type="unsigned short"/>
- </ExceptionField>
- </Exception>
- <Exception name="HierarchyRequestError" id="::HierarchyRequestError">
- <webidl> exception HierarchyRequestError : <ref>DOMException</ref> { };</webidl>
- <ExceptionInheritance>
- <Name name="DOMException"/>
- </ExceptionInheritance>
- </Exception>
- <Exception name="NoModificationAllowedError" id="::NoModificationAllowedError">
- <webidl> exception NoModificationAllowedError : <ref>DOMException</ref> { };</webidl>
- <ExceptionInheritance>
- <Name name="DOMException"/>
- </ExceptionInheritance>
- </Exception>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/exception.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/exception.widlprocxml
deleted file mode 100644
index ac93320fe16..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/exception.widlprocxml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Dahut {
- attribute DOMString type;
-};
-
-exception SomeException {
-};</webidl>
- <Interface name="Dahut" id="::Dahut">
- <webidl>interface Dahut {
- attribute DOMString type;
-};</webidl>
- <Attribute name="type" id="::Dahut::type">
- <webidl> attribute DOMString type;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- </Interface>
- <Exception name="SomeException" id="::SomeException">
- <webidl>exception SomeException {
-};</webidl>
- </Exception>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/getter-setter.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/getter-setter.widlprocxml
deleted file mode 100644
index 76afc058c68..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/getter-setter.widlprocxml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Dictionary {
- readonly attribute unsigned long propertyCount;
-
- getter float (DOMString propertyName);
- setter void (DOMString propertyName, float propertyValue);
-};</webidl>
- <Interface name="Dictionary" id="::Dictionary">
- <webidl>interface Dictionary {
- readonly attribute unsigned long propertyCount;
-
- getter float (DOMString propertyName);
- setter void (DOMString propertyName, float propertyValue);
-};</webidl>
- <Attribute readonly="readonly" name="propertyCount" id="::Dictionary::propertyCount">
- <webidl> readonly attribute unsigned long propertyCount;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Operation getter="getter">
- <webidl> getter float (DOMString propertyName);</webidl>
- <Type type="float"/>
- <ArgumentList>
- <Argument name="propertyName">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation setter="setter">
- <webidl> setter void (DOMString propertyName, float propertyValue);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="propertyName">
- <Type type="DOMString"/>
- </Argument>
- <Argument name="propertyValue">
- <Type type="float"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/identifier-qualified-names.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/identifier-qualified-names.widlprocxml
deleted file mode 100644
index b6024e5ff68..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/identifier-qualified-names.widlprocxml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl> typedef float number;
-
- exception FrameworkException {
-
- const long ERR_NOT_FOUND = 1;
-
- long code;
- };
-
- interface System {
-
- object createObject(DOMString _interface);
-
- getter DOMString (DOMString keyName);
- };
-
-
- interface TextField {
-
- attribute boolean _const;
-
- attribute DOMString? _value;
- };
-
-interface Foo {
- void op(object interface);
-};</webidl>
- <Typedef name="number" id="::number">
- <webidl> typedef float number;</webidl>
- <Type type="float"/>
- </Typedef>
- <Exception name="FrameworkException" id="::FrameworkException">
- <webidl> exception FrameworkException {
-
- const long ERR_NOT_FOUND = 1;
-
- long code;
- };</webidl>
- <Const name="ERR_NOT_FOUND" value="1" id="::FrameworkException::ERR_NOT_FOUND">
- <webidl> const long ERR_NOT_FOUND = 1;</webidl>
- <Type type="long"/>
- </Const>
- <ExceptionField name="code" id="::FrameworkException::code">
- <webidl> long code;</webidl>
- <Type type="long"/>
- </ExceptionField>
- </Exception>
- <Interface name="System" id="::System">
- <webidl> interface System {
-
- object createObject(DOMString _interface);
-
- getter DOMString (DOMString keyName);
- };</webidl>
- <Operation name="createObject" id="::System::createObject">
- <webidl> object createObject(DOMString _interface);</webidl>
- <Type type="object"/>
- <ArgumentList>
- <Argument name="_interface">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation getter="getter">
- <webidl> getter DOMString (DOMString keyName);</webidl>
- <Type type="DOMString"/>
- <ArgumentList>
- <Argument name="keyName">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
- <Interface name="TextField" id="::TextField">
- <webidl> interface TextField {
-
- attribute boolean _const;
-
- attribute DOMString? _value;
- };</webidl>
- <Attribute name="_const" id="::TextField::_const">
- <webidl> attribute boolean _const;</webidl>
- <Type type="boolean"/>
- </Attribute>
- <Attribute name="_value" id="::TextField::_value">
- <webidl> attribute DOMString? _value;</webidl>
- <Type type="DOMString" nullable="nullable"/>
- </Attribute>
- </Interface>
- <Interface name="Foo" id="::Foo">
- <webidl>interface Foo {
- void op(object interface);
-};</webidl>
- <Operation name="op" id="::Foo::op">
- <webidl> void op(object interface);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="interface">
- <Type type="object"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/implements.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/implements.widlprocxml
deleted file mode 100644
index 3d1c1ab8478..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/implements.widlprocxml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl> interface Node {
- readonly attribute unsigned short nodeType;
- };
-
- interface EventTarget {
- void addEventListener(DOMString type,
- <ref>EventListener</ref> listener,
- boolean useCapture);
- };
-
- <ref>Node</ref> implements <ref>EventTarget</ref>;</webidl>
- <Interface name="Node" id="::Node">
- <webidl> interface Node {
- readonly attribute unsigned short nodeType;
- };</webidl>
- <Attribute readonly="readonly" name="nodeType" id="::Node::nodeType">
- <webidl> readonly attribute unsigned short nodeType;</webidl>
- <Type type="unsigned short"/>
- </Attribute>
- </Interface>
- <Interface name="EventTarget" id="::EventTarget">
- <webidl> interface EventTarget {
- void addEventListener(DOMString type,
- <ref>EventListener</ref> listener,
- boolean useCapture);
- };</webidl>
- <Operation name="addEventListener" id="::EventTarget::addEventListener">
- <webidl> void addEventListener(DOMString type,
- <ref>EventListener</ref> listener,
- boolean useCapture);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="type">
- <Type type="DOMString"/>
- </Argument>
- <Argument name="listener">
- <Type name="EventListener"/>
- </Argument>
- <Argument name="useCapture">
- <Type type="boolean"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
- <Implements name1="Node" name2="EventTarget">
- <webidl> <ref>Node</ref> implements <ref>EventTarget</ref>;</webidl>
- </Implements>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/indexed-properties.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/indexed-properties.widlprocxml
deleted file mode 100644
index fb83621b60d..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/indexed-properties.widlprocxml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface OrderedMap {
- readonly attribute unsigned long size;
-
- getter any getByIndex(unsigned long index);
- setter void setByIndex(unsigned long index, any value);
- deleter void removeByIndex(unsigned long index);
-
- getter any get(DOMString name);
- setter creator void set(DOMString name, any value);
- deleter void remove(DOMString name);
-};</webidl>
- <Interface name="OrderedMap" id="::OrderedMap">
- <webidl>interface OrderedMap {
- readonly attribute unsigned long size;
-
- getter any getByIndex(unsigned long index);
- setter void setByIndex(unsigned long index, any value);
- deleter void removeByIndex(unsigned long index);
-
- getter any get(DOMString name);
- setter creator void set(DOMString name, any value);
- deleter void remove(DOMString name);
-};</webidl>
- <Attribute readonly="readonly" name="size" id="::OrderedMap::size">
- <webidl> readonly attribute unsigned long size;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Operation getter="getter" name="getByIndex" id="::OrderedMap::getByIndex">
- <webidl> getter any getByIndex(unsigned long index);</webidl>
- <Type type="any"/>
- <ArgumentList>
- <Argument name="index">
- <Type type="unsigned long"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation setter="setter" name="setByIndex" id="::OrderedMap::setByIndex">
- <webidl> setter void setByIndex(unsigned long index, any value);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="index">
- <Type type="unsigned long"/>
- </Argument>
- <Argument name="value">
- <Type type="any"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation deleter="deleter" name="removeByIndex" id="::OrderedMap::removeByIndex">
- <webidl> deleter void removeByIndex(unsigned long index);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="index">
- <Type type="unsigned long"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation getter="getter" name="get" id="::OrderedMap::get">
- <webidl> getter any get(DOMString name);</webidl>
- <Type type="any"/>
- <ArgumentList>
- <Argument name="name">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation setter="setter" creator="creator" name="set" id="::OrderedMap::set">
- <webidl> setter creator void set(DOMString name, any value);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="name">
- <Type type="DOMString"/>
- </Argument>
- <Argument name="value">
- <Type type="any"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation deleter="deleter" name="remove" id="::OrderedMap::remove">
- <webidl> deleter void remove(DOMString name);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="name">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/inherits-getter.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/inherits-getter.widlprocxml
deleted file mode 100644
index 55e7a317fd9..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/inherits-getter.widlprocxml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Animal {
-
- readonly attribute DOMString name;
-};
-
-interface Person : <ref>Animal</ref> {
-
- readonly attribute unsigned short age;
-
- inherit attribute DOMString name;
-};</webidl>
- <Interface name="Animal" id="::Animal">
- <webidl>interface Animal {
-
- readonly attribute DOMString name;
-};</webidl>
- <Attribute readonly="readonly" name="name" id="::Animal::name">
- <webidl> readonly attribute DOMString name;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- </Interface>
- <Interface name="Person" id="::Person">
- <webidl>interface Person : <ref>Animal</ref> {
-
- readonly attribute unsigned short age;
-
- inherit attribute DOMString name;
-};</webidl>
- <InterfaceInheritance>
- <Name name="Animal"/>
- </InterfaceInheritance>
- <Attribute readonly="readonly" name="age" id="::Person::age">
- <webidl> readonly attribute unsigned short age;</webidl>
- <Type type="unsigned short"/>
- </Attribute>
- <Attribute inherit="inherit" name="name" id="::Person::name">
- <webidl> inherit attribute DOMString name;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/interface-inherits.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/interface-inherits.widlprocxml
deleted file mode 100644
index 94f0e29df05..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/interface-inherits.widlprocxml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Animal {
- attribute DOMString name;
-};
-
-interface Human : <ref>Animal</ref> {
- attribute <ref>Dog</ref> pet;
-};
-
-interface Dog : <ref>Animal</ref> {
- attribute <ref>Human</ref> owner;
-};</webidl>
- <Interface name="Animal" id="::Animal">
- <webidl>interface Animal {
- attribute DOMString name;
-};</webidl>
- <Attribute name="name" id="::Animal::name">
- <webidl> attribute DOMString name;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- </Interface>
- <Interface name="Human" id="::Human">
- <webidl>interface Human : <ref>Animal</ref> {
- attribute <ref>Dog</ref> pet;
-};</webidl>
- <InterfaceInheritance>
- <Name name="Animal"/>
- </InterfaceInheritance>
- <Attribute name="pet" id="::Human::pet">
- <webidl> attribute <ref>Dog</ref> pet;</webidl>
- <Type name="Dog"/>
- </Attribute>
- </Interface>
- <Interface name="Dog" id="::Dog">
- <webidl>interface Dog : <ref>Animal</ref> {
- attribute <ref>Human</ref> owner;
-};</webidl>
- <InterfaceInheritance>
- <Name name="Animal"/>
- </InterfaceInheritance>
- <Attribute name="owner" id="::Dog::owner">
- <webidl> attribute <ref>Human</ref> owner;</webidl>
- <Type name="Human"/>
- </Attribute>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/iterator.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/iterator.widlprocxml
deleted file mode 100644
index 8ca95fbbd17..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/iterator.widlprocxml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface SessionManager {
- <ref>Session</ref> getSessionForUser(DOMString username);
- readonly attribute unsigned long sessionCount;
-
- <ref>Session</ref> iterator;
-};
-
-interface Session {
- readonly attribute DOMString username;
-};
-
-interface SessionManager2 {
- <ref>Session2</ref> getSessionForUser(DOMString username);
- readonly attribute unsigned long sessionCount;
-
- <ref>Session2</ref> iterator = SessionIterator;
-};
-
-interface Session2 {
- readonly attribute DOMString username;
-};
-
-interface SessionIterator {
- readonly attribute unsigned long remainingSessions;
-};
-
- interface NodeList {
- <ref>Node</ref> iterator = NodeIterator;
- };
-
- interface NodeIterator {
- <ref>Node</ref> iterator object;
- };</webidl>
- <Interface name="SessionManager" id="::SessionManager">
- <webidl>interface SessionManager {
- <ref>Session</ref> getSessionForUser(DOMString username);
- readonly attribute unsigned long sessionCount;
-
- <ref>Session</ref> iterator;
-};</webidl>
- <Operation name="getSessionForUser" id="::SessionManager::getSessionForUser">
- <webidl> <ref>Session</ref> getSessionForUser(DOMString username);</webidl>
- <Type name="Session"/>
- <ArgumentList>
- <Argument name="username">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Attribute readonly="readonly" name="sessionCount" id="::SessionManager::sessionCount">
- <webidl> readonly attribute unsigned long sessionCount;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Iterator>
- <webidl> <ref>Session</ref> iterator;</webidl>
- <Type name="Session"/>
- </Iterator>
- </Interface>
- <Interface name="Session" id="::Session">
- <webidl>interface Session {
- readonly attribute DOMString username;
-};</webidl>
- <Attribute readonly="readonly" name="username" id="::Session::username">
- <webidl> readonly attribute DOMString username;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- </Interface>
- <Interface name="SessionManager2" id="::SessionManager2">
- <webidl>interface SessionManager2 {
- <ref>Session2</ref> getSessionForUser(DOMString username);
- readonly attribute unsigned long sessionCount;
-
- <ref>Session2</ref> iterator = SessionIterator;
-};</webidl>
- <Operation name="getSessionForUser" id="::SessionManager2::getSessionForUser">
- <webidl> <ref>Session2</ref> getSessionForUser(DOMString username);</webidl>
- <Type name="Session2"/>
- <ArgumentList>
- <Argument name="username">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Attribute readonly="readonly" name="sessionCount" id="::SessionManager2::sessionCount">
- <webidl> readonly attribute unsigned long sessionCount;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Iterator interface="SessionIterator">
- <webidl> <ref>Session2</ref> iterator = SessionIterator;</webidl>
- <Type name="Session2"/>
- </Iterator>
- </Interface>
- <Interface name="Session2" id="::Session2">
- <webidl>interface Session2 {
- readonly attribute DOMString username;
-};</webidl>
- <Attribute readonly="readonly" name="username" id="::Session2::username">
- <webidl> readonly attribute DOMString username;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- </Interface>
- <Interface name="SessionIterator" id="::SessionIterator">
- <webidl>interface SessionIterator {
- readonly attribute unsigned long remainingSessions;
-};</webidl>
- <Attribute readonly="readonly" name="remainingSessions" id="::SessionIterator::remainingSessions">
- <webidl> readonly attribute unsigned long remainingSessions;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- </Interface>
- <Interface name="NodeList" id="::NodeList">
- <webidl> interface NodeList {
- <ref>Node</ref> iterator = NodeIterator;
- };</webidl>
- <Iterator interface="NodeIterator">
- <webidl> <ref>Node</ref> iterator = NodeIterator;</webidl>
- <Type name="Node"/>
- </Iterator>
- </Interface>
- <Interface name="NodeIterator" id="::NodeIterator">
- <webidl> interface NodeIterator {
- <ref>Node</ref> iterator object;
- };</webidl>
- <IteratorObject>
- <webidl> <ref>Node</ref> iterator object;</webidl>
- <Type name="Node"/>
- </IteratorObject>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/module.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/module.widlprocxml
deleted file mode 100644
index b575b8705af..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/module.widlprocxml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <Module name="gfx" id="::gfx">
- <webidl>module gfx {
-
- module geom {
- interface Shape { };
- interface Rectangle : <ref>Shape</ref> { };
- interface Path : <ref>Shape</ref> { };
- };
-
- interface GraphicsContext {
- void fillShape(<ref>geom::Shape</ref> s);
- void strokeShape(<ref>geom::Shape</ref> s);
- };
-};</webidl>
- <Module name="geom" id="::gfx::geom">
- <webidl> module geom {
- interface Shape { };
- interface Rectangle : <ref>Shape</ref> { };
- interface Path : <ref>Shape</ref> { };
- };</webidl>
- <Interface name="Shape" id="::gfx::geom::Shape">
- <webidl> interface Shape { };</webidl>
- </Interface>
- <Interface name="Rectangle" id="::gfx::geom::Rectangle">
- <webidl> interface Rectangle : <ref>Shape</ref> { };</webidl>
- <InterfaceInheritance>
- <Name name="Shape"/>
- </InterfaceInheritance>
- </Interface>
- <Interface name="Path" id="::gfx::geom::Path">
- <webidl> interface Path : <ref>Shape</ref> { };</webidl>
- <InterfaceInheritance>
- <Name name="Shape"/>
- </InterfaceInheritance>
- </Interface>
- </Module>
- <Interface name="GraphicsContext" id="::gfx::GraphicsContext">
- <webidl> interface GraphicsContext {
- void fillShape(<ref>geom::Shape</ref> s);
- void strokeShape(<ref>geom::Shape</ref> s);
- };</webidl>
- <Operation name="fillShape" id="::gfx::GraphicsContext::fillShape">
- <webidl> void fillShape(<ref>geom::Shape</ref> s);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="s">
- <Type name="geom::Shape"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation name="strokeShape" id="::gfx::GraphicsContext::strokeShape">
- <webidl> void strokeShape(<ref>geom::Shape</ref> s);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="s">
- <Type name="geom::Shape"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
- </Module>
- <Module name="gui" id="::gui">
- <webidl>module gui {
-
- interface Widget { };
-
- interface Window : <ref>Widget</ref> {
- <ref>gfx::GraphicsContext</ref> getGraphicsContext();
- };
-
- interface Button : <ref>Widget</ref> { };
-};</webidl>
- <Interface name="Widget" id="::gui::Widget">
- <webidl> interface Widget { };</webidl>
- </Interface>
- <Interface name="Window" id="::gui::Window">
- <webidl> interface Window : <ref>Widget</ref> {
- <ref>gfx::GraphicsContext</ref> getGraphicsContext();
- };</webidl>
- <InterfaceInheritance>
- <Name name="Widget"/>
- </InterfaceInheritance>
- <Operation name="getGraphicsContext" id="::gui::Window::getGraphicsContext">
- <webidl> <ref>gfx::GraphicsContext</ref> getGraphicsContext();</webidl>
- <Type name="gfx::GraphicsContext"/>
- <ArgumentList/>
- </Operation>
- </Interface>
- <Interface name="Button" id="::gui::Button">
- <webidl> interface Button : <ref>Widget</ref> { };</webidl>
- <InterfaceInheritance>
- <Name name="Widget"/>
- </InterfaceInheritance>
- </Interface>
- </Module>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/namedconstructor.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/namedconstructor.widlprocxml
deleted file mode 100644
index 9f661612879..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/namedconstructor.widlprocxml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>[NamedConstructor=Audio,
- NamedConstructor=Audio(DOMString src)]
-interface HTMLAudioElement : <ref>HTMLMediaElement</ref> {
-};</webidl>
- <Interface name="HTMLAudioElement" id="::HTMLAudioElement">
- <webidl>[NamedConstructor=Audio,
- NamedConstructor=Audio(DOMString src)]
-interface HTMLAudioElement : <ref>HTMLMediaElement</ref> {
-};</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="NamedConstructor" value="Audio">
- <webidl>NamedConstructor</webidl>
- </ExtendedAttribute>
- <ExtendedAttribute name="NamedConstructor" value="Audio">
- <webidl> NamedConstructor=Audio(DOMString src)</webidl>
- <ArgumentList>
- <Argument name="src">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <InterfaceInheritance>
- <Name name="HTMLMediaElement"/>
- </InterfaceInheritance>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/namespaceobject.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/namespaceobject.widlprocxml
deleted file mode 100644
index af0cde93719..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/namespaceobject.widlprocxml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <Module name="acme" id="::acme">
- <webidl>[NamespaceObject]
-module acme {
-
- exception DeviceException { };
-
- module pim {
-
- [Constructor]
- interface Contact { };
-
- [Constructor,
- NamedConstructor=RecurringEvent(long freq)]
- interface CalendarEvent { };
- };
-};</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="NamespaceObject"/>
- </ExtendedAttributeList>
- <Exception name="DeviceException" id="::acme::DeviceException">
- <webidl> exception DeviceException { };</webidl>
- </Exception>
- <Module name="pim" id="::acme::pim">
- <webidl> module pim {
-
- [Constructor]
- interface Contact { };
-
- [Constructor,
- NamedConstructor=RecurringEvent(long freq)]
- interface CalendarEvent { };
- };</webidl>
- <Interface name="Contact" id="::acme::pim::Contact">
- <webidl> [Constructor]
- interface Contact { };</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="Constructor"/>
- </ExtendedAttributeList>
- </Interface>
- <Interface name="CalendarEvent" id="::acme::pim::CalendarEvent">
- <webidl> [Constructor,
- NamedConstructor=RecurringEvent(long freq)]
- interface CalendarEvent { };</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="Constructor"/>
- <ExtendedAttribute name="NamedConstructor" value="RecurringEvent">
- <ArgumentList>
- <Argument name="freq">
- <Type type="long"/>
- </Argument>
- </ArgumentList>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- </Interface>
- </Module>
- </Module>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/nointerfaceobject.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/nointerfaceobject.widlprocxml
deleted file mode 100644
index f64f116b60f..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/nointerfaceobject.widlprocxml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>[NoInterfaceObject]
-interface Query {
- any lookupEntry(unsigned long key);
-};</webidl>
- <Interface name="Query" id="::Query">
- <webidl>[NoInterfaceObject]
-interface Query {
- any lookupEntry(unsigned long key);
-};</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="NoInterfaceObject">
- <webidl>NoInterfaceObject</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Operation name="lookupEntry" id="::Query::lookupEntry">
- <webidl> any lookupEntry(unsigned long key);</webidl>
- <Type type="any"/>
- <ArgumentList>
- <Argument name="key">
- <Type type="unsigned long"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/nullable.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/nullable.widlprocxml
deleted file mode 100644
index 8739e443262..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/nullable.widlprocxml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface MyConstants {
- const boolean? ARE_WE_THERE_YET = false;
-};
-
-interface Node {
- readonly attribute DOMString? namespaceURI;
-};</webidl>
- <Interface name="MyConstants" id="::MyConstants">
- <webidl>interface MyConstants {
- const boolean? ARE_WE_THERE_YET = false;
-};</webidl>
- <Const name="ARE_WE_THERE_YET" value="false" id="::MyConstants::ARE_WE_THERE_YET">
- <webidl> const boolean? ARE_WE_THERE_YET = false;</webidl>
- <Type type="boolean" nullable="nullable"/>
- </Const>
- </Interface>
- <Interface name="Node" id="::Node">
- <webidl>interface Node {
- readonly attribute DOMString? namespaceURI;
-};</webidl>
- <Attribute readonly="readonly" name="namespaceURI" id="::Node::namespaceURI">
- <webidl> readonly attribute DOMString? namespaceURI;</webidl>
- <Type type="DOMString" nullable="nullable"/>
- </Attribute>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/nullableobjects.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/nullableobjects.widlprocxml
deleted file mode 100644
index 22d9fdd25d6..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/nullableobjects.widlprocxml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface A {
-};
-interface B {
-};
-interface C {
- void f(<ref>A</ref>? x);
- void f(<ref>B</ref>? x);
-
-};</webidl>
- <Interface name="A" id="::A">
- <webidl>interface A {
-};</webidl>
- </Interface>
- <Interface name="B" id="::B">
- <webidl>interface B {
-};</webidl>
- </Interface>
- <Interface name="C" id="::C">
- <webidl>interface C {
- void f(<ref>A</ref>? x);
- void f(<ref>B</ref>? x);
-
-};</webidl>
- <Operation name="f" id="::C::f">
- <webidl> void f(<ref>A</ref>? x);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="x">
- <Type name="A" nullable="nullable"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation name="f" id="::C::f">
- <webidl> void f(<ref>B</ref>? x);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="x">
- <Type name="B" nullable="nullable"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/operation-optional-arg.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/operation-optional-arg.widlprocxml
deleted file mode 100644
index 54aef1f87e3..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/operation-optional-arg.widlprocxml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface ColorCreator {
- object createColor(float v1, float v2, float v3, optional float alpha = 3.5);
-};</webidl>
- <Interface name="ColorCreator" id="::ColorCreator">
- <webidl>interface ColorCreator {
- object createColor(float v1, float v2, float v3, optional float alpha = 3.5);
-};</webidl>
- <Operation name="createColor" id="::ColorCreator::createColor">
- <webidl> object createColor(float v1, float v2, float v3, optional float alpha = 3.5);</webidl>
- <Type type="object"/>
- <ArgumentList>
- <Argument name="v1">
- <Type type="float"/>
- </Argument>
- <Argument name="v2">
- <Type type="float"/>
- </Argument>
- <Argument name="v3">
- <Type type="float"/>
- </Argument>
- <Argument optional="optional" name="alpha" value="3.5">
- <Type type="float"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/overloading.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/overloading.widlprocxml
deleted file mode 100644
index db6da7a68c7..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/overloading.widlprocxml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface A {
-};
-
-interface B {
-};
-
-interface C {
- void f(<ref>A</ref> x);
- void f(<ref>B</ref> x);
-};
-
-interface A {
-void f(DOMString a);
-void f([AllowAny] DOMString a, DOMString b, float... c);
-void f();
-void f(long a, DOMString b, optional DOMString c, float... d);
-};</webidl>
- <Interface name="A" id="::A">
- <webidl>interface A {
-};</webidl>
- </Interface>
- <Interface name="B" id="::B">
- <webidl>interface B {
-};</webidl>
- </Interface>
- <Interface name="C" id="::C">
- <webidl>interface C {
- void f(<ref>A</ref> x);
- void f(<ref>B</ref> x);
-};</webidl>
- <Operation name="f" id="::C::f">
- <webidl> void f(<ref>A</ref> x);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="x">
- <Type name="A"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation name="f" id="::C::f">
- <webidl> void f(<ref>B</ref> x);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="x">
- <Type name="B"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
- <Interface name="A" id="::A">
- <webidl>interface A {
-void f(DOMString a);
-void f([AllowAny] DOMString a, DOMString b, float... c);
-void f();
-void f(long a, DOMString b, optional DOMString c, float... d);
-};</webidl>
- <Operation name="f" id="::A::f">
- <webidl> void f(DOMString a);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="a">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation name="f" id="::A::f">
- <webidl> void f([AllowAny] DOMString a, DOMString b, float... c);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="a">
- <ExtendedAttributeList>
- <ExtendedAttribute name="AllowAny">
- <webidl>AllowAny</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Type type="DOMString"/>
- </Argument>
- <Argument name="b">
- <Type type="DOMString"/>
- </Argument>
- <Argument ellipsis="ellipsis" name="c">
- <Type type="float"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation name="f" id="::A::f">
- <webidl> void f();</webidl>
- <Type type="void"/>
- <ArgumentList/>
- </Operation>
- <Operation name="f" id="::A::f">
- <webidl> void f(long a, DOMString b, optional DOMString c, float... d);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="a">
- <Type type="long"/>
- </Argument>
- <Argument name="b">
- <Type type="DOMString"/>
- </Argument>
- <Argument optional="optional" name="c">
- <Type type="DOMString"/>
- </Argument>
- <Argument ellipsis="ellipsis" name="d">
- <Type type="float"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/overridebuiltins.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/overridebuiltins.widlprocxml
deleted file mode 100644
index 56c92517beb..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/overridebuiltins.widlprocxml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>[OverrideBuiltins]
-interface StringMap2 {
- readonly attribute unsigned long length;
- getter DOMString lookup(DOMString key);
-};</webidl>
- <Interface name="StringMap2" id="::StringMap2">
- <webidl>[OverrideBuiltins]
-interface StringMap2 {
- readonly attribute unsigned long length;
- getter DOMString lookup(DOMString key);
-};</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="OverrideBuiltins">
- <webidl>OverrideBuiltins</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Attribute readonly="readonly" name="length" id="::StringMap2::length">
- <webidl> readonly attribute unsigned long length;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Operation getter="getter" name="lookup" id="::StringMap2::lookup">
- <webidl> getter DOMString lookup(DOMString key);</webidl>
- <Type type="DOMString"/>
- <ArgumentList>
- <Argument name="key">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/partial-interface.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/partial-interface.widlprocxml
deleted file mode 100644
index 8d7dcb4e4f7..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/partial-interface.widlprocxml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Foo {
- attribute DOMString bar;
-};
-
-partial interface Foo {
- attribute DOMString quux;
-};</webidl>
- <Interface name="Foo" id="::Foo">
- <webidl>interface Foo {
- attribute DOMString bar;
-};</webidl>
- <Attribute name="bar" id="::Foo::bar">
- <webidl> attribute DOMString bar;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- </Interface>
- <Interface name="Foo" partial="partial" id="::Foo">
- <webidl>partial interface Foo {
- attribute DOMString quux;
-};</webidl>
- <Attribute name="quux" id="::Foo::quux">
- <webidl> attribute DOMString quux;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/primitives.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/primitives.widlprocxml
deleted file mode 100644
index 46977a2d74e..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/primitives.widlprocxml
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Primitives {
- attribute boolean truth;
- attribute byte character;
- attribute octet value;
- attribute short number;
- attribute unsigned short positive;
- attribute long big;
- attribute unsigned long bigpositive;
- attribute long long bigbig;
- attribute unsigned long long bigbigpositive;
- attribute float real;
- attribute double bigreal;
- attribute unrestricted float realwithinfinity;
- attribute unrestricted double bigrealwithinfinity;
- attribute DOMString string;
- attribute ByteString bytes;
- attribute Date date;
- attribute RegExp regexp;
-};</webidl>
- <Interface name="Primitives" id="::Primitives">
- <webidl>interface Primitives {
- attribute boolean truth;
- attribute byte character;
- attribute octet value;
- attribute short number;
- attribute unsigned short positive;
- attribute long big;
- attribute unsigned long bigpositive;
- attribute long long bigbig;
- attribute unsigned long long bigbigpositive;
- attribute float real;
- attribute double bigreal;
- attribute unrestricted float realwithinfinity;
- attribute unrestricted double bigrealwithinfinity;
- attribute DOMString string;
- attribute ByteString bytes;
- attribute Date date;
- attribute RegExp regexp;
-};</webidl>
- <Attribute name="truth" id="::Primitives::truth">
- <webidl> attribute boolean truth;</webidl>
- <Type type="boolean"/>
- </Attribute>
- <Attribute name="character" id="::Primitives::character">
- <webidl> attribute byte character;</webidl>
- <Type type="byte"/>
- </Attribute>
- <Attribute name="value" id="::Primitives::value">
- <webidl> attribute octet value;</webidl>
- <Type type="octet"/>
- </Attribute>
- <Attribute name="number" id="::Primitives::number">
- <webidl> attribute short number;</webidl>
- <Type type="short"/>
- </Attribute>
- <Attribute name="positive" id="::Primitives::positive">
- <webidl> attribute unsigned short positive;</webidl>
- <Type type="unsigned short"/>
- </Attribute>
- <Attribute name="big" id="::Primitives::big">
- <webidl> attribute long big;</webidl>
- <Type type="long"/>
- </Attribute>
- <Attribute name="bigpositive" id="::Primitives::bigpositive">
- <webidl> attribute unsigned long bigpositive;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Attribute name="bigbig" id="::Primitives::bigbig">
- <webidl> attribute long long bigbig;</webidl>
- <Type type="long long"/>
- </Attribute>
- <Attribute name="bigbigpositive" id="::Primitives::bigbigpositive">
- <webidl> attribute unsigned long long bigbigpositive;</webidl>
- <Type type="unsigned long long"/>
- </Attribute>
- <Attribute name="real" id="::Primitives::real">
- <webidl> attribute float real;</webidl>
- <Type type="float"/>
- </Attribute>
- <Attribute name="bigreal" id="::Primitives::bigreal">
- <webidl> attribute double bigreal;</webidl>
- <Type type="double"/>
- </Attribute>
- <Attribute name="realwithinfinity" id="::Primitives::realwithinfinity">
- <webidl> attribute unrestricted float realwithinfinity;</webidl>
- <Type type="unrestricted float"/>
- </Attribute>
- <Attribute name="bigrealwithinfinity" id="::Primitives::bigrealwithinfinity">
- <webidl> attribute unrestricted double bigrealwithinfinity;</webidl>
- <Type type="unrestricted double"/>
- </Attribute>
- <Attribute name="string" id="::Primitives::string">
- <webidl> attribute DOMString string;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Attribute name="bytes" id="::Primitives::bytes">
- <webidl> attribute ByteString bytes;</webidl>
- <Type type="ByteString"/>
- </Attribute>
- <Attribute name="date" id="::Primitives::date">
- <webidl> attribute Date date;</webidl>
- <Type type="Date"/>
- </Attribute>
- <Attribute name="regexp" id="::Primitives::regexp">
- <webidl> attribute RegExp regexp;</webidl>
- <Type type="RegExp"/>
- </Attribute>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/prototyperoot.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/prototyperoot.widlprocxml
deleted file mode 100644
index 2e56cd75ec3..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/prototyperoot.widlprocxml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>[PrototypeRoot]
-interface Node {
- readonly attribute unsigned short nodeType;
-};</webidl>
- <Interface name="Node" id="::Node">
- <webidl>[PrototypeRoot]
-interface Node {
- readonly attribute unsigned short nodeType;
-};</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="PrototypeRoot">
- <webidl>PrototypeRoot</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Attribute readonly="readonly" name="nodeType" id="::Node::nodeType">
- <webidl> readonly attribute unsigned short nodeType;</webidl>
- <Type type="unsigned short"/>
- </Attribute>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/putforwards.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/putforwards.widlprocxml
deleted file mode 100644
index 634fad55a56..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/putforwards.widlprocxml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Person {
- [PutForwards=full] readonly attribute <ref>Name</ref> name;
- attribute unsigned short age;
-};</webidl>
- <Interface name="Person" id="::Person">
- <webidl>interface Person {
- [PutForwards=full] readonly attribute <ref>Name</ref> name;
- attribute unsigned short age;
-};</webidl>
- <Attribute readonly="readonly" name="name" id="::Person::name">
- <webidl> [PutForwards=full] readonly attribute <ref>Name</ref> name;</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="PutForwards" value="full">
- <webidl>PutForwards</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Type name="Name"/>
- </Attribute>
- <Attribute name="age" id="::Person::age">
- <webidl> attribute unsigned short age;</webidl>
- <Type type="unsigned short"/>
- </Attribute>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/reg-operations.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/reg-operations.widlprocxml
deleted file mode 100644
index 3b756ed68d8..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/reg-operations.widlprocxml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Dimensions {
- attribute unsigned long width;
- attribute unsigned long height;
-};
-
-exception NoPointerDevice { };
-
-interface Button {
-
- boolean isMouseOver();
-
- void setDimensions(<ref>Dimensions</ref> size);
- void setDimensions(unsigned long width, unsigned long height);
-};</webidl>
- <Interface name="Dimensions" id="::Dimensions">
- <webidl>interface Dimensions {
- attribute unsigned long width;
- attribute unsigned long height;
-};</webidl>
- <Attribute name="width" id="::Dimensions::width">
- <webidl> attribute unsigned long width;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Attribute name="height" id="::Dimensions::height">
- <webidl> attribute unsigned long height;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- </Interface>
- <Exception name="NoPointerDevice" id="::NoPointerDevice">
- <webidl>exception NoPointerDevice { };</webidl>
- </Exception>
- <Interface name="Button" id="::Button">
- <webidl>interface Button {
-
- boolean isMouseOver();
-
- void setDimensions(<ref>Dimensions</ref> size);
- void setDimensions(unsigned long width, unsigned long height);
-};</webidl>
- <Operation name="isMouseOver" id="::Button::isMouseOver">
- <webidl> boolean isMouseOver();</webidl>
- <Type type="boolean"/>
- <ArgumentList/>
- </Operation>
- <Operation name="setDimensions" id="::Button::setDimensions">
- <webidl> void setDimensions(<ref>Dimensions</ref> size);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="size">
- <Type name="Dimensions"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation name="setDimensions" id="::Button::setDimensions">
- <webidl> void setDimensions(unsigned long width, unsigned long height);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="width">
- <Type type="unsigned long"/>
- </Argument>
- <Argument name="height">
- <Type type="unsigned long"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/replaceable.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/replaceable.widlprocxml
deleted file mode 100644
index f9762166825..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/replaceable.widlprocxml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Counter {
- [Replaceable] readonly attribute unsigned long value;
- void increment();
-};</webidl>
- <Interface name="Counter" id="::Counter">
- <webidl>interface Counter {
- [Replaceable] readonly attribute unsigned long value;
- void increment();
-};</webidl>
- <Attribute readonly="readonly" name="value" id="::Counter::value">
- <webidl> [Replaceable] readonly attribute unsigned long value;</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="Replaceable">
- <webidl>Replaceable</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Type type="unsigned long"/>
- </Attribute>
- <Operation name="increment" id="::Counter::increment">
- <webidl> void increment();</webidl>
- <Type type="void"/>
- <ArgumentList/>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/sequence.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/sequence.widlprocxml
deleted file mode 100644
index d5f4564175b..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/sequence.widlprocxml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Canvas {
- void drawPolygon(sequence&lt;float> coordinates);
- sequence&lt;float> getInflectionPoints();
-};</webidl>
- <Interface name="Canvas" id="::Canvas">
- <webidl>interface Canvas {
- void drawPolygon(sequence&lt;float> coordinates);
- sequence&lt;float> getInflectionPoints();
-};</webidl>
- <Operation name="drawPolygon" id="::Canvas::drawPolygon">
- <webidl> void drawPolygon(sequence&lt;float> coordinates);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="coordinates">
- <Type type="sequence">
- <Type type="float"/>
- </Type>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation name="getInflectionPoints" id="::Canvas::getInflectionPoints">
- <webidl> sequence&lt;float> getInflectionPoints();</webidl>
- <Type type="sequence">
- <Type type="float"/>
- </Type>
- <ArgumentList/>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/serializer.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/serializer.widlprocxml
deleted file mode 100644
index eb4219f8a5e..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/serializer.widlprocxml
+++ /dev/null
@@ -1,296 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Transaction {
- readonly attribute <ref>Account</ref> from;
- readonly attribute <ref>Account</ref> to;
- readonly attribute float amount;
- readonly attribute DOMString description;
- readonly attribute unsigned long number;
-
- serializer;
-};
-
-interface Account {
- attribute DOMString name;
- attribute unsigned long number;
- serializer DOMString serialize();
-};
-
-interface Transaction2 {
- readonly attribute <ref>Account2</ref> from;
- readonly attribute <ref>Account2</ref> to;
- readonly attribute float amount;
- readonly attribute DOMString description;
- readonly attribute unsigned long number;
-
- serializer = { from, to, amount, description };
-};
-
-interface Account2 {
- attribute DOMString name;
- attribute unsigned long number;
- serializer = number;
-};
-
-interface Account3 {
- attribute DOMString name;
- attribute unsigned long number;
-
- serializer = { attribute };
-};
-
-interface Account4 {
- getter object getItem(unsigned long index);
- serializer = { getter };
-};
-
-interface Account5 : <ref>Account</ref> {
- attribute DOMString secondname;
- serializer = { inherit, secondname };
-};
-
-interface Account6 : <ref>Account</ref> {
- attribute DOMString secondname;
- serializer = { inherit, attribute };
-};
-
-interface Account7 {
- attribute DOMString name;
- attribute unsigned long number;
- serializer = [ name, number ];
-};
-
-interface Account8 {
- getter object getItem(unsigned long index);
- serializer = [ getter ];
-};</webidl>
- <Interface name="Transaction" id="::Transaction">
- <webidl>interface Transaction {
- readonly attribute <ref>Account</ref> from;
- readonly attribute <ref>Account</ref> to;
- readonly attribute float amount;
- readonly attribute DOMString description;
- readonly attribute unsigned long number;
-
- serializer;
-};</webidl>
- <Attribute readonly="readonly" name="from" id="::Transaction::from">
- <webidl> readonly attribute <ref>Account</ref> from;</webidl>
- <Type name="Account"/>
- </Attribute>
- <Attribute readonly="readonly" name="to" id="::Transaction::to">
- <webidl> readonly attribute <ref>Account</ref> to;</webidl>
- <Type name="Account"/>
- </Attribute>
- <Attribute readonly="readonly" name="amount" id="::Transaction::amount">
- <webidl> readonly attribute float amount;</webidl>
- <Type type="float"/>
- </Attribute>
- <Attribute readonly="readonly" name="description" id="::Transaction::description">
- <webidl> readonly attribute DOMString description;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Attribute readonly="readonly" name="number" id="::Transaction::number">
- <webidl> readonly attribute unsigned long number;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Serializer>
- <webidl> serializer;</webidl>
- </Serializer>
- </Interface>
- <Interface name="Account" id="::Account">
- <webidl>interface Account {
- attribute DOMString name;
- attribute unsigned long number;
- serializer DOMString serialize();
-};</webidl>
- <Attribute name="name" id="::Account::name">
- <webidl> attribute DOMString name;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Attribute name="number" id="::Account::number">
- <webidl> attribute unsigned long number;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Operation serializer="serializer" name="serialize" id="::Account::serialize">
- <webidl> serializer DOMString serialize();</webidl>
- <Type type="DOMString"/>
- <ArgumentList/>
- </Operation>
- </Interface>
- <Interface name="Transaction2" id="::Transaction2">
- <webidl>interface Transaction2 {
- readonly attribute <ref>Account2</ref> from;
- readonly attribute <ref>Account2</ref> to;
- readonly attribute float amount;
- readonly attribute DOMString description;
- readonly attribute unsigned long number;
-
- serializer = { from, to, amount, description };
-};</webidl>
- <Attribute readonly="readonly" name="from" id="::Transaction2::from">
- <webidl> readonly attribute <ref>Account2</ref> from;</webidl>
- <Type name="Account2"/>
- </Attribute>
- <Attribute readonly="readonly" name="to" id="::Transaction2::to">
- <webidl> readonly attribute <ref>Account2</ref> to;</webidl>
- <Type name="Account2"/>
- </Attribute>
- <Attribute readonly="readonly" name="amount" id="::Transaction2::amount">
- <webidl> readonly attribute float amount;</webidl>
- <Type type="float"/>
- </Attribute>
- <Attribute readonly="readonly" name="description" id="::Transaction2::description">
- <webidl> readonly attribute DOMString description;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Attribute readonly="readonly" name="number" id="::Transaction2::number">
- <webidl> readonly attribute unsigned long number;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Serializer>
- <webidl> serializer = { from, to, amount, description };</webidl>
- <Map pattern="selection">
- <PatternAttribute name="from"/>
- <PatternAttribute name="to"/>
- <PatternAttribute name="amount"/>
- <PatternAttribute name="description"/>
- </Map>
- </Serializer>
- </Interface>
- <Interface name="Account2" id="::Account2">
- <webidl>interface Account2 {
- attribute DOMString name;
- attribute unsigned long number;
- serializer = number;
-};</webidl>
- <Attribute name="name" id="::Account2::name">
- <webidl> attribute DOMString name;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Attribute name="number" id="::Account2::number">
- <webidl> attribute unsigned long number;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Serializer attribute="number">
- <webidl> serializer = number;</webidl>
- </Serializer>
- </Interface>
- <Interface name="Account3" id="::Account3">
- <webidl>interface Account3 {
- attribute DOMString name;
- attribute unsigned long number;
-
- serializer = { attribute };
-};</webidl>
- <Attribute name="name" id="::Account3::name">
- <webidl> attribute DOMString name;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Attribute name="number" id="::Account3::number">
- <webidl> attribute unsigned long number;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Serializer>
- <webidl> serializer = { attribute };</webidl>
- <Map pattern="all"/>
- </Serializer>
- </Interface>
- <Interface name="Account4" id="::Account4">
- <webidl>interface Account4 {
- getter object getItem(unsigned long index);
- serializer = { getter };
-};</webidl>
- <Operation getter="getter" name="getItem" id="::Account4::getItem">
- <webidl> getter object getItem(unsigned long index);</webidl>
- <Type type="object"/>
- <ArgumentList>
- <Argument name="index">
- <Type type="unsigned long"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Serializer>
- <webidl> serializer = { getter };</webidl>
- <Map pattern="getter"/>
- </Serializer>
- </Interface>
- <Interface name="Account5" id="::Account5">
- <webidl>interface Account5 : <ref>Account</ref> {
- attribute DOMString secondname;
- serializer = { inherit, secondname };
-};</webidl>
- <InterfaceInheritance>
- <Name name="Account"/>
- </InterfaceInheritance>
- <Attribute name="secondname" id="::Account5::secondname">
- <webidl> attribute DOMString secondname;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Serializer>
- <webidl> serializer = { inherit, secondname };</webidl>
- <Map inherit="inherit" pattern="selection">
- <PatternAttribute name="secondname"/>
- </Map>
- </Serializer>
- </Interface>
- <Interface name="Account6" id="::Account6">
- <webidl>interface Account6 : <ref>Account</ref> {
- attribute DOMString secondname;
- serializer = { inherit, attribute };
-};</webidl>
- <InterfaceInheritance>
- <Name name="Account"/>
- </InterfaceInheritance>
- <Attribute name="secondname" id="::Account6::secondname">
- <webidl> attribute DOMString secondname;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Serializer>
- <webidl> serializer = { inherit, attribute };</webidl>
- <Map inherit="inherit" pattern="all"/>
- </Serializer>
- </Interface>
- <Interface name="Account7" id="::Account7">
- <webidl>interface Account7 {
- attribute DOMString name;
- attribute unsigned long number;
- serializer = [ name, number ];
-};</webidl>
- <Attribute name="name" id="::Account7::name">
- <webidl> attribute DOMString name;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Attribute name="number" id="::Account7::number">
- <webidl> attribute unsigned long number;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Serializer>
- <webidl> serializer = [ name, number ];</webidl>
- <List pattern="selection">
- <PatternAttribute name="name"/>
- <PatternAttribute name="number"/>
- </List>
- </Serializer>
- </Interface>
- <Interface name="Account8" id="::Account8">
- <webidl>interface Account8 {
- getter object getItem(unsigned long index);
- serializer = [ getter ];
-};</webidl>
- <Operation getter="getter" name="getItem" id="::Account8::getItem">
- <webidl> getter object getItem(unsigned long index);</webidl>
- <Type type="object"/>
- <ArgumentList>
- <Argument name="index">
- <Type type="unsigned long"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Serializer>
- <webidl> serializer = [ getter ];</webidl>
- <List pattern="getter"/>
- </Serializer>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/special-omittable.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/special-omittable.widlprocxml
deleted file mode 100644
index 1986d190a80..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/special-omittable.widlprocxml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <Interface name="Dictionary" id="::Dictionary">
- <webidl>interface Dictionary {
- readonly attribute unsigned long propertyCount;
-
- omittable getter float getProperty(DOMString propertyName);
- omittable setter void setProperty(DOMString propertyName, float propertyValue);
-};</webidl>
- <Attribute readonly="readonly" name="propertyCount" id="::Dictionary::propertyCount">
- <webidl> readonly attribute unsigned long propertyCount;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Operation omittable="omittable" getter="getter" name="getProperty" id="::Dictionary::getProperty">
- <webidl> omittable getter float getProperty(DOMString propertyName);</webidl>
- <Type type="float"/>
- <ArgumentList>
- <Argument name="propertyName">
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation omittable="omittable" setter="setter" name="setProperty" id="::Dictionary::setProperty">
- <webidl> omittable setter void setProperty(DOMString propertyName, float propertyValue);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="propertyName">
- <Type type="DOMString"/>
- </Argument>
- <Argument name="propertyValue">
- <Type type="float"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/static.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/static.widlprocxml
deleted file mode 100644
index 03c14e16eba..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/static.widlprocxml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Point { };
-
-interface Circle {
- attribute float cx;
- attribute float cy;
- attribute float radius;
-
- static readonly attribute long triangulationCount;
- static <ref>Point</ref> triangulate(<ref>Circle</ref> c1, <ref>Circle</ref> c2, <ref>Circle</ref> c3);
-};</webidl>
- <Interface name="Point" id="::Point">
- <webidl>interface Point { };</webidl>
- </Interface>
- <Interface name="Circle" id="::Circle">
- <webidl>interface Circle {
- attribute float cx;
- attribute float cy;
- attribute float radius;
-
- static readonly attribute long triangulationCount;
- static <ref>Point</ref> triangulate(<ref>Circle</ref> c1, <ref>Circle</ref> c2, <ref>Circle</ref> c3);
-};</webidl>
- <Attribute name="cx" id="::Circle::cx">
- <webidl> attribute float cx;</webidl>
- <Type type="float"/>
- </Attribute>
- <Attribute name="cy" id="::Circle::cy">
- <webidl> attribute float cy;</webidl>
- <Type type="float"/>
- </Attribute>
- <Attribute name="radius" id="::Circle::radius">
- <webidl> attribute float radius;</webidl>
- <Type type="float"/>
- </Attribute>
- <Attribute static="static" readonly="readonly" name="triangulationCount" id="::Circle::triangulationCount">
- <webidl> static readonly attribute long triangulationCount;</webidl>
- <Type type="long"/>
- </Attribute>
- <Operation static="static" name="triangulate" id="::Circle::triangulate">
- <webidl> static <ref>Point</ref> triangulate(<ref>Circle</ref> c1, <ref>Circle</ref> c2, <ref>Circle</ref> c3);</webidl>
- <Type name="Point"/>
- <ArgumentList>
- <Argument name="c1">
- <Type name="Circle"/>
- </Argument>
- <Argument name="c2">
- <Type name="Circle"/>
- </Argument>
- <Argument name="c3">
- <Type name="Circle"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/stringifier-attribute.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/stringifier-attribute.widlprocxml
deleted file mode 100644
index 082ce4d341b..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/stringifier-attribute.widlprocxml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>[Constructor]
-interface Student {
- attribute unsigned long id;
- stringifier attribute DOMString name;
-};</webidl>
- <Interface name="Student" id="::Student">
- <webidl>[Constructor]
-interface Student {
- attribute unsigned long id;
- stringifier attribute DOMString name;
-};</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="Constructor">
- <webidl>Constructor</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Attribute name="id" id="::Student::id">
- <webidl> attribute unsigned long id;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Attribute stringifier="stringifier" name="name" id="::Student::name">
- <webidl> stringifier attribute DOMString name;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/stringifier-custom.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/stringifier-custom.widlprocxml
deleted file mode 100644
index cdab1ccfc37..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/stringifier-custom.widlprocxml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>[Constructor]
-interface Student {
- attribute unsigned long id;
- attribute DOMString? familyName;
- attribute DOMString givenName;
-
- stringifier DOMString ();
-};</webidl>
- <Interface name="Student" id="::Student">
- <webidl>[Constructor]
-interface Student {
- attribute unsigned long id;
- attribute DOMString? familyName;
- attribute DOMString givenName;
-
- stringifier DOMString ();
-};</webidl>
- <ExtendedAttributeList>
- <ExtendedAttribute name="Constructor">
- <webidl>Constructor</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Attribute name="id" id="::Student::id">
- <webidl> attribute unsigned long id;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Attribute name="familyName" id="::Student::familyName">
- <webidl> attribute DOMString? familyName;</webidl>
- <Type type="DOMString" nullable="nullable"/>
- </Attribute>
- <Attribute name="givenName" id="::Student::givenName">
- <webidl> attribute DOMString givenName;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Operation stringifier="stringifier">
- <webidl> stringifier DOMString ();</webidl>
- <Type type="DOMString"/>
- <ArgumentList/>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/stringifier.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/stringifier.widlprocxml
deleted file mode 100644
index 4a18b80b704..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/stringifier.widlprocxml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface A {
- stringifier DOMString ();
-};
-
-interface A {
- stringifier;
-};</webidl>
- <Interface name="A" id="::A">
- <webidl>interface A {
- stringifier DOMString ();
-};</webidl>
- <Operation stringifier="stringifier">
- <webidl> stringifier DOMString ();</webidl>
- <Type type="DOMString"/>
- <ArgumentList/>
- </Operation>
- </Interface>
- <Interface name="A" id="::A">
- <webidl>interface A {
- stringifier;
-};</webidl>
- <Stringifier>
- <webidl> stringifier;</webidl>
- </Stringifier>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/treatasnull.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/treatasnull.widlprocxml
deleted file mode 100644
index a57ae163f0b..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/treatasnull.widlprocxml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Dog {
- attribute DOMString name;
- attribute DOMString owner;
-
- boolean isMemberOfBreed([TreatNullAs=EmptyString] DOMString breedName);
-};</webidl>
- <Interface name="Dog" id="::Dog">
- <webidl>interface Dog {
- attribute DOMString name;
- attribute DOMString owner;
-
- boolean isMemberOfBreed([TreatNullAs=EmptyString] DOMString breedName);
-};</webidl>
- <Attribute name="name" id="::Dog::name">
- <webidl> attribute DOMString name;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Attribute name="owner" id="::Dog::owner">
- <webidl> attribute DOMString owner;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Operation name="isMemberOfBreed" id="::Dog::isMemberOfBreed">
- <webidl> boolean isMemberOfBreed([TreatNullAs=EmptyString] DOMString breedName);</webidl>
- <Type type="boolean"/>
- <ArgumentList>
- <Argument name="breedName">
- <ExtendedAttributeList>
- <ExtendedAttribute name="TreatNullAs" value="EmptyString">
- <webidl>TreatNullAs</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/treatasundefined.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/treatasundefined.widlprocxml
deleted file mode 100644
index 17e71081da0..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/treatasundefined.widlprocxml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Cat {
- attribute DOMString name;
- attribute DOMString owner;
-
- boolean isMemberOfBreed([TreatUndefinedAs=EmptyString] DOMString breedName);
-};</webidl>
- <Interface name="Cat" id="::Cat">
- <webidl>interface Cat {
- attribute DOMString name;
- attribute DOMString owner;
-
- boolean isMemberOfBreed([TreatUndefinedAs=EmptyString] DOMString breedName);
-};</webidl>
- <Attribute name="name" id="::Cat::name">
- <webidl> attribute DOMString name;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Attribute name="owner" id="::Cat::owner">
- <webidl> attribute DOMString owner;</webidl>
- <Type type="DOMString"/>
- </Attribute>
- <Operation name="isMemberOfBreed" id="::Cat::isMemberOfBreed">
- <webidl> boolean isMemberOfBreed([TreatUndefinedAs=EmptyString] DOMString breedName);</webidl>
- <Type type="boolean"/>
- <ArgumentList>
- <Argument name="breedName">
- <ExtendedAttributeList>
- <ExtendedAttribute name="TreatUndefinedAs" value="EmptyString">
- <webidl>TreatUndefinedAs</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- <Type type="DOMString"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/typedef.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/typedef.widlprocxml
deleted file mode 100644
index 785f6706e6d..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/typedef.widlprocxml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl> interface Point {
- attribute float x;
- attribute float y;
- };
-
- typedef sequence&lt;<ref>Point</ref>> PointSequence;
-
- interface Rect {
- attribute <ref>Point</ref> topleft;
- attribute <ref>Point</ref> bottomright;
- };
-
- interface Widget {
-
- readonly attribute <ref>Rect</ref> bounds;
-
- boolean pointWithinBounds(<ref>Point</ref> p);
- boolean allPointsWithinBounds(<ref>PointSequence</ref> ps);
- };
-
- typedef [Clamp] octet value;</webidl>
- <Interface name="Point" id="::Point">
- <webidl> interface Point {
- attribute float x;
- attribute float y;
- };</webidl>
- <Attribute name="x" id="::Point::x">
- <webidl> attribute float x;</webidl>
- <Type type="float"/>
- </Attribute>
- <Attribute name="y" id="::Point::y">
- <webidl> attribute float y;</webidl>
- <Type type="float"/>
- </Attribute>
- </Interface>
- <Typedef name="PointSequence" id="::PointSequence">
- <webidl> typedef sequence&lt;<ref>Point</ref>> PointSequence;</webidl>
- <Type type="sequence">
- <Type name="Point"/>
- </Type>
- </Typedef>
- <Interface name="Rect" id="::Rect">
- <webidl> interface Rect {
- attribute <ref>Point</ref> topleft;
- attribute <ref>Point</ref> bottomright;
- };</webidl>
- <Attribute name="topleft" id="::Rect::topleft">
- <webidl> attribute <ref>Point</ref> topleft;</webidl>
- <Type name="Point"/>
- </Attribute>
- <Attribute name="bottomright" id="::Rect::bottomright">
- <webidl> attribute <ref>Point</ref> bottomright;</webidl>
- <Type name="Point"/>
- </Attribute>
- </Interface>
- <Interface name="Widget" id="::Widget">
- <webidl> interface Widget {
-
- readonly attribute <ref>Rect</ref> bounds;
-
- boolean pointWithinBounds(<ref>Point</ref> p);
- boolean allPointsWithinBounds(<ref>PointSequence</ref> ps);
- };</webidl>
- <Attribute readonly="readonly" name="bounds" id="::Widget::bounds">
- <webidl> readonly attribute <ref>Rect</ref> bounds;</webidl>
- <Type name="Rect"/>
- </Attribute>
- <Operation name="pointWithinBounds" id="::Widget::pointWithinBounds">
- <webidl> boolean pointWithinBounds(<ref>Point</ref> p);</webidl>
- <Type type="boolean"/>
- <ArgumentList>
- <Argument name="p">
- <Type name="Point"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation name="allPointsWithinBounds" id="::Widget::allPointsWithinBounds">
- <webidl> boolean allPointsWithinBounds(<ref>PointSequence</ref> ps);</webidl>
- <Type type="boolean"/>
- <ArgumentList>
- <Argument name="ps">
- <Type name="PointSequence"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
- <Typedef name="value" id="::value">
- <webidl> typedef [Clamp] octet value;</webidl>
- <Type type="octet">
- <ExtendedAttributeList>
- <ExtendedAttribute name="Clamp">
- <webidl>Clamp</webidl>
- </ExtendedAttribute>
- </ExtendedAttributeList>
- </Type>
- </Typedef>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/typesuffixes.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/typesuffixes.widlprocxml
deleted file mode 100644
index 830fe62bc0d..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/typesuffixes.widlprocxml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Suffixes {
- void test(sequence&lt;DOMString[]?>? foo);
-};</webidl>
- <Interface name="Suffixes" id="::Suffixes">
- <webidl>interface Suffixes {
- void test(sequence&lt;DOMString[]?>? foo);
-};</webidl>
- <Operation name="test" id="::Suffixes::test">
- <webidl> void test(sequence&lt;DOMString[]?>? foo);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument name="foo">
- <Type type="sequence" nullable="nullable">
- <Type type="array" nullable="nullable">
- <Type type="DOMString"/>
- </Type>
- </Type>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/uniontype.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/uniontype.widlprocxml
deleted file mode 100644
index 7d088079956..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/uniontype.widlprocxml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface Union {
- attribute (float or (Date or <ref>Event</ref>) or (<ref>Node</ref> or DOMString)?) test;
-};</webidl>
- <Interface name="Union" id="::Union">
- <webidl>interface Union {
- attribute (float or (Date or <ref>Event</ref>) or (<ref>Node</ref> or DOMString)?) test;
-};</webidl>
- <Attribute name="test" id="::Union::test">
- <webidl> attribute (float or (Date or <ref>Event</ref>) or (<ref>Node</ref> or DOMString)?) test;</webidl>
- <Type type="union">
- <Type type="float"/>
- <Type type="union">
- <Type type="Date"/>
- <Type name="Event"/>
- </Type>
- <Type type="union" nullable="nullable">
- <Type name="Node"/>
- <Type type="DOMString"/>
- </Type>
- </Type>
- </Attribute>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/variadic-operations.widlprocxml b/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/variadic-operations.widlprocxml
deleted file mode 100644
index 0bc9f784413..00000000000
--- a/tests/wpt/web-platform-tests/resources/webidl2/test/widlproc/test/valid/xml/variadic-operations.widlprocxml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
-<Definitions>
- <webidl>interface IntegerSet {
- readonly attribute unsigned long cardinality;
-
- void union(long... ints);
- void intersection(long... ints);
-};</webidl>
- <Interface name="IntegerSet" id="::IntegerSet">
- <webidl>interface IntegerSet {
- readonly attribute unsigned long cardinality;
-
- void union(long... ints);
- void intersection(long... ints);
-};</webidl>
- <Attribute readonly="readonly" name="cardinality" id="::IntegerSet::cardinality">
- <webidl> readonly attribute unsigned long cardinality;</webidl>
- <Type type="unsigned long"/>
- </Attribute>
- <Operation name="union" id="::IntegerSet::union">
- <webidl> void union(long... ints);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument ellipsis="ellipsis" name="ints">
- <Type type="long"/>
- </Argument>
- </ArgumentList>
- </Operation>
- <Operation name="intersection" id="::IntegerSet::intersection">
- <webidl> void intersection(long... ints);</webidl>
- <Type type="void"/>
- <ArgumentList>
- <Argument ellipsis="ellipsis" name="ints">
- <Type type="long"/>
- </Argument>
- </ArgumentList>
- </Operation>
- </Interface>
-</Definitions>
diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_built_diff.sh b/tests/wpt/web-platform-tests/tools/ci/ci_built_diff.sh
index ce9fe6099d5..34f24a7425b 100755
--- a/tests/wpt/web-platform-tests/tools/ci/ci_built_diff.sh
+++ b/tests/wpt/web-platform-tests/tools/ci/ci_built_diff.sh
@@ -15,6 +15,10 @@ main() {
'2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large.png'
'2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.rtl.png'
'2dcontext/drawing-text-to-the-canvas/2d.text.draw.stroke.basic.png'
+ 'offscreen-canvas/text/2d.text.draw.fill.basic.png'
+ 'offscreen-canvas/text/2d.text.draw.fill.maxWidth.large.png'
+ 'offscreen-canvas/text/2d.text.draw.fill.rtl.png'
+ 'offscreen-canvas/text/2d.text.draw.stroke.basic.png'
)
./update-built-tests.sh
diff --git a/tests/wpt/web-platform-tests/tools/wpt/browser.py b/tests/wpt/web-platform-tests/tools/wpt/browser.py
index c350946ea0c..9834e5d53f3 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/browser.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/browser.py
@@ -283,6 +283,28 @@ class Firefox(Browser):
return m.group(1)
+class Fennec(Browser):
+ """Fennec-specific interface."""
+
+ product = "fennec"
+ requirements = "requirements_firefox.txt"
+
+ def install(self, dest=None):
+ raise NotImplementedError
+
+ def find_binary(self, venv_path=None):
+ raise NotImplementedError
+
+ def find_webdriver(self):
+ raise NotImplementedError
+
+ def install_webdriver(self, dest=None):
+ raise NotImplementedError
+
+ def version(self, binary=None):
+ return None
+
+
class Chrome(Browser):
"""Chrome-specific interface.
@@ -345,16 +367,19 @@ class Chrome(Browser):
def version(self, binary=None):
binary = binary or self.binary
- try:
- version_string = call(binary, "--version").strip()
- except subprocess.CalledProcessError:
- logger.warn("Failed to call %s", binary)
- return None
- m = re.match(r"Google Chrome (.*)", version_string)
- if not m:
- logger.warn("Failed to extract version from: s%", version_string)
- return None
- return m.group(1)
+ if uname[0] != "Windows":
+ try:
+ version_string = call(binary, "--version").strip()
+ except subprocess.CalledProcessError:
+ logger.warn("Failed to call %s", binary)
+ return None
+ m = re.match(r"Google Chrome (.*)", version_string)
+ if not m:
+ logger.warn("Failed to extract version from: s%", version_string)
+ return None
+ return m.group(1)
+ logger.warn("Unable to extract version from binary on Windows.")
+ return None
class ChromeAndroid(Browser):
diff --git a/tests/wpt/web-platform-tests/tools/wpt/run.py b/tests/wpt/web-platform-tests/tools/wpt/run.py
index b51407f36b2..ed5c56f5c23 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/run.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/run.py
@@ -204,6 +204,14 @@ Consider installing certutil via your OS package manager or directly.""")
kwargs["prefs_root"] = prefs_root
+class Fennec(BrowserSetup):
+ name = "fennec"
+ browser_cls = browser.Fennec
+
+ def setup_kwargs(self, kwargs):
+ pass
+
+
class Chrome(BrowserSetup):
name = "chrome"
browser_cls = browser.Chrome
@@ -374,6 +382,7 @@ class WebKit(BrowserSetup):
product_setup = {
+ "fennec": Fennec,
"firefox": Firefox,
"chrome": Chrome,
"chrome_android": ChromeAndroid,
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py
index 6f0c49e8b1f..d8682e16a55 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py
@@ -6,7 +6,7 @@ a dictionary with the fields
"browser": String indicating the Browser implementation used to launch that
product.
"executor": Dictionary with keys as supported test types and values as the name
- of the Executor implemantation that will be used to run that test
+ of the Executor implementation that will be used to run that test
type.
"browser_kwargs": String naming function that takes product, binary,
prefs_root and the wptrunner.run_tests kwargs dict as arguments
@@ -25,6 +25,7 @@ module global scope.
product_list = ["chrome",
"chrome_android",
"edge",
+ "fennec",
"firefox",
"ie",
"safari",
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/fennec.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/fennec.py
new file mode 100644
index 00000000000..8818760ab36
--- /dev/null
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/fennec.py
@@ -0,0 +1,254 @@
+import os
+import signal
+import sys
+import tempfile
+import traceback
+
+import moznetwork
+from mozprocess import ProcessHandler
+from mozprofile import FirefoxProfile
+from mozrunner import FennecEmulatorRunner
+
+from serve.serve import make_hosts_file
+
+from .base import (get_free_port,
+ cmd_arg,
+ browser_command)
+from ..executors.executormarionette import MarionetteTestharnessExecutor # noqa: F401
+from .firefox import (get_timeout_multiplier, update_properties, executor_kwargs, FirefoxBrowser) # noqa: F401
+
+
+__wptrunner__ = {"product": "fennec",
+ "check_args": "check_args",
+ "browser": "FennecBrowser",
+ "executor": {"testharness": "MarionetteTestharnessExecutor"},
+ "browser_kwargs": "browser_kwargs",
+ "executor_kwargs": "executor_kwargs",
+ "env_extras": "env_extras",
+ "env_options": "env_options",
+ "run_info_extras": "run_info_extras",
+ "update_properties": "update_properties"}
+
+class FennecProfile(FirefoxProfile):
+ # WPT-specific prefs are set in FennecBrowser.start()
+ FirefoxProfile.preferences.update({
+ # Make sure Shield doesn't hit the network.
+ "app.normandy.api_url": "",
+ # Increase the APZ content response timeout in tests to 1 minute.
+ "apz.content_response_timeout": 60000,
+ # Enable output of dump()
+ "browser.dom.window.dump.enabled": True,
+ # Disable safebrowsing components
+ "browser.safebrowsing.blockedURIs.enabled": False,
+ "browser.safebrowsing.downloads.enabled": False,
+ "browser.safebrowsing.passwords.enabled": False,
+ "browser.safebrowsing.malware.enabled": False,
+ "browser.safebrowsing.phishing.enabled": False,
+ # Do not restore the last open set of tabs if the browser has crashed
+ "browser.sessionstore.resume_from_crash": False,
+ # Disable Android snippets
+ "browser.snippets.enabled": False,
+ "browser.snippets.syncPromo.enabled": False,
+ "browser.snippets.firstrunHomepage.enabled": False,
+ # Do not allow background tabs to be zombified, otherwise for tests that
+ # open additional tabs, the test harness tab itself might get unloaded
+ "browser.tabs.disableBackgroundZombification": True,
+ # Disable e10s by default
+ "browser.tabs.remote.autostart": False,
+ # Don't warn when exiting the browser
+ "browser.warnOnQuit": False,
+ # Don't send Firefox health reports to the production server
+ "datareporting.healthreport.about.reportUrl": "http://%(server)s/dummy/abouthealthreport/",
+ # Automatically unload beforeunload alerts
+ "dom.disable_beforeunload": True,
+ # Disable the ProcessHangMonitor
+ "dom.ipc.reportProcessHangs": False,
+ # No slow script dialogs
+ "dom.max_chrome_script_run_time": 0,
+ "dom.max_script_run_time": 0,
+ # Make sure opening about:addons won"t hit the network
+ "extensions.webservice.discoverURL": "http://%(server)s/dummy/discoveryURL",
+ # No hang monitor
+ "hangmonitor.timeout": 0,
+
+ "javascript.options.showInConsole": True,
+ # Ensure blocklist updates don't hit the network
+ "services.settings.server": "http://%(server)s/dummy/blocklist/",
+ # Disable password capture, so that tests that include forms aren"t
+ # influenced by the presence of the persistent doorhanger notification
+ "signon.rememberSignons": False,
+ })
+
+
+def check_args(**kwargs):
+ pass
+
+def browser_kwargs(test_type, run_info_data, **kwargs):
+ return {"package_name": kwargs["package_name"],
+ "device_serial": kwargs["device_serial"],
+ "prefs_root": kwargs["prefs_root"],
+ "extra_prefs": kwargs["extra_prefs"],
+ "test_type": test_type,
+ "debug_info": kwargs["debug_info"],
+ "symbols_path": kwargs["symbols_path"],
+ "stackwalk_binary": kwargs["stackwalk_binary"],
+ "certutil_binary": kwargs["certutil_binary"],
+ "ca_certificate_path": kwargs["ssl_env"].ca_cert_path(),
+ "stackfix_dir": kwargs["stackfix_dir"],
+ "binary_args": kwargs["binary_args"],
+ "timeout_multiplier": get_timeout_multiplier(test_type,
+ run_info_data,
+ **kwargs),
+ "leak_check": kwargs["leak_check"],
+ "stylo_threads": kwargs["stylo_threads"],
+ "chaos_mode_flags": kwargs["chaos_mode_flags"],
+ "config": kwargs["config"]}
+
+
+def env_extras(**kwargs):
+ return []
+
+
+def run_info_extras(**kwargs):
+ return {"e10s": False,
+ "headless": False}
+
+
+def env_options():
+ # The server host is set to public localhost IP so that resources can be accessed
+ # from Android emulator
+ return {"server_host": moznetwork.get_ip(),
+ "bind_address": False,
+ "supports_debugger": True}
+
+
+def write_hosts_file(config, device):
+ new_hosts = make_hosts_file(config, moznetwork.get_ip())
+ current_hosts = device.get_file("/etc/hosts")
+ if new_hosts == current_hosts:
+ return
+ hosts_fd, hosts_path = tempfile.mkstemp()
+ try:
+ with os.fdopen(hosts_fd, "w") as f:
+ f.write(new_hosts)
+ device.remount()
+ device.push(hosts_path, "/etc/hosts")
+ finally:
+ os.remove(hosts_path)
+
+
+class FennecBrowser(FirefoxBrowser):
+ used_ports = set()
+ init_timeout = 300
+ shutdown_timeout = 60
+
+ def __init__(self, logger, prefs_root, test_type, package_name=None,
+ device_serial="emulator-5444", **kwargs):
+ FirefoxBrowser.__init__(self, logger, None, prefs_root, test_type, **kwargs)
+ self._package_name = package_name
+ self.device_serial = device_serial
+
+ @property
+ def package_name(self):
+ """
+ Name of app to run on emulator.
+ """
+ if self._package_name is None:
+ self._package_name = "org.mozilla.fennec"
+ user = os.getenv("USER")
+ if user:
+ self._package_name += "_" + user
+ return self._package_name
+
+ def start(self, **kwargs):
+ if self.marionette_port is None:
+ self.marionette_port = get_free_port(2828, exclude=self.used_ports)
+ self.used_ports.add(self.marionette_port)
+
+ env = {}
+ env["MOZ_CRASHREPORTER"] = "1"
+ env["MOZ_CRASHREPORTER_SHUTDOWN"] = "1"
+ env["MOZ_DISABLE_NONLOCAL_CONNECTIONS"] = "1"
+ env["STYLO_THREADS"] = str(self.stylo_threads)
+ if self.chaos_mode_flags is not None:
+ env["MOZ_CHAOSMODE"] = str(self.chaos_mode_flags)
+
+ preferences = self.load_prefs()
+
+ self.profile = FennecProfile(preferences=preferences)
+ self.profile.set_preferences({"marionette.port": self.marionette_port,
+ "dom.disable_open_during_load": False,
+ "places.history.enabled": False,
+ "dom.send_after_paint_to_content": True,
+ "network.preload": True})
+
+ if self.leak_check and kwargs.get("check_leaks", True):
+ self.leak_report_file = os.path.join(self.profile.profile, "runtests_leaks.log")
+ if os.path.exists(self.leak_report_file):
+ os.remove(self.leak_report_file)
+ env["XPCOM_MEM_BLOAT_LOG"] = self.leak_report_file
+ else:
+ self.leak_report_file = None
+
+ if self.ca_certificate_path is not None:
+ self.setup_ssl()
+
+ debug_args, cmd = browser_command(self.package_name,
+ self.binary_args if self.binary_args else [] +
+ [cmd_arg("marionette"), "about:blank"],
+ self.debug_info)
+
+ self.runner = FennecEmulatorRunner(app=self.package_name,
+ profile=self.profile,
+ cmdargs=cmd[1:],
+ env=env,
+ symbols_path=self.symbols_path,
+ serial=self.device_serial,
+ # TODO - choose appropriate log dir
+ logdir=os.getcwd(),
+ process_class=ProcessHandler,
+ process_args={"processOutputLine": [self.on_output]})
+
+ self.logger.debug("Starting Fennec")
+ # connect to a running emulator
+ self.runner.device.connect()
+
+ write_hosts_file(self.config, self.runner.device.device)
+
+ self.runner.start(debug_args=debug_args, interactive=self.debug_info and self.debug_info.interactive)
+
+ # gecko_log comes from logcat when running with device/emulator
+ logcat_args = {
+ "filterspec": "Gecko",
+ "serial": self.runner.device.app_ctx.device_serial
+ }
+ # TODO setting logcat_args["logfile"] yields an almost empty file
+ # even without filterspec
+ logcat_args["stream"] = sys.stdout
+ self.runner.device.start_logcat(**logcat_args)
+
+ self.runner.device.device.forward(
+ local="tcp:{}".format(self.marionette_port),
+ remote="tcp:{}".format(self.marionette_port))
+
+ self.logger.debug("Fennec Started")
+
+ def stop(self, force=False):
+ if self.runner is not None:
+ try:
+ if self.runner.device.connected:
+ self.runner.device.device.remove_forwards(
+ "tcp:{}".format(self.marionette_port))
+ except Exception:
+ traceback.print_exception(*sys.exc_info())
+ # We assume that stopping the runner prompts the
+ # browser to shut down. This allows the leak log to be written
+ for clean, stop_f in [(True, lambda: self.runner.wait(self.shutdown_timeout)),
+ (False, lambda: self.runner.stop(signal.SIGTERM)),
+ (False, lambda: self.runner.stop(signal.SIGKILL))]:
+ if not force or not clean:
+ retcode = stop_f()
+ if retcode is not None:
+ self.logger.info("Browser exited with return code %s" % retcode)
+ break
+ self.logger.debug("stopped")
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py
index 9f57bb4424d..1707f677b81 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py
@@ -54,6 +54,8 @@ def get_timeout_multiplier(test_type, run_info_data, **kwargs):
return 4
else:
return 3
+ elif run_info_data["os"] == "android":
+ return 4
return 1
@@ -369,7 +371,7 @@ class FirefoxBrowser(Browser):
# local copy of certutil
# TODO: Maybe only set this if certutil won't launch?
env = os.environ.copy()
- certutil_dir = os.path.dirname(self.binary)
+ certutil_dir = os.path.dirname(self.binary or self.certutil_binary)
if mozinfo.isMac:
env_var = "DYLD_LIBRARY_PATH"
elif mozinfo.isUnix:
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py
index d26024533c1..7e18a8b4379 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py
@@ -169,7 +169,7 @@ scheme host and port.""")
config_group = parser.add_argument_group("Configuration")
config_group.add_argument("--binary", action="store",
- type=abs_path, help="Binary to run tests against")
+ type=abs_path, help="Desktop binary to run tests against")
config_group.add_argument('--binary-arg',
default=[], action="append", dest="binary_args",
help="Extra argument for the binary")
@@ -178,7 +178,10 @@ scheme host and port.""")
config_group.add_argument('--webdriver-arg',
default=[], action="append", dest="webdriver_args",
help="Extra argument for the WebDriver binary")
-
+ config_group.add_argument("--package-name", action="store",
+ help="Android package name to run tests against")
+ config_group.add_argument("--device-serial", action="store",
+ help="Running Android instance to connect to, if not emulator-5554")
config_group.add_argument("--metadata", action="store", type=abs_path, dest="metadata_root",
help="Path to root directory containing test metadata"),
config_group.add_argument("--tests", action="store", type=abs_path, dest="tests_root",
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html
index 49f375c9e12..9f5e2de5c60 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html
@@ -40,10 +40,10 @@ interface BaseAudioContext : EventTarget {
readonly attribute AudioListener listener;
readonly attribute AudioContextState state;
readonly attribute double baseLatency;
- Promise<void> resume ();
+ Promise&lt;void&gt; resume ();
attribute EventHandler onstatechange;
AudioBuffer createBuffer (unsigned long numberOfChannels, unsigned long length, float sampleRate);
- Promise<AudioBuffer> decodeAudioData (ArrayBuffer audioData, optional DecodeSuccessCallback successCallback, optional DecodeErrorCallback errorCallback);
+ Promise&lt;AudioBuffer&gt; decodeAudioData (ArrayBuffer audioData, optional DecodeSuccessCallback successCallback, optional DecodeErrorCallback errorCallback);
AudioBufferSourceNode createBufferSource ();
ConstantSourceNode createConstantSource ();
ScriptProcessorNode createScriptProcessor (optional unsigned long bufferSize = 0
@@ -54,7 +54,7 @@ interface BaseAudioContext : EventTarget {
GainNode createGain ();
DelayNode createDelay (optional double maxDelayTime);
BiquadFilterNode createBiquadFilter ();
- IIRFilterNode createIIRFilter (sequence<double> feedforward, sequence<double> feedback);
+ IIRFilterNode createIIRFilter (sequence&lt;double&gt; feedforward, sequence&lt;double&gt; feedback);
WaveShaperNode createWaveShaper ();
PannerNode createPanner ();
StereoPannerNode createStereoPanner ();
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html
index 9c7fca1a3f4..276961127cf 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html
@@ -42,10 +42,10 @@ interface BaseAudioContext : EventTarget {
readonly attribute AudioListener listener;
readonly attribute AudioContextState state;
readonly attribute double baseLatency;
- Promise<void> resume ();
+ Promise&lt;void&gt; resume ();
attribute EventHandler onstatechange;
AudioBuffer createBuffer (unsigned long numberOfChannels, unsigned long length, float sampleRate);
- Promise<AudioBuffer> decodeAudioData (ArrayBuffer audioData, optional DecodeSuccessCallback successCallback, optional DecodeErrorCallback errorCallback);
+ Promise&lt;AudioBuffer&gt; decodeAudioData (ArrayBuffer audioData, optional DecodeSuccessCallback successCallback, optional DecodeErrorCallback errorCallback);
AudioBufferSourceNode createBufferSource ();
ConstantSourceNode createConstantSource ();
ScriptProcessorNode createScriptProcessor (optional unsigned long bufferSize = 0
@@ -56,7 +56,7 @@ interface BaseAudioContext : EventTarget {
GainNode createGain ();
DelayNode createDelay (optional double maxDelayTime);
BiquadFilterNode createBiquadFilter ();
- IIRFilterNode createIIRFilter (sequence<double> feedforward, sequence<double> feedback);
+ IIRFilterNode createIIRFilter (sequence&lt;double&gt; feedforward, sequence&lt;double&gt; feedback);
WaveShaperNode createWaveShaper ();
PannerNode createPanner ();
StereoPannerNode createStereoPanner ();
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/automation-rate-testing.js b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/automation-rate-testing.js
index 46d9d4a6e0c..73892dd8458 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/automation-rate-testing.js
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/automation-rate-testing.js
@@ -2,6 +2,12 @@
//
// |options| describes how the testing of the AudioParam should be done:
//
+// sourceNodeName: name of source node to use for testing; defaults to
+// 'OscillatorNode'. If set to 'none', then no source node
+// is created for testing and it is assumed that the AudioNode
+// under test are sources and need to be started.
+// verifyPieceWiseConstant: if true, verify that the k-rate output is
+// piecewise constant for each render quantum.
// nodeName: name of the AudioNode to be tested
// nodeOptions: options to be used in the AudioNode constructor
//
@@ -42,7 +48,14 @@ function doTest(context, should, options) {
context, {numberOfInputs: context.destination.numberOfChannels});
merger.connect(context.destination);
- let src = new OscillatorNode(context);
+ let src = null;
+
+ // Skip creating a source to drive the graph if |sourceNodeName| is 'none'.
+ // If |sourceNodeName| is given, use that, else default to OscillatorNode.
+ if (options.sourceNodeName !== 'none') {
+ src = new window[options.sourceNodeName || 'OscillatorNode'](context);
+ }
+
let kRateNode = new window[options.nodeName](context, options.nodeOptions);
let aRateNode = new window[options.nodeName](context, options.nodeOptions);
let inverter = new GainNode(context, {gain: -1});
@@ -81,16 +94,30 @@ function doTest(context, should, options) {
});
});
+ // Connect the source, if specified.
+ if (src) {
+ src.connect(kRateNode);
+ src.connect(aRateNode);
+ }
+
// The k-rate result is channel 0, and the a-rate result is channel 1.
- src.connect(kRateNode).connect(merger, 0, 0);
- src.connect(aRateNode).connect(merger, 0, 1);
+ kRateNode.connect(merger, 0, 0);
+ aRateNode.connect(merger, 0, 1);
// Compute the difference between the a-rate and k-rate results and send
// that to channel 2.
kRateNode.connect(merger, 0, 2);
aRateNode.connect(inverter).connect(merger, 0, 2);
- src.start();
+ if (src) {
+ src.start();
+ } else {
+ // If there's no source, then assume the test nodes are sources and start
+ // them.
+ kRateNode.start();
+ aRateNode.start();
+ }
+
return context.startRendering().then(renderedBuffer => {
let kRateOutput = renderedBuffer.getChannelData(0);
let aRateOutput = renderedBuffer.getChannelData(1);
@@ -113,5 +140,16 @@ function doTest(context, should, options) {
options.prefix
}: Difference between a-rate and k-rate ${options.nodeName}`)
.notBeConstantValueOf(0);
+
+ if (options.verifyPieceWiseConstant) {
+ // Verify that the output from the k-rate parameter is step-wise
+ // constant.
+ for (let k = 0; k < kRateOutput.length; k += 128) {
+ should(
+ kRateOutput.slice(k, k + 128),
+ `${options.prefix} k-rate output [${k}: ${k + 127}]`)
+ .beConstantValueOf(kRateOutput[k]);
+ }
+ }
});
}
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-constant-source.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-constant-source.html
index 5c421d0bc42..4db3548dacb 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-constant-source.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-constant-source.html
@@ -6,6 +6,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/webaudio/resources/audit-util.js"></script>
<script src="/webaudio/resources/audit.js"></script>
+ <script src="automation-rate-testing.js"></script>
</head>
<body>
@@ -25,54 +26,22 @@
length: testDuration * sampleRate
});
- let merger = new ChannelMergerNode(
- context, {numberOfInputs: context.numberOfChannels});
- merger.connect(context.destination);
- let inverter = new GainNode(context, {gain: -1});
- inverter.connect(merger, 0, 2);
-
- let kRateNode = new ConstantSourceNode(context);
- let aRateNode = new ConstantSourceNode(context);
-
- kRateNode.connect(merger, 0, 0);
- aRateNode.connect(merger, 0, 1);
-
- kRateNode.connect(merger, 0, 2);
- aRateNode.connect(inverter);
-
- // Set the rate
- kRateNode.offset.automationRate = 'k-rate';
-
- // Automate the offset
- kRateNode.offset.setValueAtTime(0, 0);
- kRateNode.offset.linearRampToValueAtTime(10, testDuration);
-
- aRateNode.offset.setValueAtTime(0, 0);
- aRateNode.offset.linearRampToValueAtTime(10, testDuration);
-
- kRateNode.start();
- aRateNode.start();
-
- context.startRendering()
- .then(audioBuffer => {
- let kRateOut = audioBuffer.getChannelData(0);
- let aRateOut = audioBuffer.getChannelData(1);
- let diff = audioBuffer.getChannelData(2);
-
- // Verify that the outputs are different.
- should(diff, 'Difference between a-rate and k-rate outputs')
- .notBeConstantValueOf(0);
-
- // Verify that the constant source node output is step-wise
- // constant.
- for (let k = 0; k < kRateOut.length; k += 128) {
- should(
- kRateOut.slice(k, k + 128),
- `k-rate output [${k}: ${k + 127}]`)
- .beConstantValueOf(kRateOut[k]);
+ doTest(context, should, {
+ sourceNodeName: 'none',
+ verifyPieceWiseConstant: true,
+ nodeName: 'ConstantSourceNode',
+ prefix: 'k-rate offset',
+ rateSettings: [{name: 'offset', value: 'k-rate'}],
+ automations: [{
+ name: 'offset',
+ methods: [
+ {name: 'setValueAtTime', options: [0, 0]}, {
+ name: 'linearRampToValueAtTime',
+ options: [10, testDuration]
}
- })
- .then(() => task.done());
+ ]
+ }]
+ }).then(() => task.done());
});
audit.run();
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner.html
index 1e9e900adb1..ea2a4d13645 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner.html
@@ -23,14 +23,14 @@
[{name: 'positionX', initial: 0, final: 1000},
{name: 'positionY', initial: 0, final: 1000},
- {name: 'orientationX', initial: .1, final: 1000},
- {name: 'orientationY', initial: .1, final: 1000},
- {name: 'orientationZ', initial: .1, final: 1000},
+ {name: 'orientationX', initial: 1, final: 10},
+ {name: 'orientationY', initial: 1, final: 10},
+ {name: 'orientationZ', initial: 1, final: 10},
].forEach(paramProperty => {
audit.define('Panner k-rate ' + paramProperty.name, (task, should) => {
// Arbitrary sample rate and duration.
let sampleRate = 8000;
- let testDuration = 1;
+ let testDuration = 5 * 128 / sampleRate;
let context = new OfflineAudioContext({
numberOfChannels: 3,
sampleRate: sampleRate,
@@ -38,6 +38,8 @@
});
doTest(context, should, {
+ sourceNodeName: 'ConstantSourceNode',
+ verifyPieceWiseConstant: true,
nodeName: 'PannerNode',
// Make the source directional so orientation matters, and set some
// defaults for the position and orientation so that we're not on an
@@ -46,11 +48,11 @@
nodeOptions: {
distanceModel: 'inverse',
coneOuterAngle: 360,
- coneInnerAngle: 10,
- positionX: 10,
- positionY: 10,
- positionZ: 10,
- orientationX: 1,
+ coneInnerAngle: 0,
+ positionX: 1,
+ positionY: 1,
+ positionZ: 1,
+ orientationX: 0,
orientationY: 1,
orientationZ: 1
},
diff --git a/tests/wpt/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker.js b/tests/wpt/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker.js
index 86c4ef7a8d7..8746cca234c 100644
--- a/tests/wpt/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker.js
+++ b/tests/wpt/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker.js
@@ -15,3 +15,4 @@ async_test(function(t) {
})
ws.onerror = ws.onclose = t.unreached_func();
}, "W3C WebSocket API - origin set in a Worker");
+done();
diff --git a/tests/wpt/web-platform-tests/webusb/resources/usb-allowed-by-feature-policy-worker.js b/tests/wpt/web-platform-tests/webusb/resources/usb-allowed-by-feature-policy-worker.js
new file mode 100644
index 00000000000..99ac97e28b0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webusb/resources/usb-allowed-by-feature-policy-worker.js
@@ -0,0 +1,14 @@
+'use strict';
+
+importScripts('/resources/testharness.js');
+
+let workerType;
+
+if (typeof postMessage === 'function') {
+ workerType = 'dedicated';
+}
+
+promise_test(() => navigator.usb.getDevices(),
+ `Inherited header feature policy allows ${workerType} workers.`);
+
+done();
diff --git a/tests/wpt/web-platform-tests/webusb/resources/usb-disabled-by-feature-policy-worker.js b/tests/wpt/web-platform-tests/webusb/resources/usb-disabled-by-feature-policy-worker.js
new file mode 100644
index 00000000000..59349560ad1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webusb/resources/usb-disabled-by-feature-policy-worker.js
@@ -0,0 +1,17 @@
+'use strict';
+
+importScripts('/resources/testharness.js');
+
+const header = 'Feature-Policy header {"usb" : []}';
+let workerType;
+
+if (typeof postMessage === 'function') {
+ workerType = 'dedicated';
+}
+
+promise_test(() => navigator.usb.getDevices().then(
+ () => assert_unreached('expected promise to reject with SecurityError'),
+ error => assert_equals(error.name, 'SecurityError')),
+ `Inherited ${header} disallows ${workerType} workers.`);
+
+done();
diff --git a/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html b/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html
index 0b53f09fed0..e0757feeb2d 100644
--- a/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html
+++ b/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html
@@ -5,12 +5,17 @@
<script src=/feature-policy/resources/featurepolicy.js></script>
<script>
'use strict';
-var relative_path = '/feature-policy/resources/feature-policy-usb.html';
-var base_src = '/feature-policy/resources/redirect-on-load.html#';
-var same_origin_src = base_src + relative_path;
-var cross_origin_src = base_src + 'https://{{domains[www]}}:{{ports[https][0]}}' +
- relative_path;
-var header = 'Feature-Policy allow="usb"';
+const relative_path = '/feature-policy/resources/feature-policy-usb.html';
+const base_src = '/feature-policy/resources/redirect-on-load.html#';
+const relative_worker_frame_path =
+ '/feature-policy/resources/feature-policy-usb-worker.html';
+const sub = 'https://{{domains[www]}}:{{ports[https][0]}}';
+const same_origin_src = base_src + relative_path;
+const cross_origin_src = base_src + sub + relative_path;
+const same_origin_worker_frame_src = base_src + relative_worker_frame_path;
+const cross_origin_worker_frame_src = base_src + sub +
+ relative_worker_frame_path;
+const header = 'Feature-Policy allow="usb"';
async_test(t => {
test_feature_availability(
@@ -20,8 +25,20 @@ async_test(t => {
async_test(t => {
test_feature_availability(
+ 'usb.getDevices()', t, same_origin_worker_frame_src,
+ expect_feature_available_default, 'usb');
+}, header + ' allows workers in same-origin relocation.');
+
+async_test(t => {
+ test_feature_availability(
'usb.getDevices()', t, cross_origin_src,
expect_feature_unavailable_default, 'usb');
}, header + ' disallows cross-origin relocation.');
+
+async_test(t => {
+ test_feature_availability(
+ 'usb.getDevices()', t, cross_origin_worker_frame_src,
+ expect_feature_unavailable_default, 'usb');
+}, header + ' disallows workers in cross-origin relocation.');
</script>
</body>
diff --git a/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy-attribute.https.sub.html b/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy-attribute.https.sub.html
index f62135c4653..078db141ad3 100644
--- a/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy-attribute.https.sub.html
+++ b/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy-attribute.https.sub.html
@@ -5,11 +5,14 @@
<script src=/feature-policy/resources/featurepolicy.js></script>
<script>
'use strict';
-var same_origin_src = '/feature-policy/resources/feature-policy-usb.html';
-var cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
- same_origin_src;
-var feature_name = 'Feature policy "usb"';
-var header = 'allow="usb" attribute';
+const sub = 'https://{{domains[www]}}:{{ports[https][0]}}';
+const same_origin_src = '/feature-policy/resources/feature-policy-usb.html';
+const cross_origin_src = sub + same_origin_src;
+const same_origin_worker_frame_src =
+ '/feature-policy/resources/feature-policy-usb-worker.html';
+const cross_origin_worker_frame_src = sub + same_origin_worker_frame_src;
+const feature_name = 'Feature policy "usb"';
+const header = 'allow="usb" attribute';
async_test(t => {
test_feature_availability(
@@ -19,8 +22,25 @@ async_test(t => {
async_test(t => {
test_feature_availability(
+ 'usb.getDevices()', t, same_origin_worker_frame_src,
+ expect_feature_available_default, 'usb');
+}, feature_name + ' can be enabled in a worker in same-origin iframe using ' +
+ header);
+
+async_test(t => {
+ test_feature_availability(
'usb.getDevices()', t, cross_origin_src,
expect_feature_available_default, 'usb');
}, feature_name + ' can be enabled in cross-origin iframe using ' + header);
+
+async_test(t => {
+ test_feature_availability(
+ 'usb.getDevices()', t, cross_origin_worker_frame_src,
+ expect_feature_available_default, 'usb');
+}, feature_name + ' can be enabled in a worker in cross-origin iframe using ' +
+ header);
+
+fetch_tests_from_worker(new Worker(
+ '/webusb/resources/usb-allowed-by-feature-policy-worker.js'));
</script>
</body>
diff --git a/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy.https.sub.html b/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy.https.sub.html
index f9af55076d3..9ec25eadba3 100644
--- a/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy.https.sub.html
+++ b/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy.https.sub.html
@@ -5,10 +5,13 @@
<script src=/feature-policy/resources/featurepolicy.js></script>
<script>
'use strict';
-var same_origin_src = '/feature-policy/resources/feature-policy-usb.html';
-var cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
- same_origin_src;
-var header = 'Feature-Policy header {"usb" : ["*"]}';
+const sub = 'https://{{domains[www]}}:{{ports[https][0]}}';
+const same_origin_src = '/feature-policy/resources/feature-policy-usb.html';
+const cross_origin_src = sub + same_origin_src;
+const same_origin_worker_frame_src =
+ '/feature-policy/resources/feature-policy-usb-worker.html';
+const cross_origin_worker_frame_src = sub + same_origin_worker_frame_src;
+const header = 'Feature-Policy header {"usb" : ["*"]}';
promise_test(
() => navigator.usb.getDevices(),
@@ -20,8 +23,22 @@ async_test(t => {
}, header + ' allows same-origin iframes.');
async_test(t => {
+ test_feature_availability('usb.getDevices()', t, same_origin_worker_frame_src,
+ expect_feature_available_default);
+}, header + ' allows workers in same-origin iframes.');
+
+async_test(t => {
test_feature_availability('usb.getDevices()', t, cross_origin_src,
expect_feature_available_default);
}, header + ' allows cross-origin iframes.');
+
+async_test(t => {
+ test_feature_availability('usb.getDevices()', t,
+ cross_origin_worker_frame_src,
+ expect_feature_available_default);
+}, header + ' allows workers in cross-origin iframes.');
+
+fetch_tests_from_worker(new Worker(
+ '/webusb/resources/usb-allowed-by-feature-policy-worker.js'));
</script>
</body>
diff --git a/tests/wpt/web-platform-tests/webusb/usb-disabled-by-feature-policy.https.sub.html b/tests/wpt/web-platform-tests/webusb/usb-disabled-by-feature-policy.https.sub.html
index f090fffce2d..3a8a9183591 100644
--- a/tests/wpt/web-platform-tests/webusb/usb-disabled-by-feature-policy.https.sub.html
+++ b/tests/wpt/web-platform-tests/webusb/usb-disabled-by-feature-policy.https.sub.html
@@ -5,10 +5,13 @@
<script src=/feature-policy/resources/featurepolicy.js></script>
<script>
'use strict';
-var same_origin_src = '/feature-policy/resources/feature-policy-usb.html';
-var cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
- same_origin_src;
-var header = 'Feature-Policy header {"usb" : []}';
+const sub = 'https://{{domains[www]}}:{{ports[https][0]}}';
+const same_origin_src = '/feature-policy/resources/feature-policy-usb.html';
+const cross_origin_src = sub + same_origin_src;
+const same_origin_worker_frame_src =
+ '/feature-policy/resources/feature-policy-usb-worker.html';
+const cross_origin_worker_frame_src = sub + same_origin_worker_frame_src;
+const header = 'Feature-Policy header {"usb" : []}';
promise_test(() => {
return navigator.usb.getDevices().then(() => {
@@ -24,8 +27,22 @@ async_test(t => {
}, header + ' disallows same-origin iframes.');
async_test(t => {
+ test_feature_availability('usb.getDevices()', t, same_origin_worker_frame_src,
+ expect_feature_unavailable_default);
+}, header + ' disallows workers in same-origin iframes.');
+
+async_test(t => {
test_feature_availability('usb.getDevices()', t, cross_origin_src,
expect_feature_unavailable_default);
}, header + ' disallows cross-origin iframes.');
+
+async_test(t => {
+ test_feature_availability('usb.getDevices()', t,
+ cross_origin_worker_frame_src,
+ expect_feature_unavailable_default);
+}, header + ' disallows workers in cross-origin iframes.');
+
+fetch_tests_from_worker(new Worker(
+ '/webusb/resources/usb-disabled-by-feature-policy-worker.js'));
</script>
</body>
diff --git a/tests/wpt/web-platform-tests/workers/modules/dedicated-worker-import-referrer.html b/tests/wpt/web-platform-tests/workers/modules/dedicated-worker-import-referrer.html
index 01322bb1ed0..bed66d81ff6 100644
--- a/tests/wpt/web-platform-tests/workers/modules/dedicated-worker-import-referrer.html
+++ b/tests/wpt/web-platform-tests/workers/modules/dedicated-worker-import-referrer.html
@@ -104,7 +104,7 @@ import_referrer_test(
import_referrer_test(
{ scriptURL: 'referrer-checker.py',
windowReferrerPolicy: 'same-origin',
- expectedReferrer: createURLString('resources/referrer-window.html') },
+ expectedReferrer: createURLString('resources/new-worker-window.html') },
'Same-origin top-level module script loading with "same-origin" referrer ' +
'policy');