Update web-platform-tests to revision 74d709131e3c91d09f1708378648a01957c47b38

This commit is contained in:
WPT Sync Bot 2018-10-13 21:57:40 -04:00
parent e4657c1496
commit 81f079c722
77 changed files with 2043 additions and 524 deletions

View file

@ -167017,6 +167017,18 @@
{}
]
],
"css/filter-effects/filter-scale-001.html": [
[
"/css/filter-effects/filter-scale-001.html",
[
[
"/css/filter-effects/filter-scale-001-ref.html",
"=="
]
],
{}
]
],
"css/filter-effects/filters-drop-shadow.html": [
[
"/css/filter-effects/filters-drop-shadow.html",
@ -187417,6 +187429,18 @@
{}
]
],
"html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-margins-2.html": [
[
"/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-margins-2.html",
[
[
"/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-margins-2-ref.html",
"=="
]
],
{}
]
],
"html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-margins.html": [
[
"/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-margins.html",
@ -189097,6 +189121,18 @@
{}
]
],
"infrastructure/assumptions/blank.html": [
[
"/infrastructure/assumptions/blank.html",
[
[
"about:blank",
"=="
]
],
{}
]
],
"infrastructure/assumptions/canvas-background.html": [
[
"/infrastructure/assumptions/canvas-background.html",
@ -273866,6 +273902,11 @@
{}
]
],
"css/filter-effects/filter-scale-001-ref.html": [
[
{}
]
],
"css/filter-effects/filters-drop-shadow-ref.html": [
[
{}
@ -281901,6 +281942,11 @@
{}
]
],
"feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html.headers": [
[
{}
]
],
"feature-policy/experimental-features/lazyload/lazyload-disabled-tentative.sub.html.headers": [
[
{}
@ -281956,6 +282002,11 @@
{}
]
],
"feature-policy/experimental-features/resources/lazyload.png": [
[
{}
]
],
"feature-policy/experimental-features/resources/parser-blocking-script.js": [
[
{}
@ -282106,6 +282157,11 @@
{}
]
],
"feature-policy/reporting/generic-sensor-reporting.https.html.headers": [
[
{}
]
],
"feature-policy/reporting/geolocation-reporting.https.html.headers": [
[
{}
@ -284551,6 +284607,16 @@
{}
]
],
"html/browsers/history/the-history-interface/blank-new.html": [
[
{}
]
],
"html/browsers/history/the-history-interface/blank-old.html": [
[
{}
]
],
"html/browsers/history/the-history-interface/blank.html": [
[
{}
@ -290671,6 +290737,11 @@
{}
]
],
"html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-margins-2-ref.html": [
[
{}
]
],
"html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-margins-ref.html": [
[
{}
@ -301621,6 +301692,26 @@
{}
]
],
"resources/test/tests/unit/IdlInterface/get_interface_object.html": [
[
{}
]
],
"resources/test/tests/unit/IdlInterface/get_interface_object_owner.html": [
[
{}
]
],
"resources/test/tests/unit/IdlInterface/get_legacy_namespace.html": [
[
{}
]
],
"resources/test/tests/unit/IdlInterface/get_qualified_name.html": [
[
{}
]
],
"resources/test/tests/unit/IdlInterface/has_default_to_json_regular_operation.html": [
[
{}
@ -328169,6 +328260,12 @@
{}
]
],
"audio-output/setSinkId.html": [
[
"/audio-output/setSinkId.html",
{}
]
],
"audio-output/setSinkId.https.html": [
[
"/audio-output/setSinkId.https.html",
@ -344357,6 +344454,18 @@
{}
]
],
"css/cssom/cssstyledeclaration-mutationrecord-005.html": [
[
"/css/cssom/cssstyledeclaration-mutationrecord-005.html",
{}
]
],
"css/cssom/cssstyledeclaration-setter-attr.html": [
[
"/css/cssom/cssstyledeclaration-setter-attr.html",
{}
]
],
"css/cssom/cssstyledeclaration-setter-declarations.html": [
[
"/css/cssom/cssstyledeclaration-setter-declarations.html",
@ -357383,18 +357492,36 @@
{}
]
],
"feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html": [
[
"/feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html",
{}
]
],
"feature-policy/experimental-features/lazyload/lazyload-disabled-tentative.sub.html": [
[
"/feature-policy/experimental-features/lazyload/lazyload-disabled-tentative.sub.html",
{}
]
],
"feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html": [
[
"/feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html",
{}
]
],
"feature-policy/experimental-features/lazyload/lazyload-enabled-tentative.sub.html": [
[
"/feature-policy/experimental-features/lazyload/lazyload-enabled-tentative.sub.html",
{}
]
],
"feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html": [
[
"/feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html",
{}
]
],
"feature-policy/experimental-features/sync-script.tentative.https.sub.html": [
[
"/feature-policy/experimental-features/sync-script.tentative.https.sub.html",
@ -357579,6 +357706,12 @@
{}
]
],
"feature-policy/reporting/generic-sensor-reporting.https.html": [
[
"/feature-policy/reporting/generic-sensor-reporting.https.html",
{}
]
],
"feature-policy/reporting/geolocation-reporting.https.html": [
[
"/feature-policy/reporting/geolocation-reporting.https.html",
@ -360447,6 +360580,12 @@
{}
]
],
"html/browsers/history/the-history-interface/iframe_history_go_0.html": [
[
"/html/browsers/history/the-history-interface/iframe_history_go_0.html",
{}
]
],
"html/browsers/history/the-history-interface/joint_session_history/001.html": [
[
"/html/browsers/history/the-history-interface/joint_session_history/001.html",
@ -361302,7 +361441,9 @@
"html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html": [
[
"/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html",
{}
{
"timeout": "long"
}
]
],
"html/browsers/windows/auxiliary-browsing-contexts/opener-setter.window.js": [
@ -403041,16 +403182,6 @@
{}
]
],
"wasm/idlharness.any.js": [
[
"/wasm/idlharness.any.html",
{}
],
[
"/wasm/idlharness.any.worker.html",
{}
]
],
"wasm/jsapi/constructor/compile.any.js": [
[
"/wasm/jsapi/constructor/compile.any.html",
@ -403179,6 +403310,16 @@
{}
]
],
"wasm/jsapi/idlharness.any.js": [
[
"/wasm/jsapi/idlharness.any.html",
{}
],
[
"/wasm/jsapi/idlharness.any.worker.html",
{}
]
],
"wasm/jsapi/instance/constructor-bad-imports.any.js": [
[
"/wasm/jsapi/instance/constructor-bad-imports.any.html",
@ -443946,8 +444087,12 @@
"a083cdf09232110039d3bb825e207c678b336114",
"manual"
],
"audio-output/setSinkId.html": [
"3fd0d5d6f762b993adb968c994c02ac77b4168f5",
"testharness"
],
"audio-output/setSinkId.https.html": [
"2ce0b482b7eea61c0c56c49ec14dc1630b7b9a9c",
"b4cf7df71c5f134ecf674663ea208295809c566a",
"testharness"
],
"background-fetch/META.yml": [
@ -553803,7 +553948,7 @@
"support"
],
"css/css-properties-values-api/typedom.tentative.html": [
"6d0623bba420dfe5becafb9eb59cbdf4ad115954",
"0255b8f7a2d29ea20d4d9abd7212c4284e631935",
"testharness"
],
"css/css-properties-values-api/unit-cycles.html": [
@ -581571,7 +581716,7 @@
"testharness"
],
"css/cssom/cssstyledeclaration-mutationrecord-002.html": [
"1cdb41a18145556f5cdc7b992d3f7d9dd0cb0f94",
"38ce249a3195b8336c4a32c7514cf0e90bc81d77",
"testharness"
],
"css/cssom/cssstyledeclaration-mutationrecord-003.html": [
@ -581582,6 +581727,14 @@
"55956dfdaaec3457de3f5d6a608c2a0b5345e84d",
"testharness"
],
"css/cssom/cssstyledeclaration-mutationrecord-005.html": [
"26574033ce99dfe69868e9379fa932f091901e8a",
"testharness"
],
"css/cssom/cssstyledeclaration-setter-attr.html": [
"20837052e39368455dedc6ce8901709cc00817cf",
"testharness"
],
"css/cssom/cssstyledeclaration-setter-declarations.html": [
"e66466e7a11b7883f9ad9de84d9cedc27ac3ea61",
"testharness"
@ -582206,6 +582359,14 @@
"158fe897f9c243fa95f6acef7b57885ef3149b21",
"reftest"
],
"css/filter-effects/filter-scale-001-ref.html": [
"0f9d348e3a6b46121824b9b07fd0332a84011e49",
"support"
],
"css/filter-effects/filter-scale-001.html": [
"d1382b97d7d761fbfc8de1a674fba08b888f8de0",
"reftest"
],
"css/filter-effects/filters-drop-shadow-ref.html": [
"3776a006095dd3ec5b9ea826e3260c91469711b6",
"support"
@ -599446,6 +599607,14 @@
"db2dcbc1929b9e1264855e9b80f77dfbda5d4f38",
"support"
],
"feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html": [
"0d46d2f26625ea0013828c52466c194c8ca1c9e4",
"testharness"
],
"feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html.headers": [
"7974815fc9cc069a3890cec9d09d1c6b3e3f9908",
"support"
],
"feature-policy/experimental-features/lazyload/lazyload-disabled-tentative.sub.html": [
"5b9034b63841209bd64c5115e91dc2a69a81d90d",
"testharness"
@ -599454,6 +599623,10 @@
"d0bac47e01a7e903d78ffab7b73838f0852852d6",
"support"
],
"feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html": [
"2dc6a6cc70d3b8d713e7fc0b5c43cb741b706d84",
"testharness"
],
"feature-policy/experimental-features/lazyload/lazyload-enabled-tentative.sub.html": [
"2e0a791f374cecac3eb02c1292ab599535b20d1d",
"testharness"
@ -599462,12 +599635,16 @@
"83b744e2bc4e09b771c7997fc044802f77f65407",
"support"
],
"feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html": [
"6111e691c82be97a0a040053b673d663cb404eb7",
"testharness"
],
"feature-policy/experimental-features/resources/async-script.js": [
"3c0ee6d02343891b0234f31c0fb229929ae1b24b",
"support"
],
"feature-policy/experimental-features/resources/common.js": [
"10c28be7741b718794f264c0b720304b8c5b7cb7",
"64cfca59d6c801e59dfe2a5684b99780413a8ba6",
"support"
],
"feature-policy/experimental-features/resources/defer-script.js": [
@ -599498,6 +599675,10 @@
"a6e98c24e6add4976571141ad2409e1cce96d173",
"support"
],
"feature-policy/experimental-features/resources/lazyload.png": [
"fd3da53a29c3e7f55f950611d34694867b0ff0a4",
"support"
],
"feature-policy/experimental-features/resources/parser-blocking-script.js": [
"c61efee8a0a15801d474fd8b384de01e565e37ce",
"support"
@ -599691,15 +599872,15 @@
"support"
],
"feature-policy/picture-in-picture-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
"e2b52f257a12aae267c96eab1a20cc805f007abb",
"a5ea5139a937984c98f169a088bc6d59f0ba4351",
"testharness"
],
"feature-policy/picture-in-picture-allowed-by-feature-policy-attribute.https.sub.html": [
"0c3897a4ad0f33c1cffd90f063c9d3425d506bd0",
"b0e160e938d394fdd9c839aed438919056dd05b2",
"testharness"
],
"feature-policy/picture-in-picture-allowed-by-feature-policy.https.sub.html": [
"1ecd874c009a89241902950ac916b5cac22799eb",
"b09335a6de38cbb2c7ee6d9feb3a3107289e53b2",
"testharness"
],
"feature-policy/picture-in-picture-allowed-by-feature-policy.https.sub.html.headers": [
@ -599707,11 +599888,11 @@
"support"
],
"feature-policy/picture-in-picture-default-feature-policy.https.sub.html": [
"12bbf7f2f1f80fa28c43c85e028649e3bcedc896",
"477cf7ba51db6557de5a199714e2575ce1555a56",
"testharness"
],
"feature-policy/picture-in-picture-disabled-by-feature-policy.https.sub.html": [
"b36afbda503f523d7298021ee8ea3f7a2f71a433",
"513d04c2fa918f0a6763d0d4b4fe096e028ab3d3",
"testharness"
],
"feature-policy/picture-in-picture-disabled-by-feature-policy.https.sub.html.headers": [
@ -599750,6 +599931,14 @@
"d35e48ba40dc65a3b043a3e41a11332c42bfdba9",
"support"
],
"feature-policy/reporting/generic-sensor-reporting.https.html": [
"c60e3e81a1dddbdc000d799c19719c48ad55376c",
"testharness"
],
"feature-policy/reporting/generic-sensor-reporting.https.html.headers": [
"80cc02753044a3730695bce65bc2b4c22d7a8a6b",
"support"
],
"feature-policy/reporting/geolocation-reporting.https.html": [
"22e258563b799c7d48db2452f15eb6124d1f2d0e",
"testharness"
@ -599787,7 +599976,7 @@
"support"
],
"feature-policy/reporting/picture-in-picture-reporting.html": [
"60e4825d988218bda9422ec6342597823aebabef",
"e3cbf1036871a40163a67aab22930fb7dcde8338",
"testharness"
],
"feature-policy/reporting/picture-in-picture-reporting.html.headers": [
@ -599887,7 +600076,7 @@
"support"
],
"feature-policy/resources/picture-in-picture.js": [
"e245d798acfc2ebbe9e1524ec8413156b8967a84",
"1bf3c1c12a8a9209ee9956955fd3a75d148897f1",
"support"
],
"feature-policy/resources/redirect-on-load.html": [
@ -603654,6 +603843,14 @@
"f5e625167175342d295d158504db6669cc27f407",
"testharness"
],
"html/browsers/history/the-history-interface/blank-new.html": [
"2a545af0ed30d69b1e4bb7d1e608273b89dd3d1e",
"support"
],
"html/browsers/history/the-history-interface/blank-old.html": [
"a77c00fcc6d537347f67179c624d501138f373bb",
"support"
],
"html/browsers/history/the-history-interface/blank.html": [
"89c8724c09d1fe667db4cad2faf75982e4433689",
"support"
@ -603806,6 +604003,10 @@
"2ee2356b1acdde48ee03bd18d644857bb9fc1062",
"testharness"
],
"html/browsers/history/the-history-interface/iframe_history_go_0.html": [
"f93f4c864e21ed8e28fd3bcd9a08450d4876c897",
"testharness"
],
"html/browsers/history/the-history-interface/joint_session_history/001-1.html": [
"9aa5d30d16ecc48a7c503b34f0fb9e12d47fed83",
"support"
@ -604931,7 +605132,7 @@
"testharness"
],
"html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html": [
"85c52e0b42e19bdd78dda120320d66ddbb2103b4",
"e6ff4a19d0d7431a7612f2425ab2eaa39639c696",
"testharness"
],
"html/browsers/windows/auxiliary-browsing-contexts/opener-setter.window.js": [
@ -611354,6 +611555,14 @@
"4e9539179739a3690aab276f2ba98c25bd4dfe9b",
"testharness"
],
"html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-margins-2-ref.html": [
"1680cc88844845e9108a7b5b4cbf249945e688ea",
"support"
],
"html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-margins-2.html": [
"9ca9e18adf395ce899fd734b0f6a814f2a2da1bc",
"reftest"
],
"html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-margins-ref.html": [
"f2701d26f3213e02eee9d3592bbeae7da7e7b898",
"support"
@ -621366,6 +621575,10 @@
"068c1d4dee605a7a9f3ed4a0fd282779449712bb",
"reftest"
],
"infrastructure/assumptions/blank.html": [
"6d8da5e89ce644d74790ef97856709cc9bfe3d80",
"reftest"
],
"infrastructure/assumptions/canvas-background-ref.html": [
"b117f6b300313aef71f993a4dc105385f3ef2c9e",
"support"
@ -622239,7 +622452,7 @@
"support"
],
"interfaces/webrtc.idl": [
"cdeb5204e6a0b5735948b94d5e30931bc2fd062e",
"7496fff41dcbbeda6759977d56e12c21568b49f5",
"support"
],
"interfaces/webusb.idl": [
@ -644007,7 +644220,7 @@
"support"
],
"resources/chromium/generic_sensor_mocks.js": [
"d9a23f447140047a1343f855dfdf5a773ce1b269",
"531c3b8fe0542b280806b82658acc0ff888f6c5b",
"support"
],
"resources/chromium/generic_sensor_mocks.js.headers": [
@ -644043,7 +644256,7 @@
"support"
],
"resources/chromium/sensor.mojom.js": [
"ffbd25b57df58e69476edcce2561e25dde424d5c",
"7578dd6d64f0e91d94c9dcc32432fd2ceadd38b6",
"support"
],
"resources/chromium/sensor_provider.mojom.js": [
@ -644107,7 +644320,7 @@
"support"
],
"resources/idlharness.js": [
"950df6fa34b82a3f4afe2ab925d90a72ddcf3872",
"9e6ed236b0a43f32ffaecbbbb2b8fbe7540b83c5",
"support"
],
"resources/idlharness.js.headers": [
@ -644358,6 +644571,22 @@
"66b79afc12f2fdf139163502065a1778c63b06e2",
"support"
],
"resources/test/tests/unit/IdlInterface/get_interface_object.html": [
"a3d901a752de52c20286c84d5500b78948aa4417",
"support"
],
"resources/test/tests/unit/IdlInterface/get_interface_object_owner.html": [
"51ab2067bc5b8af4597fbb6045b63c4a10dd3efc",
"support"
],
"resources/test/tests/unit/IdlInterface/get_legacy_namespace.html": [
"e2d42bb09e3e5b71e46fcaa86cbc7d727055c447",
"support"
],
"resources/test/tests/unit/IdlInterface/get_qualified_name.html": [
"677a31b5e708741fec21b049c25d01b7e8d5c5c0",
"support"
],
"resources/test/tests/unit/IdlInterface/has_default_to_json_regular_operation.html": [
"b47262b72b91c692211727042f782e88064f9b40",
"support"
@ -648331,7 +648560,7 @@
"support"
],
"service-workers/service-worker/resources/service-worker-header.py": [
"2e82e78107ad4f70b3e88d700139195f8a5b029e",
"74f57a72a9041762f9f50732d2ce890d889810c5",
"support"
],
"service-workers/service-worker/resources/service-worker-interception-dynamic-import-worker.js": [
@ -648535,7 +648764,7 @@
"testharness"
],
"service-workers/service-worker/service-worker-header.https.html": [
"2584485c65ab60e8b429c3db66fc43a8157a8ed5",
"fb902cd1b455d130c899cf06bf05c32184d2b543",
"testharness"
],
"service-workers/service-worker/serviceworker-message-event-historical.https.html": [
@ -654171,7 +654400,7 @@
"support"
],
"tools/ci/ci_wptrunner_infrastructure.sh": [
"3147164ac886cacca862890fac4466fe882a8886",
"0d4c2a5191258d4855d2510eb94858fcb57bd4a7",
"support"
],
"tools/ci/commands.json": [
@ -654263,7 +654492,7 @@
"support"
],
"tools/lint/lint.py": [
"cf668faea6f5403ad7b8d67a191c918cb48c8c0e",
"4c7605876c8780cdbd4898f44b112fc3956158c3",
"support"
],
"tools/lint/tests/__init__.py": [
@ -658947,7 +659176,7 @@
"support"
],
"tools/wpt/run.py": [
"da01a816974bfe445967faeaf3855ab5dcb0cf33",
"452b83f9df6d546ce770807f857a81952db5dd86",
"support"
],
"tools/wpt/testfiles.py": [
@ -659227,7 +659456,7 @@
"support"
],
"tools/wptrunner/wptrunner/browsers/fennec.py": [
"ddb1667a22fe39217d4488de6d44a51177a39c32",
"35f6f5dbd0197783744aaed6693b9c7f52aa8997",
"support"
],
"tools/wptrunner/wptrunner/browsers/firefox.py": [
@ -659527,7 +659756,7 @@
"support"
],
"tools/wptrunner/wptrunner/wptcommandline.py": [
"467903f277347511f23e66cfe0ecb1defa4d351a",
"56f2c36769ba05eeb6123a48dfd9d77ab70647ce",
"support"
],
"tools/wptrunner/wptrunner/wptlogging.py": [
@ -659955,7 +660184,7 @@
"testharness"
],
"trusted-types/Document-write.tentative.html": [
"79247fb4d68e6724b98c62d3b62a0e6b20784f4d",
"87e9e724699efc3f0edde3afade4cf53ec2c9c3e",
"testharness"
],
"trusted-types/Element-insertAdjacentHTML.tentative.html": [
@ -660043,7 +660272,7 @@
"testharness"
],
"trusted-types/block-string-assignment-to-Document-write.tentative.html": [
"beb31445b475ca0f68ae82410da0d97700cce697",
"5e7039705a82886f369bb7c454b8ed08be25b2d6",
"testharness"
],
"trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html": [
@ -662086,10 +662315,6 @@
"f5733b7c8da79f81dbda7e2d22673a730e27a68d",
"testharness"
],
"wasm/idlharness.any.js": [
"9c29ad14559382eba1d4c10cf5782e3e04682f2c",
"testharness"
],
"wasm/incrementer.wasm": [
"47afcdef2a2812acccecd0f203d30d3023593f3d",
"support"
@ -662134,6 +662359,10 @@
"d4a84b254f76ea50284619967ab6dc98c99bfea2",
"testharness"
],
"wasm/jsapi/idlharness.any.js": [
"25298d3dabfbbce7490fa040258f3e06cd94b582",
"testharness"
],
"wasm/jsapi/instance/constructor-bad-imports.any.js": [
"24c51c10dc5df9d52c06bfb0715e435b17f24f7a",
"testharness"
@ -662227,7 +662456,7 @@
"support"
],
"wasm/resources/load_wasm.js": [
"512324639059da8a9d76e9d740d97fc56ebdebc4",
"8316dcfbc89bd02073e4e08db1bee7f65d37e86c",
"support"
],
"wasm/serialization/broadcastchannel-success-and-failure.html": [
@ -662403,7 +662632,7 @@
"support"
],
"web-animations/animation-model/animation-types/property-types.js": [
"232a508e07cb3db2eb9d9094a6e9fd8a1e63e4a0",
"430cd4e182e2b0d64bb06614dc064633be8a4bbf",
"support"
],
"web-animations/animation-model/animation-types/visibility.html": [

View file

@ -1,2 +0,0 @@
[mix-blend-mode-paragraph.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[css-transforms-3d-on-anonymous-block-001.html]
expected: FAIL

View file

@ -497,9 +497,6 @@
[text-indent length(cm) / values]
expected: FAIL
[text-shadow shadow(shadow) / values]
expected: FAIL
[text-indent length(in) / values]
expected: FAIL
@ -509,3 +506,39 @@
[text-indent percentage(%) / values]
expected: FAIL
[height length(mm) / values]
expected: FAIL
[padding-left length(px) / values]
expected: FAIL
[height length(px) / values]
expected: FAIL
[padding-bottom length(mm) / values]
expected: FAIL
[margin-top length(mm) / values]
expected: FAIL
[padding-left length(pt) / values]
expected: FAIL
[margin-top length(em) / values]
expected: FAIL
[padding-left length(em) / values]
expected: FAIL
[margin-top length(pt) / values]
expected: FAIL
[margin-right length(cm) / values]
expected: FAIL
[width length(px) / values]
expected: FAIL
[width length(ex) / values]
expected: FAIL

View file

@ -8,15 +8,6 @@
[border-color end]
expected: FAIL
[word-spacing intermediate]
expected: FAIL
[vertical-align intermediate]
expected: FAIL
[right intermediate]
expected: FAIL
[background-position end]
expected: FAIL
@ -32,15 +23,9 @@
[min-height intermediate]
expected: FAIL
[max-height intermediate]
expected: FAIL
[outline-offset intermediate]
expected: FAIL
[outline-width intermediate]
expected: FAIL
[min-width intermediate]
expected: FAIL
@ -56,18 +41,72 @@
[border-top-width intermediate]
expected: FAIL
[max-width intermediate]
expected: FAIL
[border-spacing intermediate]
expected: FAIL
[left intermediate]
expected: FAIL
[text-indent intermediate]
expected: FAIL
[bottom intermediate]
expected: FAIL
[margin-right end]
expected: FAIL
[width end]
expected: FAIL
[max-height end]
expected: FAIL
[text-indent end]
expected: FAIL
[outline-offset end]
expected: FAIL
[margin-top end]
expected: FAIL
[outline-width end]
expected: FAIL
[line-height end]
expected: FAIL
[top end]
expected: FAIL
[min-width end]
expected: FAIL
[right end]
expected: FAIL
[background-color end]
expected: FAIL
[margin-left intermediate]
expected: FAIL
[border-left-width end]
expected: FAIL
[padding-left intermediate]
expected: FAIL
[padding-top end]
expected: FAIL
[margin-bottom end]
expected: FAIL
[padding-top intermediate]
expected: FAIL
[border-right-width end]
expected: FAIL
[padding-bottom intermediate]
expected: FAIL
[left end]
expected: FAIL

View file

@ -0,0 +1,4 @@
[CaretPosition-001.html]
[Element at (400, 100)]
expected: FAIL

View file

@ -18,3 +18,9 @@
[test some point of the element: bottom right corner]
expected: FAIL
[test some point of the element: top left corner]
expected: FAIL
[test the top of layer]
expected: FAIL

View file

@ -1,4 +0,0 @@
[elementsFromPoint-invalid-cases.html]
[The root element is the last element returned for otherwise empty queries within the viewport]
expected: FAIL

View file

@ -0,0 +1,5 @@
[scroll-behavior-smooth.html]
expected: ERROR
[scroll-behavior: smooth on DIV element]
expected: FAIL

View file

@ -2,7 +2,7 @@
type: testharness
[single-byte-decoder.html?document]
expected: CRASH
expected: TIMEOUT
[windows-1254: iso_8859-9 (document.characterSet and document.inputEncoding)]
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_1.html]
[Multiple history traversals from the same task]
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_4.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_5.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,16 +1,7 @@
[location-protocol-setter-non-broken-weird.html]
[Set location.protocol to data]
expected: FAIL
[Set location.protocol to ftp]
expected: FAIL
[Set location.protocol to gopher]
expected: FAIL
[Set location.protocol to x]
expected: FAIL
[Set location.protocol to http+x]
expected: FAIL

View file

@ -0,0 +1,2 @@
[legend-block-margins-2.html]
expected: FAIL

View file

@ -172,63 +172,3 @@
[XHTML img usemap="http://example.org/#garbage-before-hash-id"]
expected: FAIL
[XHTML img usemap="#percent-escape-id-%41"]
expected: FAIL
[XHTML img usemap="#different-CASE-id"]
expected: FAIL
[HTML (quirks) IMG usemap="#"]
expected: FAIL
[XHTML img usemap="hash-last#"]
expected: FAIL
[HTML (quirks) IMG usemap="no-hash-id"]
expected: FAIL
[HTML (quirks) IMG usemap="no-hash-name"]
expected: FAIL
[HTML (quirks) IMG usemap="#no-such-map"]
expected: FAIL
[HTML (quirks) IMG usemap="hash-last#"]
expected: FAIL
[XHTML img usemap="no-hash-id"]
expected: FAIL
[HTML (quirks) IMG usemap="#different-CASE-name"]
expected: FAIL
[XHTML img usemap="#no-such-map"]
expected: FAIL
[XHTML img usemap="#percent-escape-name-%41"]
expected: FAIL
[XHTML img usemap="#"]
expected: FAIL
[HTML (quirks) IMG usemap="#different-CASE-id"]
expected: FAIL
[XHTML img usemap="#different-CASE-name"]
expected: FAIL
[XHTML img usemap=""]
expected: FAIL
[HTML (quirks) IMG usemap=""]
expected: FAIL
[HTML (quirks) IMG usemap="#percent-escape-name-%41"]
expected: FAIL
[HTML (quirks) IMG usemap="#percent-escape-id-%41"]
expected: FAIL
[XHTML img usemap="no-hash-name"]
expected: FAIL

View file

@ -1,14 +1,13 @@
[viewport-change.html]
type: testharness
expected: TIMEOUT
[picture: source (max-width:500px) broken image, img valid image, resize to wide]
expected: TIMEOUT
expected: FAIL
[picture: source (max-width:500px) valid image, img valid image, resize to wide]
expected: FAIL
[picture: source (max-width:500px) valid image, img broken image, resize to narrow]
expected: TIMEOUT
expected: FAIL
[picture: source (max-width:500px) valid image, img valid image, resize to narrow]
expected: FAIL
@ -19,12 +18,6 @@
[picture: same URL in source (max-width:500px) and img, resize to wide]
expected: FAIL
[picture: source (max-width:500px) valid image, img broken image, resize to wide]
expected: FAIL
[picture: source (max-width:500px) broken image, img valid image, resize to narrow]
expected: FAIL
[img (srcset 1 cand) valid image, resize to narrow]
expected: FAIL

View file

@ -1,52 +0,0 @@
[parse-a-sizes-attribute-width-1000px.html]
[<img srcset="/images/green-1x1.png?e37a 50w, /images/green-16x16.png?e37a 51w" sizes="(min-width:0) min(1px, 100px)"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?f49b 50w, /images/green-16x16.png?f49b 51w" sizes="(min-width:0) max(-200vw, 1px"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?e38b 50w, /images/green-16x16.png?e38b 51w" sizes="(min-width:max(-200vw, 0)) 1px"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?e60 50w, /images/green-16x16.png?e60 51w" sizes="(min-width:0) or (min-width:-1px) 1px"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?e37b 50w, /images/green-16x16.png?e37b 51w" sizes="(min-width:0) max(-100px, 1px)"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?e38a 50w, /images/green-16x16.png?e38a 51w" sizes="(min-width:min(0, 200vw)) 1px"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?e61 50w, /images/green-16x16.png?e61 51w" sizes="(min-width:0) or (unknown &quot;general-enclosed&quot;) 1px"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?e36b 50w, /images/green-16x16.png?e36b 51w" sizes="min(-100px, 1px)"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?f48b 50w, /images/green-16x16.png?f48b 51w" sizes="max(-200vw, 1px"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?f48a 50w, /images/green-16x16.png?f48a 51w" sizes="min(1px, 200vw"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?e58 50w, /images/green-16x16.png?e58 51w" sizes="(min-width:0) or (unknown-mf-name) 1px"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?e62 50w, /images/green-16x16.png?e62 51w" sizes="(min-width:0) or unknown-general-enclosed(foo) 1px"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?e106 50w, /images/green-16x16.png?e106 51w" sizes="(min-width:0) or (unknown-general-enclosed !) 1px"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?e36a 50w, /images/green-16x16.png?e36a 51w" sizes="min(1px, 100px)"> ref sizes="1px" (width:1000px)]
expected: FAIL
[<img srcset="/images/green-1x1.png?f49a 50w, /images/green-16x16.png?f49a 51w" sizes="(min-width:0) min(1px, 200vw"> ref sizes="1px" (width:1000px)]
expected: FAIL

View file

@ -1,7 +0,0 @@
[toggleEvent.html]
[Calling open twice on 'details' fires only one toggle event]
expected: FAIL
[Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element]
expected: FAIL

View file

@ -0,0 +1,4 @@
[DOMContentLoaded-defer.html]
[The end: DOMContentLoaded and defer scripts]
expected: FAIL

View file

@ -2,6 +2,3 @@
[document.open() after parser is aborted]
expected: FAIL
[async document.open() after parser is aborted]
expected: FAIL

View file

@ -3,3 +3,24 @@
[The table cell width calculation quirk, the quirk shouldn't apply for <input>]
expected: FAIL
[The table cell width calculation quirk, display:table-cell on span]
expected: FAIL
[The table cell width calculation quirk, img in span]
expected: FAIL
[The table cell width calculation quirk, inline-block]
expected: FAIL
[The table cell width calculation quirk, display:table-cell on span, wbr]
expected: FAIL
[The table cell width calculation quirk, non-auto width on cell]
expected: FAIL
[The table cell width calculation quirk, the don't-wrap rule is only for the purpose of calculating the width of the cell]
expected: FAIL
[The table cell width calculation quirk, basic]
expected: FAIL

View file

@ -5,10 +5,21 @@
[response.formData() with input: a=b&c=d]
expected: FAIL
[response.formData() with input: a&b&c]
expected: FAIL
[response.formData() with input: _charset_=windows-1252&test=%C2x]
expected: FAIL
[urlencoded-parser.any.worker.html]
[request.formData() with input: a&b&c]
expected: FAIL
[response.formData() with input: a=b&c=d&]
[response.formData() with input: _charset_=windows-1252&test=%C2x]
expected: FAIL
[response.formData() with input: a=b&c=d]
expected: FAIL
[response.formData() with input: a&b&c]
@ -17,35 +28,3 @@
[request.formData() with input: _charset_=windows-1252&test=%C2x]
expected: FAIL
[response.formData() with input: _charset_=windows-1252&test=%C2x]
expected: FAIL
[response.formData() with input: &&&a=b&&&&c=d&]
expected: FAIL
[request.formData() with input: a=b&c=d&]
expected: FAIL
[urlencoded-parser.any.worker.html]
[request.formData() with input: a&b&c]
expected: FAIL
[request.formData() with input: &&&a=b&&&&c=d&]
expected: FAIL
[request.formData() with input: a=b&c=d]
expected: FAIL
[response.formData() with input: a=b&c=d&]
expected: FAIL
[response.formData() with input: _charset_=windows-1252&test=%C2x]
expected: FAIL
[response.formData() with input: &&&a=b&&&&c=d&]
expected: FAIL
[response.formData() with input: a=b&c=d]
expected: FAIL

View file

@ -0,0 +1,207 @@
[idlharness.any.worker.html]
[Global interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[Instance must be primary interface of instance]
expected: FAIL
[Table interface: operation grow(unsigned long)]
expected: FAIL
[Module interface: operation exports(Module)]
expected: FAIL
[Stringification of mod]
expected: FAIL
[Global interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[WebAssembly namespace: operation instantiate(BufferSource, object)]
expected: FAIL
[Instance interface: attribute exports]
expected: FAIL
[Module interface: mod must inherit property "imports(Module)" with the proper type]
expected: FAIL
[Global interface: operation valueOf()]
expected: FAIL
[Table interface: operation get(unsigned long)]
expected: FAIL
[Stringification of instance]
expected: FAIL
[Module interface: calling customSections(Module, USVString) on mod with too few arguments must throw TypeError]
expected: FAIL
[Global interface: existence and properties of interface prototype object]
expected: FAIL
[Module interface: calling imports(Module) on mod with too few arguments must throw TypeError]
expected: FAIL
[Module interface: mod must inherit property "exports(Module)" with the proper type]
expected: FAIL
[Memory interface: operation grow(unsigned long)]
expected: FAIL
[Global interface: existence and properties of interface object]
expected: FAIL
[Table interface: attribute length]
expected: FAIL
[Global interface object length]
expected: FAIL
[Memory interface: calling grow(unsigned long) on memory with too few arguments must throw TypeError]
expected: FAIL
[WebAssembly namespace: operation validate(BufferSource)]
expected: FAIL
[Module interface: operation customSections(Module, USVString)]
expected: FAIL
[Global interface object name]
expected: FAIL
[Module interface: mod must inherit property "customSections(Module, USVString)" with the proper type]
expected: FAIL
[Table interface: operation set(unsigned long, Function)]
expected: FAIL
[WebAssembly namespace: operation instantiate(Module, object)]
expected: FAIL
[Instance interface: instance must inherit property "exports" with the proper type]
expected: FAIL
[Global interface: attribute value]
expected: FAIL
[Memory interface: attribute buffer]
expected: FAIL
[Module interface: operation imports(Module)]
expected: FAIL
[WebAssembly namespace: operation compile(BufferSource)]
expected: FAIL
[Module interface: calling exports(Module) on mod with too few arguments must throw TypeError]
expected: FAIL
[Module must be primary interface of mod]
expected: FAIL
[idlharness.any.html]
[Global interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[Instance must be primary interface of instance]
expected: FAIL
[Table interface: operation grow(unsigned long)]
expected: FAIL
[Module interface: operation exports(Module)]
expected: FAIL
[Stringification of mod]
expected: FAIL
[Global interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[WebAssembly namespace: operation instantiate(BufferSource, object)]
expected: FAIL
[Instance interface: attribute exports]
expected: FAIL
[Module interface: mod must inherit property "imports(Module)" with the proper type]
expected: FAIL
[Global interface: operation valueOf()]
expected: FAIL
[Table interface: operation get(unsigned long)]
expected: FAIL
[Stringification of instance]
expected: FAIL
[Module interface: calling customSections(Module, USVString) on mod with too few arguments must throw TypeError]
expected: FAIL
[Global interface: existence and properties of interface prototype object]
expected: FAIL
[Module interface: calling imports(Module) on mod with too few arguments must throw TypeError]
expected: FAIL
[Module interface: mod must inherit property "exports(Module)" with the proper type]
expected: FAIL
[Memory interface: operation grow(unsigned long)]
expected: FAIL
[Global interface: existence and properties of interface object]
expected: FAIL
[Table interface: attribute length]
expected: FAIL
[Global interface object length]
expected: FAIL
[Memory interface: calling grow(unsigned long) on memory with too few arguments must throw TypeError]
expected: FAIL
[WebAssembly namespace: operation validate(BufferSource)]
expected: FAIL
[Module interface: operation customSections(Module, USVString)]
expected: FAIL
[Global interface object name]
expected: FAIL
[Module interface: mod must inherit property "customSections(Module, USVString)" with the proper type]
expected: FAIL
[Table interface: operation set(unsigned long, Function)]
expected: FAIL
[WebAssembly namespace: operation instantiate(Module, object)]
expected: FAIL
[Instance interface: instance must inherit property "exports" with the proper type]
expected: FAIL
[Global interface: attribute value]
expected: FAIL
[Memory interface: attribute buffer]
expected: FAIL
[Module interface: operation imports(Module)]
expected: FAIL
[WebAssembly namespace: operation compile(BufferSource)]
expected: FAIL
[Module interface: calling exports(Module) on mod with too few arguments must throw TypeError]
expected: FAIL
[Module must be primary interface of mod]
expected: FAIL

View file

@ -1,4 +1,5 @@
[realtimeanalyser-fft-scaling.html]
expected: TIMEOUT
[X 2048-point FFT peak position is not equal to 64. Got 0.]
expected: FAIL

View file

@ -1,2 +0,0 @@
[transition_calc_implicit.html]
expected: TIMEOUT

View file

@ -0,0 +1,4 @@
[scrollBy.html]
[Ensure that the window.scrollBy function affects scroll position as expected]
expected: FAIL

View file

@ -0,0 +1,44 @@
<!doctype html>
<meta charset=utf-8>
<title>Test setSinkId behavior </title>
<div id='log'></div>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
"use strict";
const audio = new Audio();
promise_test(t => audio.setSinkId(""), "setSinkId on default audio output should always work");
promise_test(t => promise_rejects(t, "NotFoundError", audio.setSinkId("nonexistent_device_id")),
"setSinkId fails with NotFoundError on made up deviceid");
promise_test(async t => {
const list = await navigator.mediaDevices.enumerateDevices();
const outputDevicesList = list.filter(({kind}) => kind == "audiooutput");
assert_not_equals(outputDevicesList.length, 0,
"media device list includes at least one audio output device");
let acceptedDevices = 0;
for (const {deviceId} of outputDevicesList) {
const {deviceId} = outputDevicesList[0];
const p1 = audio.setSinkId(deviceId);
assert_equals(audio.sinkId, "", "before it resolves, setSinkId is unchanged");
try {
let r = await p1;
assert_equals(acceptedDevices, 0, "only the default sink device can be set");
acceptedDevices++;
assert_equals(r, undefined, "setSinkId resolves with undefined");
assert_equals(audio.sinkId, deviceId, "when it resolves, setSinkId updates sinkId to the requested deviceId");
r = await audio.setSinkId(deviceId);
assert_equals(r, undefined, "resetting sinkid on same current value should always work");
r = await audio.setSinkId("");
assert_equals(r, undefined, "resetting sinkid on default audio output should always work");
} catch (e) {
assert_equals(e.name, "NotAllowedError", "Non-default devices are failing with NotAllowed error");
}
}
}, "List device, setSinkId should on the default, the rest of the devices will get a NotAlowedError");
</script>

View file

@ -1,45 +1,46 @@
<!doctype html>
<html>
<head>
<title>Test setSinkId behavior </title>
<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
<link rel="help" href="https://www.w3.org/TR/audio-output/#dom-htmlmediaelement-setsinkid">
</head>
<body>
<h1 class="instructions">Description</h1>
<p class="instructions">This test checks that <code>setSinkId</code> follows the algorithm (but does not consider actual rendering of the audio which needs to be manual).</p>
<div id='log'></div>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
"use strict";
const is_output = d => d.kind === "audiooutput";
const audio = new Audio();
promise_test(t => audio.setSinkId(""), "setSinkId on default audio output should always work");
promise_test(t => promise_rejects(t, "NotFoundError", audio.setSinkId("inexistent_device_id")), "setSinkId fails with NotFoundError on made up deviceid");
promise_test(t => promise_rejects(t, "NotFoundError", audio.setSinkId("nonexistent_device_id")),
"setSinkId fails with NotFoundError on made up deviceid");
promise_test(t =>
navigator.mediaDevices.enumerateDevices().then(list => {
assert_not_equals(list.find(is_output), undefined, "media device list includes at least one audio output device");
// since we haven't gained any specific permission,
// for all listed audio output devices, calling setSinkId with device id can
// either create a security exception or work and thus reflect the deviceId
let acceptedDevice = 0;
list.filter(is_output).forEach((d,i) => promise_test(td => audio.setSinkId(d.deviceId).then(r => {
assert_equals(r, undefined, "setSinkId resolves with undefined");
assert_equals(audio.sinkId, d.deviceId, "when it resolves, setSinkId updates sinkId to the requested deviceId");
assert_equals(acceptedDevice, 0, "only one output device can be set without permission");
acceptedDevice++;
promise_test(t => audio.setSinkId(d.deviceId), "resetting sinkid on same current value should always work");
promise_test(t => audio.setSinkId(""), "resetting sinkid on default audio output should always work");
}, e => {
assert_equals(e.name, "SecurityError", "On known devices, the only possible failure of setSinkId is a securityerror"); // assuming AbortError can't happen in the test environment by default
}), "Correctly reacts to setting known deviceid as sinkid " + i));
}), "List media devices");
promise_test(async t => {
const list = await navigator.mediaDevices.enumerateDevices();
const outputDevicesList = list.filter(({kind}) => kind == "audiooutput");
assert_not_equals(outputDevicesList.length, 0,
"media device list includes at least one audio output device");
let acceptedDevices = 0;
for (const {deviceId} of outputDevicesList) {
const {deviceId} = outputDevicesList[0];
const p1 = audio.setSinkId(deviceId);
assert_equals(audio.sinkId, "", "before it resolves, setSinkId is unchanged");
try {
let r = await p1;
assert_equals(acceptedDevices, 0, "only the default sink device can be set");
acceptedDevices++;
assert_equals(r, undefined, "setSinkId resolves with undefined");
assert_equals(audio.sinkId, deviceId, "when it resolves, setSinkId updates sinkId to the requested deviceId");
r = await audio.setSinkId(deviceId);
assert_equals(r, undefined, "resetting sinkid on same current value should always work");
r = await audio.setSinkId("");
assert_equals(r, undefined, "resetting sinkid on default audio output should always work");
} catch (e) {
assert_equals(e.name, "NotAllowedError", "Non-default devices are failing with NotAllowed error");
}
}
}, "List device, setSinkId should on the default, the rest of the devices will get a NotAlowedError");
</script>
</body>
</html>

View file

@ -221,86 +221,86 @@ test_style_property_map_get(function(styleDecl, propertyMap){
let name2 = gen_prop('<length>', '0px');
styleDecl.setProperty(name2, `var(${name1})`);
assert_true(propertyMap.get(name2) instanceof CSSUnparsedValue);
}, name => `${name}.get returns CSSUnparsedValue for value with var references`);
}, name => `StylePropertyMap.get returns CSSUnparsedValue for value with var references (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
let name1 = gen_prop('<length>', '100px');
let name2 = gen_prop('<length>#', '0px');
styleDecl.setProperty(name2, `1px, var(${name1}), 3px`);
assert_true(propertyMap.get(name2) instanceof CSSUnparsedValue);
}, name => `${name}.get returns CSSUnparsedValue for value with var references in list`);
}, name => `StylePropertyMap.get returns CSSUnparsedValue for value with var references in list (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '*', 'if(){}', CSSUnparsedValue);
}, name => `${name}.get returns CSSUnparsedValue for *`);
}, name => `StylePropertyMap.get returns CSSUnparsedValue for * (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<angle>', '42deg', CSSUnitValue);
}, name => `${name}.get returns CSSUnitValue for <angle>`);
}, name => `StylePropertyMap.get returns CSSUnitValue for <angle> (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<color>', '#fefefe', CSSStyleValue);
}, name => `${name}.get returns CSSStyleValue for <color>`);
}, name => `StylePropertyMap.get returns CSSStyleValue for <color> (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<custom-ident>', 'none', CSSKeywordValue);
}, name => `${name}.get returns CSSKeywordValue for <custom-ident>`);
}, name => `StylePropertyMap.get returns CSSKeywordValue for <custom-ident> (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<image>', 'url(thing.png)', CSSImageValue);
}, name => `${name}.get returns CSSImageValue for <image>`);
}, name => `StylePropertyMap.get returns CSSImageValue for <image> (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<integer>', '100', CSSUnitValue);
}, name => `${name}.get returns CSSUnitValue for <integer>`);
}, name => `StylePropertyMap.get returns CSSUnitValue for <integer> (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<length-percentage>', '10%', CSSUnitValue);
}, name => `${name}.get returns CSSUnitValue for <length-percentage> [10%]`);
}, name => `StylePropertyMap.get returns CSSUnitValue for <length-percentage> [10%] (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<length-percentage>', '10px', CSSUnitValue);
}, name => `${name}.get returns CSSUnitValue for <length-percentage> [10px]`);
}, name => `StylePropertyMap.get returns CSSUnitValue for <length-percentage> [10px] (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<length-percentage>', 'calc(10px + 10%)', CSSMathSum);
}, name => `${name}.get returns CSSMathSum for <length-percentage> [calc(10px + 10%)]`);
}, name => `StylePropertyMap.get returns CSSMathSum for <length-percentage> [calc(10px + 10%)] (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<length>', '10px', CSSUnitValue);
}, name => `${name}.get returns CSSUnitValue for <length>`);
}, name => `StylePropertyMap.get returns CSSUnitValue for <length> (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<number>', '42', CSSUnitValue);
}, name => `${name}.get returns CSSUnitValue for <number>`);
}, name => `StylePropertyMap.get returns CSSUnitValue for <number> (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<percentage>', '10%', CSSUnitValue);
}, name => `${name}.get returns CSSUnitValue for <percentage>`);
}, name => `StylePropertyMap.get returns CSSUnitValue for <percentage> (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<resolution>', '300dpi', CSSUnitValue);
}, name => `${name}.get returns CSSUnitValue for <resolution>`);
}, name => `StylePropertyMap.get returns CSSUnitValue for <resolution> (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<time>', '42s', CSSUnitValue);
}, name => `${name}.get returns CSSUnitValue for <time>`);
}, name => `StylePropertyMap.get returns CSSUnitValue for <time> (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<url>', 'url(a)', CSSStyleValue);
}, name => `${name}.get returns CSSStyleValue for <url>`);
}, name => `StylePropertyMap.get returns CSSStyleValue for <url> (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, 'thing1 | THING2', 'thing1', CSSKeywordValue);
}, name => `${name}.get returns CSSKeywordValue for thing1 | THING2`);
}, name => `StylePropertyMap.get returns CSSKeywordValue for thing1 | THING2 (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<length>+', '10px 20px', CSSUnitValue);
}, name => `${name}.get returns CSSUnitValue for <length>+`);
}, name => `StylePropertyMap.get returns CSSUnitValue for <length>+ (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
assert_attribute_get_type(styleDecl, propertyMap, '<length>#', '10px 20px', CSSUnitValue);
}, name => `${name}.get returns CSSUnitValue for <length>#`);
}, name => `StylePropertyMap.get returns CSSUnitValue for <length># (${name})`);
// attributeStyleMap.getAll
@ -309,14 +309,14 @@ test_style_property_map_get(function(styleDecl, propertyMap){
styleDecl.setProperty(name, '10px 20px 30px');
assert_equals(propertyMap.getAll(name).length, 3);
assert_true(propertyMap.getAll(name).every(x => x instanceof CSSUnitValue));
}, name => `${name}.getAll returns a list of CSSUnitValues for <length>+`);
}, name => `StylePropertyMap.getAll returns a list of CSSUnitValues for <length>+ (${name})`);
test_style_property_map_get(function(styleDecl, propertyMap){
let name = gen_prop('<length>#', '0px');
styleDecl.setProperty(name, '10px, 20px, 30px');
assert_equals(propertyMap.getAll(name).length, 3);
assert_true(propertyMap.getAll(name).every(x => x instanceof CSSUnitValue));
}, name => `${name}.getAll returns a list of CSSUnitValues for <length>#`);
}, name => `StylePropertyMap.getAll returns a list of CSSUnitValues for <length># (${name})`);
// StylePropertyMap.set
@ -325,13 +325,15 @@ function test_style_property_map_set_using_property_map(propertyMapName, propert
let name = gen_prop(options.syntax, options.initialValue);
propertyMap.clear();
let ensureArray = v => v.constructor === Array ? v : [v];
for (let value of options.shouldAccept)
propertyMap.set(name, value);
propertyMap.set(name, ...ensureArray(value));
for (let value of options.shouldReject) {
assert_throws(new TypeError(), () => propertyMap.set(name, value));
assert_throws(new TypeError(), () => propertyMap.set(name, ...ensureArray(value)));
}
}, `${propertyMapName}.set accepts correct CSSUnitValues for ${options.syntax}`);
}, `StylePropertyMap.set accepts correct CSSStyleValues for ${options.syntax} (${propertyMapName})`);
}
// Verify that the correct CSSStyleValues are accepted/rejected for a registered
@ -360,77 +362,77 @@ test_style_property_map_set({
syntax: '<angle>',
initialValue: '0deg',
shouldAccept: [CSS.deg(42), CSS.turn(2), '42deg'],
shouldReject: [unparsed('42deg'), CSS.px(15), '50px'],
shouldReject: [unparsed('42deg'), CSS.px(15), '50px', [CSS.deg(15), '10deg']],
});
test_style_property_map_set({
syntax: '<custom-ident>',
initialValue: 'none',
shouldAccept: [keyword('foo'), 'foo'],
shouldReject: [unparsed('foo'), CSS.px(15), '15px'],
shouldReject: [unparsed('foo'), CSS.px(15), '15px', [keyword('foo'), 'foo']],
});
test_style_property_map_set({
syntax: '<image>',
initialValue: 'url(a)',
shouldAccept: [url_image('url(b)'), 'url(b)'],
shouldReject: [unparsed('url(b)'), CSS.px(100), '50px'],
shouldReject: [unparsed('url(b)'), CSS.px(100), '50px', [url_image('url(1)'), 'url(2)']],
});
test_style_property_map_set({
syntax: '<integer>',
initialValue: '0',
shouldAccept: [CSS.number(1), CSS.number(-42), '1', '-42'],
shouldReject: [unparsed('42'), CSS.px(100), '50px'],
shouldReject: [unparsed('42'), CSS.px(100), '50px', [CSS.number(42), '42']],
});
test_style_property_map_set({
syntax: '<length-percentage>',
initialValue: '0px',
shouldAccept: [CSS.percent(10), CSS.px(1), CSS.em(1), '10px', '10%'],
shouldReject: [unparsed('10%'), unparsed('10px'), CSS.dpi(1), 'url(b)'],
shouldReject: [unparsed('10%'), unparsed('10px'), CSS.dpi(1), 'url(b)', [CSS.percent(10), '10%']],
});
test_style_property_map_set({
syntax: '<length>',
initialValue: '0px',
shouldAccept: [CSS.px(10), CSS.em(10), CSS.vh(200), sum(CSS.px(10), CSS.em(20)), '10em', 'calc(10px + 10em)'],
shouldReject: [unparsed('10px'), CSS.percent(1), 'url(b)'],
shouldReject: [unparsed('10px'), CSS.percent(1), 'url(b)', [CSS.em(10), '10px']],
});
test_style_property_map_set({
syntax: '<number>',
initialValue: '0',
shouldAccept: [CSS.number(1337), CSS.number(-42.5), '1337', '-42.5'],
shouldReject: [unparsed('42'), CSS.px(15), '#fef'],
shouldReject: [unparsed('42'), CSS.px(15), '#fef', [CSS.number(-42.5), '42.5']],
});
test_style_property_map_set({
syntax: '<percentage>',
initialValue: '0%',
shouldAccept: [CSS.percent(10), '10%'],
shouldReject: [unparsed('10%'), CSS.px(1), '#fef'],
shouldReject: [unparsed('10%'), CSS.px(1), '#fef', [CSS.percent(10), '1%']],
});
test_style_property_map_set({
syntax: '<resolution>',
initialValue: '0dpi',
shouldAccept: [CSS.dpi(100), CSS.dpcm(10), CSS.dppx(50), '100dpi'],
shouldReject: [unparsed('42'), CSS.px(15), '#fef'],
shouldReject: [unparsed('42'), CSS.px(15), '#fef', [CSS.dpi(1), '2dpi']],
});
test_style_property_map_set({
syntax: '<time>',
initialValue: '0s',
shouldAccept: [CSS.s(42), CSS.ms(16), '16ms'],
shouldReject: [unparsed('42s'), CSS.px(15), '#fef'],
shouldReject: [unparsed('42s'), CSS.px(15), '#fef', [CSS.s(5), '6s']],
});
test_style_property_map_set({
syntax: '<url>',
initialValue: 'url(a)',
shouldAccept: [url_image('url(b)')],
shouldReject: [unparsed('url(b)'), CSS.px(100), '#fef'],
shouldReject: [unparsed('url(b)'), CSS.px(100), '#fef', [url_image('url(1)'), 'url(2)']],
});
test_style_property_map_set({
@ -444,14 +446,308 @@ test_style_property_map_set({
syntax: 'none | thing | THING',
initialValue: 'none',
shouldAccept: [keyword('thing'), keyword('THING'), 'thing'],
shouldReject: [unparsed('thing'), CSS.px(15), keyword('notathing'), 'notathing'],
shouldReject: [unparsed('thing'), CSS.px(15), keyword('notathing'), 'notathing', [keyword('thing'), keyword('thing')]],
});
test_style_property_map_set({
syntax: '<angle> | <length>',
initialValue: '0deg',
shouldAccept: [CSS.deg(42), CSS.turn(2), CSS.px(10), CSS.em(10), '10deg', '10px'],
shouldReject: [unparsed('42deg'), unparsed('20px'), CSS.s(1), '#fef'],
shouldReject: [unparsed('42deg'), unparsed('20px'), CSS.s(1), '#fef', [CSS.deg(42), '21deg']],
});
// StylePropertyMap.set for list-valued properties:
test_style_property_map_set({
syntax: '<angle>+',
initialValue: '0deg',
shouldAccept: [CSS.deg(15), [CSS.deg(15), '10deg'], '15deg 10deg'],
shouldReject: [[CSS.deg(15), CSS.px(10)], '15deg 10px'],
});
test_style_property_map_set({
syntax: '<custom-ident>+',
initialValue: 'none',
shouldAccept: [keyword('foo'), [keyword('foo'), 'bar'], 'foo bar'],
shouldReject: [[keyword('foo'), CSS.px(10)], 'foo 10px'],
});
test_style_property_map_set({
syntax: '<image>+',
initialValue: 'url(a)',
shouldAccept: [url_image('url(1)'), [url_image('url(1)'), 'url(2)'], 'url(1) url(2)'],
shouldReject: [[url_image('url(1)'), CSS.px(10)], 'url(1) 10px'],
});
test_style_property_map_set({
syntax: '<integer>+',
initialValue: '0',
shouldAccept: [CSS.number(42), [CSS.number(42), '42'], '42 42'],
shouldReject: [[CSS.number(42), keyword('noint')], '42 noint'],
});
test_style_property_map_set({
syntax: '<length-percentage>+',
initialValue: '0px',
shouldAccept: [CSS.percent(10), [CSS.percent(10), '10%']],
shouldReject: [[CSS.percent(10), keyword('nolength')], '10% nolength'],
});
test_style_property_map_set({
syntax: '<length>+',
initialValue: '0px',
shouldAccept: [CSS.em(10), [CSS.em(10), '10px']],
shouldReject: [[CSS.em(10), keyword('nolength'), '10em nolength']],
});
test_style_property_map_set({
syntax: '<number>+',
initialValue: '0',
shouldAccept: [CSS.number(-42.5), [CSS.number(-42.5), '42.5'], '-42.5 42.5'],
shouldReject: [[CSS.number(-42.5), CSS.px(10)], '-42.5 10px'],
});
test_style_property_map_set({
syntax: '<percentage>+',
initialValue: '0%',
shouldAccept: [CSS.percent(10), [CSS.percent(10), '1%'], '10% 1%'],
shouldReject: [[CSS.percent(10), keyword('foo')], '10% foo'],
});
test_style_property_map_set({
syntax: '<resolution>+',
initialValue: '0dpi',
shouldAccept: [CSS.dpi(1), [CSS.dpi(1), '2dpi'], '1dpi 2dpi'],
shouldReject: [[CSS.dpi(1), keyword('foo')], '1dpi foo'],
});
test_style_property_map_set({
syntax: '<time>+',
initialValue: '0s',
shouldAccept: [CSS.s(5), [CSS.s(5), '6s'], '5s 6s'],
shouldReject: [[CSS.s(5), keyword('foo')], '5s foo'],
});
test_style_property_map_set({
syntax: '<url>+',
initialValue: 'url(a)',
shouldAccept: [url_image('url(1)'), [url_image('url(1)'), 'url(2)'], 'url(1) url(2)'],
shouldReject: [[url_image('url(1)'), CSS.px(10)], 'url(1) 10px'],
});
test_style_property_map_set({
syntax: 'thing+',
initialValue: 'thing',
shouldAccept: [keyword('thing'), [keyword('thing'), 'thing'], 'thing thing'],
shouldReject: [[keyword('thing'), CSS.px(10)], 'thing 10px'],
});
test_style_property_map_set({
syntax: '<length>#',
initialValue: '0px',
shouldAccept: [CSS.em(10), [CSS.em(10), '10px']],
shouldReject: [[CSS.em(10), keyword('nolength'), '10em nolength']],
});
function test_append_for_property_map(propertyMapName, propertyMap, options) {
test(function(){
let name = gen_prop(options.syntax, options.initialValue);
let ensureArray = v => v.constructor === Array ? v : [v];
for (let value of options.values) {
propertyMap.clear();
if (value.base !== null)
propertyMap.set(name, ...ensureArray(value.base));
// If 'null' is expected, it means we expect the append to fail.
if (value.expect !== null) {
propertyMap.append(name, ...ensureArray(value.append));
let actual = Array.from(propertyMap.getAll(name)).join(' ');
assert_equals(actual, value.expect);
} else {
assert_throws(new TypeError(), () => propertyMap.append(name, ...ensureArray(value.append)));
}
}
}, `StylePropertyMap.append accepts correct CSSStyleValues for ${options.syntax} (${propertyMapName})`);
}
// Verify that the correct CSSStyleValues are accepted/rejected when
// appending values to list-valued properties.
//
// The same test is performed twice: once for attributeStyleMap, and once
// for styleMap.
function test_append(options) {
test_append_for_property_map('attributeStyleMap', target.attributeStyleMap, options);
test_append_for_property_map('styleMap', style.sheet.rules[0].styleMap, options);
}
test_append({
syntax: '<angle>+',
initialValue: '0deg',
values: [
{ base: [CSS.deg(1)], append: [CSS.px(1)], expect: null },
{ base: [CSS.deg(1)], append: [CSS.deg(2), CSS.px(1)], expect: null },
{ base: [CSS.deg(1)], append: [CSS.deg(2), '1px'], expect: null },
{ base: [CSS.deg(1)], append: [CSS.turn(2), CSS.deg(3)], expect: '1deg 2turn 3deg' },
{ base: [CSS.deg(1), CSS.deg(2)], append: [CSS.deg(3)], expect: '1deg 2deg 3deg' },
{ base: [CSS.deg(1)], append: [CSS.deg(2), '3deg'], expect: '1deg 2deg 3deg' },
{ base: [CSS.deg(1)], append: [CSS.deg(2), '3turn 4deg'], expect: '1deg 2deg 3turn 4deg' },
{ base: null, append: [CSS.deg(1), '2deg'], expect: '1deg 2deg' },
],
});
test_append({
syntax: '<custom-ident>+',
initialValue: 'none',
values: [
{ base: [keyword('foo')], append: [CSS.px(1)], expect: null },
{ base: [keyword('foo')], append: [keyword('bar'), CSS.px(1)], expect: null },
{ base: [keyword('foo')], append: [keyword('bar'), '1px'], expect: null },
{ base: [keyword('foo')], append: [keyword('bar'), keyword('baz')], expect: 'foo bar baz' },
{ base: [keyword('foo'), keyword('bar')], append: [keyword('baz')], expect: 'foo bar baz' },
{ base: [keyword('foo')], append: [keyword('bar'), 'baz'], expect: 'foo bar baz' },
{ base: [keyword('foo')], append: [keyword('bar'), 'baz zim'], expect: 'foo bar baz zim' },
{ base: null, append: [keyword('foo'), 'bar'], expect: 'foo bar' },
],
});
['<image>+', '<url>+'].forEach((syntax) => {
test_append({
syntax: syntax,
initialValue: 'url(0)',
values: [
{ base: [url_image('url("1")')], append: [CSS.px(1)], expect: null },
{ base: [url_image('url("1")')], append: [url_image('url("2")'), CSS.px(1)], expect: null },
{ base: [url_image('url("1")')], append: [url_image('url("2")'), '1px'], expect: null },
{ base: [url_image('url("1")')], append: [url_image('url("2")'), url_image('url("3")')], expect: 'url("1") url("2") url("3")' },
{ base: [url_image('url("1")'), url_image('url("2")')], append: [url_image('url("3")')], expect: 'url("1") url("2") url("3")' },
{ base: [url_image('url("1")')], append: [url_image('url("2")'), 'url("3")'], expect: 'url("1") url("2") url("3")' },
{ base: [url_image('url("1")')], append: [url_image('url("2")'), 'url("3") url("4")'], expect: 'url("1") url("2") url("3") url("4")' },
{ base: null, append: [url_image('url("1")'), 'url("2")'], expect: 'url("1") url("2")' },
],
});
});
test_append({
syntax: '<integer>+',
initialValue: '0',
values: [
{ base: [CSS.number(1)], append: [CSS.px(1)], expect: null },
{ base: [CSS.number(1)], append: [CSS.number(2), CSS.px(1)], expect: null },
{ base: [CSS.number(1)], append: [CSS.number(2), 'noint'], expect: null },
{ base: [CSS.number(1)], append: [CSS.number(2), CSS.number(3)], expect: '1 2 3' },
{ base: [CSS.number(1), CSS.number(2)], append: [CSS.number(3)], expect: '1 2 3' },
{ base: [CSS.number(1)], append: [CSS.number(2), '3'], expect: '1 2 3' },
{ base: [CSS.number(1)], append: [CSS.number(2), '3 4'], expect: '1 2 3 4' },
{ base: null, append: [CSS.number(1), '2'], expect: '1 2' },
],
});
test_append({
syntax: '<length-percentage>+',
initialValue: '0px',
values: [
{ base: [CSS.px(1)], append: [keyword('nolength')], expect: null },
{ base: [CSS.px(1)], append: [CSS.px(2), keyword('nolength')], expect: null },
{ base: [CSS.px(1)], append: [CSS.px(2), 'nolength'], expect: null },
{ base: [CSS.px(1)], append: [CSS.px(2), CSS.percent(3)], expect: '1px 2px 3%' },
{ base: [CSS.px(1), CSS.px(2)], append: [CSS.percent(3)], expect: '1px 2px 3%' },
{ base: [CSS.px(1)], append: [CSS.percent(2), '3px'], expect: '1px 2% 3px' },
{ base: [CSS.px(1)], append: [CSS.px(2), '3% 4px'], expect: '1px 2px 3% 4px' },
{ base: null, append: [CSS.px(1), '2%'], expect: '1px 2%' },
],
});
test_append({
syntax: '<length>+',
initialValue: '0',
values: [
{ base: [CSS.px(1)], append: [keyword('nolength')], expect: null },
{ base: [CSS.px(1)], append: [CSS.px(2), keyword('nolength')], expect: null },
{ base: [CSS.px(1)], append: [CSS.px(2), 'nolength'], expect: null },
{ base: [CSS.px(1)], append: [CSS.em(2), CSS.px(3)], expect: '1px 2em 3px' },
{ base: [CSS.px(1), CSS.em(2)], append: [CSS.vh(3)], expect: '1px 2em 3vh' },
{ base: [CSS.px(1)], append: [CSS.em(2), '3px'], expect: '1px 2em 3px' },
{ base: [CSS.px(1)], append: [CSS.px(2), '3em 4cm'], expect: '1px 2px 3em 4cm' },
{ base: null, append: [CSS.vh(1), '2px'], expect: '1vh 2px' },
],
});
test_append({
syntax: '<number>+',
initialValue: '0',
values: [
{ base: [CSS.number(-1)], append: [keyword('NaN')], expect: null },
{ base: [CSS.number(-1)], append: [CSS.number(2.5), keyword('NaN')], expect: null },
{ base: [CSS.number(-1)], append: [CSS.number(2.5), '1px'], expect: null },
{ base: [CSS.number(-1)], append: [CSS.number(2.5), CSS.number(3.2)], expect: '-1 2.5 3.2' },
{ base: [CSS.number(-1), CSS.number(2.5)], append: [CSS.number(3.2)], expect: '-1 2.5 3.2' },
{ base: [CSS.number(-1)], append: [CSS.number(2.5), '3.2'], expect: '-1 2.5 3.2' },
{ base: [CSS.number(-1)], append: [CSS.number(2.5), '3.2 4'], expect: '-1 2.5 3.2 4' },
{ base: null, append: [CSS.number(-1), '2.5'], expect: '-1 2.5' },
],
});
test_append({
syntax: '<percentage>+',
initialValue: '0%',
values: [
{ base: [CSS.percent(1)], append: [CSS.px(1)], expect: null },
{ base: [CSS.percent(1)], append: [CSS.percent(2), CSS.px(1)], expect: null },
{ base: [CSS.percent(1)], append: [CSS.percent(2), '1px'], expect: null },
{ base: [CSS.percent(1)], append: [CSS.percent(2), CSS.percent(3)], expect: '1% 2% 3%' },
{ base: [CSS.percent(1), CSS.percent(2)], append: [CSS.percent(3)], expect: '1% 2% 3%' },
{ base: [CSS.percent(1)], append: [CSS.percent(2), '3%'], expect: '1% 2% 3%' },
{ base: [CSS.percent(1)], append: [CSS.percent(2), '3% 4%'], expect: '1% 2% 3% 4%' },
{ base: null, append: [CSS.percent(1), '2%'], expect: '1% 2%' },
],
});
test_append({
syntax: '<resolution>+',
initialValue: '0dpi',
values: [
{ base: [CSS.dpi(1)], append: [CSS.px(1)], expect: null },
{ base: [CSS.dpi(1)], append: [CSS.dpi(2), CSS.px(1)], expect: null },
{ base: [CSS.dpi(1)], append: [CSS.dpi(2), '1px'], expect: null },
{ base: [CSS.dpi(1)], append: [CSS.dpi(2), CSS.dpi(3)], expect: '1dpi 2dpi 3dpi' },
{ base: [CSS.dpi(1), CSS.dpi(2)], append: [CSS.dpi(3)], expect: '1dpi 2dpi 3dpi' },
{ base: [CSS.dpi(1)], append: [CSS.dpi(2), '3dpi'], expect: '1dpi 2dpi 3dpi' },
{ base: [CSS.dpi(1)], append: [CSS.dpi(2), '3dpi 4dpi'], expect: '1dpi 2dpi 3dpi 4dpi' },
{ base: null, append: [CSS.dpi(1), '2dpi'], expect: '1dpi 2dpi' },
],
});
test_append({
syntax: '<time>+',
initialValue: '0s',
values: [
{ base: [CSS.s(1)], append: [CSS.px(1)], expect: null },
{ base: [CSS.s(1)], append: [CSS.s(2), CSS.px(1)], expect: null },
{ base: [CSS.s(1)], append: [CSS.ms(2), '1px'], expect: null },
{ base: [CSS.s(1)], append: [CSS.ms(2), CSS.s(3)], expect: '1s 2ms 3s' },
{ base: [CSS.s(1), CSS.s(2)], append: [CSS.s(3)], expect: '1s 2s 3s' },
{ base: [CSS.s(1)], append: [CSS.s(2), '3s'], expect: '1s 2s 3s' },
{ base: [CSS.s(1)], append: [CSS.s(2), '3ms 4s'], expect: '1s 2s 3ms 4s' },
{ base: null, append: [CSS.s(1), '2s'], expect: '1s 2s' },
],
});
test_append({
syntax: 'foo+',
initialValue: 'foo',
values: [
{ base: [keyword('foo')], append: [CSS.px(1)], expect: null },
{ base: [keyword('foo')], append: [keyword('foo'), CSS.px(1)], expect: null },
{ base: [keyword('foo')], append: [keyword('foo'), '1px'], expect: null },
{ base: [keyword('foo')], append: [keyword('foo'), keyword('foo')], expect: 'foo foo foo' },
{ base: [keyword('foo'), keyword('foo')], append: [keyword('foo')], expect: 'foo foo foo' },
{ base: [keyword('foo')], append: [keyword('foo'), 'foo'], expect: 'foo foo foo' },
{ base: [keyword('foo')], append: [keyword('foo'), 'foo foo'], expect: 'foo foo foo foo' },
{ base: null, append: [keyword('foo'), keyword('foo')], expect: 'foo foo' },
],
});
// CSSStyleValue.parse/parseAll

View file

@ -1,7 +1,7 @@
<!doctype html>
<meta charset="utf-8">
<title>CSSOM: CSSStyleDeclaration.setPropertyValue doesn't queue a mutation record for invalid values</title>
<link rel="help" href="https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setpropertyvalue">
<link rel="help" href="https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

View file

@ -0,0 +1,16 @@
<!doctype html>
<html style="color: inherit">
<meta charset="utf-8">
<title>CSSOM: CSSStyleDeclaration.setPropertyValue doesn't queue a mutation record for invalid values</title>
<link rel="help" href="https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
let test = async_test("CSSStyleDeclaration.setPropertyValue doesn't queue a mutation record when setting invalid values");
let m = new MutationObserver(test.unreached_func("shouldn't queue a mutation record"));
m.observe(document.documentElement, { attributes: true });
document.documentElement.style.width = "-100px";
requestAnimationFrame(() => test.done());
</script>

View file

@ -0,0 +1,18 @@
<!doctype html>
<title>CSSOM test: declaration block after setting via CSSOM</title>
<link rel="help" href="https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<script>
test(function() {
let element = document.createElement("div");
element.style.setProperty("doesntexist", "0");
assert_false(element.hasAttribute("style"));
}, "Setting an invalid property via the declaration setter doesn't create a declaration");
test(function() {
let element = document.createElement("div");
element.style.setProperty("width", "-100");
assert_false(element.hasAttribute("style"));
}, "Setting an invalid value via the declaration setter doesn't create a declaration");
</script>

View file

@ -0,0 +1,10 @@
<!doctype html>
<title>CSS Test Reference</title>
<style>
div {
width: 150px;
height: 150px;
background: green;
}
</style>
<div></div>

View file

@ -0,0 +1,31 @@
<!doctype html>
<title>CSS Filter Effects test: Scaling is properly accounted for.</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects/#FilterProperty">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1497239">
<link rel="match" href="filter-scale-001-ref.html">
<style>
#outer {
width: 15px;
height: 15px;
transform: scale(10);
transform-origin: 0 0;
}
#inner {
filter: url(#blur);
width: 15px;
height: 15px;
background: green;
}
</style>
<div id="outer">
<div id="inner"></div>
</div>
<svg xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="blur">
<feGaussianBlur in="SourceGraphic" stdDeviation="0,0"></feGaussianBlur>
</filter>
</defs>
</svg>

View file

@ -0,0 +1,61 @@
<!doctype html>
<meta charset=utf-8>
<title>Verify behavior of 'lazyload' attribute state 'OFF' when the feature policy 'lazyload' is
disabled.
</title>
<link rel="stylesheet" href="/feature-policy/experimental-features/resources/lazyload-image.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/feature-policy/experimental-features/resources/common.js"></script>
<style>
body {
width: 100%;
height: 100%;
}
img {
width: 200px;
height: 200px;
border: solid 1px black;
}
#image-container {
position: absolute;
top: 400%;
}
</style>
<body>
<p>Image inserted further below.</p>
<div id="image-container">
<img id="off" lazyload="off" src="http://{{hosts[alt][www1]}}:{{ports[http][0]}}/feature-policy/experimental-features/resources/lazyload.png"></img>
<img id="auto" lazyload="auto" src="http://{{hosts[alt][www2]}}:{{ports[http][0]}}/feature-policy/experimental-features/resources/lazyload.png"></img>
</div>
<script>
var img_off = document.getElementById("off");
var img_auto = document.getElementById("auto");
[window, img_off, img_auto].forEach((target) => {
target.load_complete = wait_for_load(target).then(() => target.did_load = true );
});
function images_loaded() {
return img_off.did_load && img_auto.did_load;
}
function same_load_state() {
return img_off.did_load === img_auto.did_load;
}
// Verifies that "off" and "auto" behave the same for out-of-view images.
promise_test(async(t) => {
await window.load_complete;
assert_true(same_load_state(), "Expected same loading state for both images.");
}, "When the 'lazyload' feature is disabled, lazyload=OFF and lazyload=AUTO behave the same.");
// Verifies that images with attributes "off" and "auto" load after the images get into view.
promise_test(async(t) => {
document.getElementById("image-container").scrollIntoView();
await img_off.load_complete;
await img_auto.load_complete;
}, "Sanity-check: Verify that all images load after they are scrolled into view.");
</script>
</body>

View file

@ -0,0 +1,2 @@
Feature-Policy: lazyload 'none'
Cache-Control: no-cache, no-store, max-age=0

View file

@ -0,0 +1,45 @@
<!doctype html>
<meta charset=utf-8>
<title>Verify behavior of 'lazyload' attribute state 'OFF' when the feature policy 'lazyload' is
enabled.
</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/feature-policy/experimental-features/resources/common.js"></script>
<style>
body {
width: 100%;
height: 100%;
}
img {
width: 200px;
height: 200px;
border: solid 1px black;
}
#image-container {
position: absolute;
top: 400%;
}
</style>
<body>
<p>Image inserted further below.</p>
<div id="image-container">
<img id="off" lazyload="off" src="http://{{hosts[alt][www1]}}:{{ports[http][0]}}/feature-policy/experimental-features/resources/lazyload.png"></img>
</div>
<script>
var img = document.querySelector("img");
[img, window].forEach((target) => {
target.load_complete = wait_for_load(target).then(() => target.did_load = true );
});
// Sanity-check: Verify that when feature-policy 'lazyload' is enabled, the lazyload attribute
// value 'OFF' works as expected (images load immediately).
promise_test( async(t) => {
await window.load_complete;
assert_true(img.did_load, "Image should have loaded.");
}, "When feature is enabled, lazyload=OFF works as expected.");
</script>
</body>

View file

@ -0,0 +1,48 @@
<!doctype html>
<meta charset=utf-8>
<title>Verify behavior of 'lazyload' attribute state 'ON' (sanity-check for lazyload policy tests).
</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/feature-policy/experimental-features/resources/common.js"></script>
<style>
body {
width: 100%;
height: 100%;
}
img {
width: 200px;
height: 200px;
border: solid 1px black;
}
#image-container {
position: absolute;
top: 400%;
}
</style>
<body>
<p>Image inserted further below.</p>
<div id="image-container">
<img lazyload="on" src="http://{{hosts[alt][www1]}}:{{ports[http][0]}}/feature-policy/experimental-features/resources/lazyload.png"/>
</div>
<script>
var img = document.querySelector("img");
[img, window].forEach((target) => {
target.did_load = false;
target.load_complete = wait_for_load(target).then(() => target.did_load = true );
});
// Sanity-check: Verify that when feature-policy 'lazyload' is enabled, the lazyload attribute
// value 'OFF' works as expected (images load immediately).
promise_test( async(t) => {
await window.load_complete;
assert_false(img.did_load, "Out-of-viewport image should not have loaded.");
img.scrollIntoView();
await img.load_complete;
}, "Verify 'lazyload' attribute state 'on' works as expected: image loads only when in " +
"viewport.");
</script>
</body>

View file

@ -58,3 +58,10 @@ function createIframe(container, attributes) {
container.appendChild(new_iframe);
return new_iframe;
}
// Returns a promise which is resolved when |load| event is dispatched for |e|.
function wait_for_load(e) {
return new Promise((resolve) => {
e.addEventListener("load", resolve);
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -16,13 +16,13 @@
relative_path;
const header = 'Feature-Policy allow="picture-in-picture"';
async_test(t => {
async_pip_test(t => {
test_feature_availability(
'picture-in-picture', t, same_origin_src,
expect_feature_available_default, 'picture-in-picture');
}, header + ' allows same-origin navigation in an iframe.');
async_test(t => {
async_pip_test(t => {
test_feature_availability(
'picture-in-picture', t, cross_origin_src,
expect_feature_unavailable_default, 'picture-in-picture');

View file

@ -15,13 +15,13 @@
const feature_name = 'Feature policy "picture-in-picture"';
const header = 'allow="picture-in-picture" attribute';
async_test(t => {
async_pip_test(t => {
test_feature_availability(
'picture-in-picture', t, same_origin_src,
expect_feature_available_default, 'picture-in-picture');
}, feature_name + ' can be enabled in same-origin iframe using ' + header);
async_test(t => {
async_pip_test(t => {
test_feature_availability(
'picture-in-picture', t, cross_origin_src,
expect_feature_available_default, 'picture-in-picture');

View file

@ -14,18 +14,18 @@
same_origin_src;
const header = 'Feature-Policy header: picture-in-picture *';
async_test(t => {
async_pip_test(t => {
isPictureInPictureAllowed().then(t.step_func_done((result) => {
assert_true(result);
}));
}, header + ' allows the top-level document.');
async_test(t => {
async_pip_test(t => {
test_feature_availability('picture-in-picture', t, same_origin_src,
expect_feature_available_default);
}, header + ' allows same-origin iframes.');
async_test(t => {
async_pip_test(t => {
test_feature_availability('picture-in-picture', t, cross_origin_src,
expect_feature_available_default);
}, header + ' allows cross-origin iframes.');

View file

@ -14,18 +14,18 @@
same_origin_src;
const header = 'Default "picture-in-picture" feature policy [*]';
async_test(t => {
async_pip_test(t => {
isPictureInPictureAllowed().then(t.step_func_done((result) => {
assert_true(result);
}));
}, header + ' allows the top-level document.');
async_test(t => {
async_pip_test(t => {
test_feature_availability('picture-in-picture', t, same_origin_src,
expect_feature_available_default);
}, header + ' allows same-origin iframes.');
async_test(t => {
async_pip_test(t => {
test_feature_availability('picture-in-picture', t, cross_origin_src,
expect_feature_available_default);
}, header + ' allows cross-origin iframes.');

View file

@ -14,18 +14,18 @@
same_origin_src;
const header = 'Feature-Policy header: picture-in-picture "none"';
async_test(t => {
async_pip_test(t => {
isPictureInPictureAllowed().then(t.step_func_done((result) => {
assert_false(result);
}));
}, header + ' disallows the top-level document.');
async_test(t => {
async_pip_test(t => {
test_feature_availability('picture-in-picture', t, same_origin_src,
expect_feature_unavailable_default);
}, header + ' disallows same-origin iframes.');
async_test(t => {
async_pip_test(t => {
test_feature_availability('picture-in-picture', t, cross_origin_src,
expect_feature_unavailable_default);
}, header + ' disallows cross-origin iframes.');

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
</head>
<body>
<script>
var sensor_features_verified = {
"accelerometer": false,
"ambient-light-sensor": false,
"magnetometer": false,
"gyroscope": false
};
var check_report_format = function(reports, observer) {
// Check each report in this batch. This observer callback may be called
// multiple times before all reports have been processed.
for (const report of reports) {
// Validate that the reported feature is one of the sensor features, and that
// we have not seen a report for this feature before.
assert_true(sensor_features_verified.hasOwnProperty(report.body.feature));
assert_false(sensor_features_verified[report.body.feature]);
// Validate the remainder of the report
assert_equals(report.type, "feature-policy");
assert_equals(report.url, document.location.href);
assert_equals(report.body.sourceFile, document.location.href);
assert_equals(typeof report.body.message, "string");
assert_equals(typeof report.body.lineNumber, "number");
assert_equals(typeof report.body.columnNumber, "number");
sensor_features_verified[report.body.feature] = true;
}
// Test is only done when reports for all features have been seen
for (let result of Object.values(sensor_features_verified)) {
if (!result)
return;
}
this.done();
};
async_test(t => {
new ReportingObserver(t.step_func(check_report_format),
{types: ['feature-policy']}).observe();
assert_throws("SecurityError", () => new Accelerometer(), "Constructing sensors should be blocked by policy");
assert_throws("SecurityError", () => new AmbientLightSensor(), "Constructing sensors should be blocked by policy");
assert_throws("SecurityError", () => new Gyroscope(), "Constructing sensors should be blocked by policy");
assert_throws("SecurityError", () => new Magnetometer(), "Constructing sensors should be blocked by policy");
}, "Generic Sensor Report Format");
</script>
</body>
</html>

View file

@ -0,0 +1 @@
Feature-Policy: ambient-light-sensor 'none'; accelerometer 'none'; gyroscope 'none'; magnetometer 'none'

View file

@ -6,6 +6,7 @@
<script src='/resources/testharnessreport.js'></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src='../resources/picture-in-picture.js'></script>
</head>
<body>
<script>
@ -28,7 +29,7 @@ const loadVideo = () => new Promise(resolve => {
}, { once: true });
});
promise_test(async (t) => {
promise_pip_test(async (t) => {
const report = new Promise(resolve => {
new ReportingObserver((reports, observer) => resolve([reports, observer]),
{types: ['feature-policy']}).observe();

View file

@ -1,7 +1,18 @@
function isPictureInPictureAllowed() {
if (!('pictureInPictureEnabled' in document))
return Promise.resolve(false);
function async_pip_test(func, name) {
async_test(t => {
assert_true('pictureInPictureEnabled' in document, 'Picture-in-Picture API is available');
func(t);
}, name);
}
function promise_pip_test(func, name) {
promise_test(async t => {
assert_true('pictureInPictureEnabled' in document, 'Picture-in-Picture API is available');
return func(t);
}, name);
}
function isPictureInPictureAllowed() {
return new Promise(resolve => {
let video = document.createElement('video');
video.src = getVideoURI('/media/movie_5');

View file

@ -0,0 +1,5 @@
<!DOCTYPE html>
<head>
<title>New page</title>
</head>
<body>This is a new page.</body>

View file

@ -0,0 +1,5 @@
<!DOCTYPE html>
<head>
<title>Old page</title>
</head>
<body>This is an old page.</body>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<head>
<title>iframe_history_go_0</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<iframe></iframe>
<script>
promise_test(async (t) => {
let iframe = null;
const OLD_URL = 'blank-old.html';
const NEW_URL = 'blank-new.html';
await new Promise(resolve => {
iframe = document.createElement('iframe');
iframe.onload = () => resolve();
iframe.src = OLD_URL;
document.body.appendChild(iframe);
t.add_cleanup(() => iframe.remove());
});
assert_equals(iframe.contentDocument.body.textContent, 'This is an old page.\n');
await new Promise(resolve => {
iframe.onload = () => resolve();
iframe.src = NEW_URL;
});
assert_equals(iframe.contentDocument.body.textContent, 'This is a new page.\n');
await new Promise(resolve => {
iframe.onload = () => resolve();
iframe.contentWindow.history.go(0);
});
assert_equals(iframe.contentDocument.body.textContent, 'This is a new page.\n');
}, 'iframe\'s history.go(0) performs a location.reload()');
</script>
</body>

View file

@ -2,6 +2,7 @@
<html>
<head>
<title>Auxiliary Browing Contexts: window.opener setter</title>
<meta name=timeout content=long>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/PrefixedLocalStorage.js"></script>

View file

@ -0,0 +1,142 @@
<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
<meta charset="utf-8">
<title>Reference for legend block-axis margins</title>
<style>
.fieldset {
display: block;
position: relative;
width: 40px;
border: 2px solid blue;
padding: 4px;
}
.legend {
display: block;
position: absolute;
width: 10px;
height: 20px;
padding: 0;
margin: 0;
background: grey;
}
.t2 .fieldset { border-top-width: 12px; }
.t3 .fieldset { border-top-width: 12px; }
.t3 .legend { height: 12px; background:white; }
.legend > x { display:block; position:relative; height:6px; background:grey; margin-top:3px; }
div { border: 1px solid; margin: 0 2px 10px 0; }
c { display:block; height:10px; background: lightgrey; }
f { float: left; }
</style>
</head>
<body>
<f>
<div>
<span class="fieldset" style="margin-top:9px"><span class="legend" style="top:-11px"></span><c style="margin-top:9px"></c></span>
</div>
<div>
<span class="fieldset" style="margin-top:19px"><span class="legend" style="top:-11px"></span><c style="margin-top:9px"></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="top:-12px"></span><c style="margin-top:8px"></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="top:-20px"></span><c></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="top:-20px"></span><c></c></span>
</div>
<div>
<span class="fieldset" style="margin-top:9px"><span class="legend" style="top:-11px"></span><c style="margin-top:19px"></c></span>
</div>
<div>
<span class="fieldset" style="margin-top:9px"><span class="legend" style="top:-11px"></span><c style="margin-top:29px"></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="top:-2px; z-index:1"></span><c style="position:relative; z-index:1"></c></span>
</div>
</f>
<f class=t2>
<div>
<span class="fieldset" style="margin-top:4px"><span class="legend" style="top:-16px"></span><c style="margin-top:4px"></c></span>
</div>
<div>
<span class="fieldset" style="margin-top:14px"><span class="legend" style="top:-16px"></span><c style="margin-top:4px"></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="top:-20px"></span><c></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="top:-20px"></span><c></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="top:-20px"></span><c></c></span>
</div>
<div>
<span class="fieldset" style="margin-top:4px"><span class="legend" style="top:-16px"></span><c style="margin-top:14px"></c></span>
</div>
<div>
<span class="fieldset" style="margin-top:4px"><span class="legend" style="top:-16px"></span><c style="margin-top:24px"></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="top:-12px; height:16px"></span><c></c></span>
</div>
</f>
<f class=t3>
<div>
<span class="fieldset"><span class="legend" style="margin-top: -16px"><x></x></span><c></c></span>
</div>
<div>
<span class="fieldset" style="margin-top: 4px"><span class="legend" style="margin-top: -16px"><x style="top:3px"></x></span><c></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="margin-top: -16px"><x></x></span><c></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="margin-top: -16px"><x></x></span><c></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="margin-top: -16px"><x></x></span><c></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="margin-top: -16px"><x style="top:-3px"></x></span><c style="margin-top:4px"></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="margin-top: -16px"><x style="top:-3px"></x></span><c style="margin-top:14px"></c></span>
</div>
<div>
<span class="fieldset"><span class="legend" style="margin-top: -16px"><x></x></span><c></c></span>
</div>
</f>
</body>
</html>

View file

@ -0,0 +1,139 @@
<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
<meta charset="utf-8">
<title>legend block-axis margins</title>
<link rel="match" href="legend-block-margins-2-ref.html">
<style>
fieldset {
width: 40px;
border: 2px solid blue;
padding: 4px;
margin: 0;
}
legend {
width: 10px;
height: 20px;
padding: 0;
background: grey;
}
.t2 fieldset { border-top-width: 12px; }
.t3 fieldset { border-top-width: 12px; }
.t3 legend { height: 6px; }
div { border: 1px solid; margin: 0 2px 10px 0; }
c { display:block; height:10px; background: lightgrey; }
f { float: left; }
</style>
</head>
<body>
<f>
<div>
<fieldset><legend></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-top: 10px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-top: -10px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-top: -20px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-top: -30px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-bottom: 10px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-bottom: 20px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-bottom: -20px"></legend><c></c></fieldset>
</div>
</f>
<f class=t2>
<div>
<fieldset><legend></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-top: 10px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-top: -10px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-top: -20px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-top: -30px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-bottom: 10px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-bottom: 20px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-bottom: -20px"></legend><c></c></fieldset>
</div>
</f>
<f class=t3>
<div>
<fieldset><legend></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-top: 10px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-top: -10px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-top: -20px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-top: -30px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-bottom: 10px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-bottom: 20px"></legend><c></c></fieldset>
</div>
<div>
<fieldset><legend style="margin-bottom: -20px"></legend><c></c></fieldset>
</div>
</f>
</body>
</html>

View file

@ -0,0 +1,2 @@
<title>Blank Document</title>
<link rel=match href="about:blank">

View file

@ -297,6 +297,7 @@ dictionary RTCRtpSendParameters : RTCRtpParameters {
required DOMString transactionId;
required sequence<RTCRtpEncodingParameters> encodings;
RTCDegradationPreference degradationPreference = "balanced";
RTCPriorityType priority = "low";
};
dictionary RTCRtpReceiveParameters : RTCRtpParameters {
@ -314,7 +315,6 @@ dictionary RTCRtpEncodingParameters : RTCRtpCodingParameters {
octet codecPayloadType;
RTCDtxStatus dtx;
boolean active = true;
RTCPriorityType priority = "low";
unsigned long ptime;
unsigned long maxBitrate;
double maxFramerate;

View file

@ -109,7 +109,7 @@ var GenericSensorTest = (() => {
this.readingSizeInBytes_ =
device.mojom.SensorInitParams.kReadBufferSizeForTests;
this.sharedBufferSizeInBytes_ = this.readingSizeInBytes_ *
(device.mojom.SensorType.RELATIVE_ORIENTATION_QUATERNION + 1);
(device.mojom.SensorType.MAX_VALUE + 1);
let rv = Mojo.createSharedBuffer(this.sharedBufferSizeInBytes_);
assert_equals(rv.result, Mojo.RESULT_OK, "Failed to create buffer");
this.sharedBufferHandle_ = rv.handle;

View file

@ -31,6 +31,8 @@
SensorType.ABSOLUTE_ORIENTATION_QUATERNION = SensorType.ABSOLUTE_ORIENTATION_EULER_ANGLES + 1;
SensorType.RELATIVE_ORIENTATION_EULER_ANGLES = SensorType.ABSOLUTE_ORIENTATION_QUATERNION + 1;
SensorType.RELATIVE_ORIENTATION_QUATERNION = SensorType.RELATIVE_ORIENTATION_EULER_ANGLES + 1;
SensorType.MIN_VALUE = 0,
SensorType.MAX_VALUE = 10,
SensorType.isKnownEnumValue = function(value) {
switch (value) {
@ -60,6 +62,8 @@
var ReportingMode = {};
ReportingMode.ON_CHANGE = 0;
ReportingMode.CONTINUOUS = ReportingMode.ON_CHANGE + 1;
ReportingMode.MIN_VALUE = 0,
ReportingMode.MAX_VALUE = 1,
ReportingMode.isKnownEnumValue = function(value) {
switch (value) {
@ -688,13 +692,13 @@
};
SensorProxy.prototype.getDefaultConfiguration = function() {
var params = new Sensor_GetDefaultConfiguration_Params();
var params_ = new Sensor_GetDefaultConfiguration_Params();
return new Promise(function(resolve, reject) {
var builder = new codec.MessageV1Builder(
kSensor_GetDefaultConfiguration_Name,
codec.align(Sensor_GetDefaultConfiguration_Params.encodedSize),
codec.kMessageExpectsResponse, 0);
builder.encodeStruct(Sensor_GetDefaultConfiguration_Params, params);
builder.encodeStruct(Sensor_GetDefaultConfiguration_Params, params_);
var message = builder.finish();
this.receiver_.acceptAndExpectResponse(message).then(function(message) {
var reader = new codec.MessageReader(message);
@ -712,14 +716,14 @@
};
SensorProxy.prototype.addConfiguration = function(configuration) {
var params = new Sensor_AddConfiguration_Params();
params.configuration = configuration;
var params_ = new Sensor_AddConfiguration_Params();
params_.configuration = configuration;
return new Promise(function(resolve, reject) {
var builder = new codec.MessageV1Builder(
kSensor_AddConfiguration_Name,
codec.align(Sensor_AddConfiguration_Params.encodedSize),
codec.kMessageExpectsResponse, 0);
builder.encodeStruct(Sensor_AddConfiguration_Params, params);
builder.encodeStruct(Sensor_AddConfiguration_Params, params_);
var message = builder.finish();
this.receiver_.acceptAndExpectResponse(message).then(function(message) {
var reader = new codec.MessageReader(message);
@ -737,12 +741,12 @@
};
SensorProxy.prototype.removeConfiguration = function(configuration) {
var params = new Sensor_RemoveConfiguration_Params();
params.configuration = configuration;
var params_ = new Sensor_RemoveConfiguration_Params();
params_.configuration = configuration;
var builder = new codec.MessageV0Builder(
kSensor_RemoveConfiguration_Name,
codec.align(Sensor_RemoveConfiguration_Params.encodedSize));
builder.encodeStruct(Sensor_RemoveConfiguration_Params, params);
builder.encodeStruct(Sensor_RemoveConfiguration_Params, params_);
var message = builder.finish();
this.receiver_.accept(message);
};
@ -752,11 +756,11 @@
};
SensorProxy.prototype.suspend = function() {
var params = new Sensor_Suspend_Params();
var params_ = new Sensor_Suspend_Params();
var builder = new codec.MessageV0Builder(
kSensor_Suspend_Name,
codec.align(Sensor_Suspend_Params.encodedSize));
builder.encodeStruct(Sensor_Suspend_Params, params);
builder.encodeStruct(Sensor_Suspend_Params, params_);
var message = builder.finish();
this.receiver_.accept(message);
};
@ -766,11 +770,11 @@
};
SensorProxy.prototype.resume = function() {
var params = new Sensor_Resume_Params();
var params_ = new Sensor_Resume_Params();
var builder = new codec.MessageV0Builder(
kSensor_Resume_Name,
codec.align(Sensor_Resume_Params.encodedSize));
builder.encodeStruct(Sensor_Resume_Params, params);
builder.encodeStruct(Sensor_Resume_Params, params_);
var message = builder.finish();
this.receiver_.accept(message);
};
@ -780,12 +784,12 @@
};
SensorProxy.prototype.configureReadingChangeNotifications = function(enabled) {
var params = new Sensor_ConfigureReadingChangeNotifications_Params();
params.enabled = enabled;
var params_ = new Sensor_ConfigureReadingChangeNotifications_Params();
params_.enabled = enabled;
var builder = new codec.MessageV0Builder(
kSensor_ConfigureReadingChangeNotifications_Name,
codec.align(Sensor_ConfigureReadingChangeNotifications_Params.encodedSize));
builder.encodeStruct(Sensor_ConfigureReadingChangeNotifications_Params, params);
builder.encodeStruct(Sensor_ConfigureReadingChangeNotifications_Params, params_);
var message = builder.finish();
this.receiver_.accept(message);
};
@ -967,11 +971,11 @@
};
SensorClientProxy.prototype.raiseError = function() {
var params = new SensorClient_RaiseError_Params();
var params_ = new SensorClient_RaiseError_Params();
var builder = new codec.MessageV0Builder(
kSensorClient_RaiseError_Name,
codec.align(SensorClient_RaiseError_Params.encodedSize));
builder.encodeStruct(SensorClient_RaiseError_Params, params);
builder.encodeStruct(SensorClient_RaiseError_Params, params_);
var message = builder.finish();
this.receiver_.accept(message);
};
@ -981,11 +985,11 @@
};
SensorClientProxy.prototype.sensorReadingChanged = function() {
var params = new SensorClient_SensorReadingChanged_Params();
var params_ = new SensorClient_SensorReadingChanged_Params();
var builder = new codec.MessageV0Builder(
kSensorClient_SensorReadingChanged_Name,
codec.align(SensorClient_SensorReadingChanged_Params.encodedSize));
builder.encodeStruct(SensorClient_SensorReadingChanged_Params, params);
builder.encodeStruct(SensorClient_SensorReadingChanged_Params, params_);
var message = builder.finish();
this.receiver_.accept(message);
};
@ -1067,4 +1071,4 @@
exports.SensorClient = SensorClient;
exports.SensorClientPtr = SensorClientPtr;
exports.SensorClientAssociatedPtr = SensorClientAssociatedPtr;
})();
})();

View file

@ -1256,6 +1256,48 @@ IdlInterface.prototype.is_global = function()
});
};
/**
* Value of the LegacyNamespace extended attribute, if any.
*
* https://heycam.github.io/webidl/#LegacyNamespace
*/
IdlInterface.prototype.get_legacy_namespace = function()
{
var legacyNamespace = this.extAttrs.find(function(attribute) {
return attribute.name === "LegacyNamespace";
});
return legacyNamespace ? legacyNamespace.rhs.value : undefined;
};
IdlInterface.prototype.get_interface_object_owner = function()
{
var legacyNamespace = this.get_legacy_namespace();
return legacyNamespace ? self[legacyNamespace] : self;
};
IdlInterface.prototype.assert_interface_object_exists = function()
{
var owner = this.get_legacy_namespace() || "self";
assert_own_property(self[owner], this.name, owner + " does not have own property " + format_value(this.name));
};
IdlInterface.prototype.get_interface_object = function() {
if (this.has_extended_attribute("NoInterfaceObject")) {
throw new IdlHarnessError(this.name + " has no interface object due to NoInterfaceObject");
}
return this.get_interface_object_owner()[this.name];
};
IdlInterface.prototype.get_qualified_name = function() {
// https://heycam.github.io/webidl/#qualified-name
var legacyNamespace = this.get_legacy_namespace();
if (legacyNamespace) {
return legacyNamespace + "." + this.name;
}
return this.name;
};
IdlInterface.prototype.has_to_json_regular_operation = function() {
return this.members.some(function(m) {
return m.is_to_json_regular_operation();
@ -1436,9 +1478,8 @@ IdlInterface.prototype.test_self = function()
// TODO: Should we test here that the property is actually writable
// etc., or trust getOwnPropertyDescriptor?
assert_own_property(self, this.name,
"self does not have own property " + format_value(this.name));
var desc = Object.getOwnPropertyDescriptor(self, this.name);
this.assert_interface_object_exists();
var desc = Object.getOwnPropertyDescriptor(this.get_interface_object_owner(), this.name);
assert_false("get" in desc, "self's property " + format_value(this.name) + " should not have a getter");
assert_false("set" in desc, "self's property " + format_value(this.name) + " should not have a setter");
assert_true(desc.writable, "self's property " + format_value(this.name) + " should be writable");
@ -1448,7 +1489,7 @@ IdlInterface.prototype.test_self = function()
if (this.is_callback()) {
// "The internal [[Prototype]] property of an interface object for
// a callback interface must be the Function.prototype object."
assert_equals(Object.getPrototypeOf(self[this.name]), Function.prototype,
assert_equals(Object.getPrototypeOf(this.get_interface_object()), Function.prototype,
"prototype of self's property " + format_value(this.name) + " is not Object.prototype");
return;
@ -1478,24 +1519,19 @@ IdlInterface.prototype.test_self = function()
// ES6 (rev 30) 19.1.3.6:
// "Else, if O has a [[Call]] internal method, then let builtinTag be
// "Function"."
assert_class_string(self[this.name], "Function", "class string of " + this.name);
assert_class_string(this.get_interface_object(), "Function", "class string of " + this.name);
// "The [[Prototype]] internal property of an interface object for a
// non-callback interface is determined as follows:"
var prototype = Object.getPrototypeOf(self[this.name]);
var prototype = Object.getPrototypeOf(this.get_interface_object());
if (this.base) {
// "* If the interface inherits from some other interface, the
// value of [[Prototype]] is the interface object for that other
// interface."
var has_interface_object =
!this.array
.members[this.base]
.has_extended_attribute("NoInterfaceObject");
if (has_interface_object) {
assert_own_property(self, this.base,
'should inherit from ' + this.base +
', but self has no such property');
assert_equals(prototype, self[this.base],
var inherited_interface = this.array.members[this.base];
if (!inherited_interface.has_extended_attribute("NoInterfaceObject")) {
inherited_interface.assert_interface_object_exists();
assert_equals(prototype, inherited_interface.get_interface_object(),
'prototype of ' + this.name + ' is not ' +
this.base);
}
@ -1513,12 +1549,13 @@ IdlInterface.prototype.test_self = function()
//
// "If I was not declared with a [Constructor] extended attribute,
// then throw a TypeError."
var interface_object = this.get_interface_object();
assert_throws(new TypeError(), function() {
self[this.name]();
}.bind(this), "interface object didn't throw TypeError when called as a function");
interface_object();
}, "interface object didn't throw TypeError when called as a function");
assert_throws(new TypeError(), function() {
new self[this.name]();
}.bind(this), "interface object didn't throw TypeError when called as a constructor");
new interface_object();
}, "interface object didn't throw TypeError when called as a constructor");
}
}.bind(this), this.name + " interface: existence and properties of interface object");
@ -1527,15 +1564,14 @@ IdlInterface.prototype.test_self = function()
// This function tests WebIDL as of 2014-10-25.
// https://heycam.github.io/webidl/#es-interface-call
assert_own_property(self, this.name,
"self does not have own property " + format_value(this.name));
this.assert_interface_object_exists();
// "Interface objects for non-callback interfaces MUST have a
// property named “length” with attributes { [[Writable]]: false,
// [[Enumerable]]: false, [[Configurable]]: true } whose value is
// a Number."
assert_own_property(self[this.name], "length");
var desc = Object.getOwnPropertyDescriptor(self[this.name], "length");
assert_own_property(this.get_interface_object(), "length");
var desc = Object.getOwnPropertyDescriptor(this.get_interface_object(), "length");
assert_false("get" in desc, this.name + ".length should not have a getter");
assert_false("set" in desc, this.name + ".length should not have a setter");
assert_false(desc.writable, this.name + ".length should not be writable");
@ -1545,7 +1581,7 @@ IdlInterface.prototype.test_self = function()
var constructors = this.extAttrs
.filter(function(attr) { return attr.name == "Constructor"; });
var expected_length = minOverloadLength(constructors);
assert_equals(self[this.name].length, expected_length, "wrong value for " + this.name + ".length");
assert_equals(this.get_interface_object().length, expected_length, "wrong value for " + this.name + ".length");
}.bind(this), this.name + " interface object length");
}
@ -1554,22 +1590,21 @@ IdlInterface.prototype.test_self = function()
// This function tests WebIDL as of 2015-11-17.
// https://heycam.github.io/webidl/#interface-object
assert_own_property(self, this.name,
"self does not have own property " + format_value(this.name));
this.assert_interface_object_exists();
// "All interface objects must have a property named “name” with
// attributes { [[Writable]]: false, [[Enumerable]]: false,
// [[Configurable]]: true } whose value is the identifier of the
// corresponding interface."
assert_own_property(self[this.name], "name");
var desc = Object.getOwnPropertyDescriptor(self[this.name], "name");
assert_own_property(this.get_interface_object(), "name");
var desc = Object.getOwnPropertyDescriptor(this.get_interface_object(), "name");
assert_false("get" in desc, this.name + ".name should not have a getter");
assert_false("set" in desc, this.name + ".name should not have a setter");
assert_false(desc.writable, this.name + ".name should not be writable");
assert_false(desc.enumerable, this.name + ".name should not be enumerable");
assert_true(desc.configurable, this.name + ".name should be configurable");
assert_equals(self[this.name].name, this.name, "wrong value for " + this.name + ".name");
assert_equals(this.get_interface_object().name, this.name, "wrong value for " + this.name + ".name");
}.bind(this), this.name + " interface object name");
}
@ -1608,9 +1643,9 @@ IdlInterface.prototype.test_self = function()
if (exposed_in(exposure_set(this, this.exposureSet)) && 'document' in self) {
for (alias of aliases) {
assert_true(alias in self, alias + " should exist");
assert_equals(self[alias], self[this.name], "self." + alias + " should be the same value as self." + this.name);
assert_equals(self[alias], this.get_interface_object(), "self." + alias + " should be the same value as self." + this.get_qualified_name());
var desc = Object.getOwnPropertyDescriptor(self, alias);
assert_equals(desc.value, self[this.name], "wrong value in " + alias + " property descriptor");
assert_equals(desc.value, this.get_interface_object(), "wrong value in " + alias + " property descriptor");
assert_true(desc.writable, alias + " should be writable");
assert_false(desc.enumerable, alias + " should not be enumerable");
assert_true(desc.configurable, alias + " should be configurable");
@ -1636,11 +1671,10 @@ IdlInterface.prototype.test_self = function()
return;
}
assert_own_property(self, this.name,
"self does not have own property " + format_value(this.name));
this.assert_interface_object_exists();
if (this.is_callback()) {
assert_false("prototype" in self[this.name],
assert_false("prototype" in this.get_interface_object(),
this.name + ' should not have a "prototype" property');
return;
}
@ -1652,9 +1686,9 @@ IdlInterface.prototype.test_self = function()
// properties that correspond to the regular attributes and regular
// operations defined on the interface, and is described in more detail
// in section 4.5.4 below."
assert_own_property(self[this.name], "prototype",
assert_own_property(this.get_interface_object(), "prototype",
'interface "' + this.name + '" does not have own property "prototype"');
var desc = Object.getOwnPropertyDescriptor(self[this.name], "prototype");
var desc = Object.getOwnPropertyDescriptor(this.get_interface_object(), "prototype");
assert_false("get" in desc, this.name + ".prototype should not have a getter");
assert_false("set" in desc, this.name + ".prototype should not have a setter");
assert_false(desc.writable, this.name + ".prototype should not be writable");
@ -1687,38 +1721,39 @@ IdlInterface.prototype.test_self = function()
// object %ErrorPrototype%."
//
if (this.name === "Window") {
assert_class_string(Object.getPrototypeOf(self[this.name].prototype),
assert_class_string(Object.getPrototypeOf(this.get_interface_object().prototype),
'WindowProperties',
'Class name for prototype of Window' +
'.prototype is not "WindowProperties"');
} else {
var inherit_interface, inherit_interface_has_interface_object;
var inherit_interface, inherit_interface_interface_object;
if (this.base) {
inherit_interface = this.base;
inherit_interface_has_interface_object =
!this.array
.members[inherit_interface]
.has_extended_attribute("NoInterfaceObject");
var parent = this.array.members[inherit_interface];
if (!parent.has_extended_attribute("NoInterfaceObject")) {
parent.assert_interface_object_exists();
inherit_interface_interface_object = parent.get_interface_object();
}
} else if (this.name === "DOMException") {
inherit_interface = 'Error';
inherit_interface_has_interface_object = true;
inherit_interface_interface_object = self.Error;
} else {
inherit_interface = 'Object';
inherit_interface_has_interface_object = true;
inherit_interface_interface_object = self.Object;
}
if (inherit_interface_has_interface_object) {
assert_own_property(self, inherit_interface,
'should inherit from ' + inherit_interface + ', but self has no such property');
assert_own_property(self[inherit_interface], 'prototype',
if (inherit_interface_interface_object) {
assert_not_equals(inherit_interface_interface_object, undefined,
'should inherit from ' + inherit_interface + ', but there is no such property');
assert_own_property(inherit_interface_interface_object, 'prototype',
'should inherit from ' + inherit_interface + ', but that object has no "prototype" property');
assert_equals(Object.getPrototypeOf(self[this.name].prototype),
self[inherit_interface].prototype,
assert_equals(Object.getPrototypeOf(this.get_interface_object().prototype),
inherit_interface_interface_object.prototype,
'prototype of ' + this.name + '.prototype is not ' + inherit_interface + '.prototype');
} else {
// We can't test that we get the correct object, because this is the
// only way to get our hands on it. We only test that its class
// string, at least, is correct.
assert_class_string(Object.getPrototypeOf(self[this.name].prototype),
assert_class_string(Object.getPrototypeOf(this.get_interface_object().prototype),
inherit_interface + 'Prototype',
'Class name for prototype of ' + this.name +
'.prototype is not "' + inherit_interface + 'Prototype"');
@ -1726,20 +1761,20 @@ IdlInterface.prototype.test_self = function()
}
// "The class string of an interface prototype object is the
// concatenation of the interfaces identifier and the string
// concatenation of the interfaces qualified identifier and the string
// “Prototype”."
// Skip these tests for now due to a specification issue about
// prototype name.
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=28244
// assert_class_string(self[this.name].prototype, this.name + "Prototype",
// assert_class_string(this.get_interface_object().prototype, this.get_qualified_name() + "Prototype",
// "class string of " + this.name + ".prototype");
// String() should end up calling {}.toString if nothing defines a
// stringifier.
if (!this.has_stringifier()) {
// assert_equals(String(self[this.name].prototype), "[object " + this.name + "Prototype]",
// assert_equals(String(this.get_interface_object().prototype), "[object " + this.get_qualified_name() + "Prototype]",
// "String(" + this.name + ".prototype)");
}
}.bind(this), this.name + " interface: existence and properties of interface prototype object");
@ -1751,7 +1786,7 @@ IdlInterface.prototype.test_self = function()
// prototype exotic object."
// https://heycam.github.io/webidl/#interface-prototype-object
if (this.is_global()) {
this.test_immutable_prototype("interface prototype object", self[this.name].prototype);
this.test_immutable_prototype("interface prototype object", this.get_interface_object().prototype);
}
subsetTestByKey(this.name, test, function()
@ -1760,16 +1795,15 @@ IdlInterface.prototype.test_self = function()
return;
}
assert_own_property(self, this.name,
"self does not have own property " + format_value(this.name));
this.assert_interface_object_exists();
if (this.is_callback()) {
assert_false("prototype" in self[this.name],
assert_false("prototype" in this.get_interface_object(),
this.name + ' should not have a "prototype" property');
return;
}
assert_own_property(self[this.name], "prototype",
assert_own_property(this.get_interface_object(), "prototype",
'interface "' + this.name + '" does not have own property "prototype"');
// "If the [NoInterfaceObject] extended attribute was not specified on
@ -1777,15 +1811,15 @@ IdlInterface.prototype.test_self = function()
// property named “constructor” with attributes { [[Writable]]: true,
// [[Enumerable]]: false, [[Configurable]]: true } whose value is a
// reference to the interface object for the interface."
assert_own_property(self[this.name].prototype, "constructor",
assert_own_property(this.get_interface_object().prototype, "constructor",
this.name + '.prototype does not have own property "constructor"');
var desc = Object.getOwnPropertyDescriptor(self[this.name].prototype, "constructor");
var desc = Object.getOwnPropertyDescriptor(this.get_interface_object().prototype, "constructor");
assert_false("get" in desc, this.name + ".prototype.constructor should not have a getter");
assert_false("set" in desc, this.name + ".prototype.constructor should not have a setter");
assert_true(desc.writable, this.name + ".prototype.constructor should be writable");
assert_false(desc.enumerable, this.name + ".prototype.constructor should not be enumerable");
assert_true(desc.configurable, this.name + ".prototype.constructor should be configurable");
assert_equals(self[this.name].prototype.constructor, self[this.name],
assert_equals(this.get_interface_object().prototype.constructor, this.get_interface_object(),
this.name + '.prototype.constructor is not the same object as ' + this.name);
}.bind(this), this.name + ' interface: existence and properties of interface prototype object\'s "constructor" property');
@ -1796,16 +1830,15 @@ IdlInterface.prototype.test_self = function()
return;
}
assert_own_property(self, this.name,
"self does not have own property " + format_value(this.name));
this.assert_interface_object_exists();
if (this.is_callback()) {
assert_false("prototype" in self[this.name],
assert_false("prototype" in this.get_interface_object(),
this.name + ' should not have a "prototype" property');
return;
}
assert_own_property(self[this.name], "prototype",
assert_own_property(this.get_interface_object(), "prototype",
'interface "' + this.name + '" does not have own property "prototype"');
// If the interface has any member declared with the [Unscopable] extended
@ -1814,7 +1847,7 @@ IdlInterface.prototype.test_self = function()
// { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true },
// and whose value is an object created as follows...
var unscopables = this.get_unscopables().map(m => m.name);
var proto = self[this.name].prototype;
var proto = this.get_interface_object().prototype;
if (unscopables.length != 0) {
assert_own_property(
proto, Symbol.unscopables,
@ -1845,7 +1878,7 @@ IdlInterface.prototype.test_self = function()
this.name + '.prototype[Symbol.unscopables] has unexpected property "' + prop + '"');
}
} else {
assert_equals(Object.getOwnPropertyDescriptor(self[this.name].prototype, Symbol.unscopables),
assert_equals(Object.getOwnPropertyDescriptor(this.get_interface_object().prototype, Symbol.unscopables),
undefined,
this.name + '.prototype should not have @@unscopables');
}
@ -1962,21 +1995,20 @@ IdlInterface.prototype.test_member_const = function(member)
subsetTestByKey(this.name, test, function()
{
assert_own_property(self, this.name,
"self does not have own property " + format_value(this.name));
this.assert_interface_object_exists();
// "For each constant defined on an interface A, there must be
// a corresponding property on the interface object, if it
// exists."
assert_own_property(self[this.name], member.name);
assert_own_property(this.get_interface_object(), member.name);
// "The value of the property is that which is obtained by
// converting the constants IDL value to an ECMAScript
// value."
assert_equals(self[this.name][member.name], constValue(member.value),
assert_equals(this.get_interface_object()[member.name], constValue(member.value),
"property has wrong value");
// "The property has attributes { [[Writable]]: false,
// [[Enumerable]]: true, [[Configurable]]: false }."
var desc = Object.getOwnPropertyDescriptor(self[this.name], member.name);
var desc = Object.getOwnPropertyDescriptor(this.get_interface_object(), member.name);
assert_false("get" in desc, "property should not have a getter");
assert_false("set" in desc, "property should not have a setter");
assert_false(desc.writable, "property should not be writable");
@ -1988,22 +2020,21 @@ IdlInterface.prototype.test_member_const = function(member)
// exist on the interface prototype object."
subsetTestByKey(this.name, test, function()
{
assert_own_property(self, this.name,
"self does not have own property " + format_value(this.name));
this.assert_interface_object_exists();
if (this.is_callback()) {
assert_false("prototype" in self[this.name],
assert_false("prototype" in this.get_interface_object(),
this.name + ' should not have a "prototype" property');
return;
}
assert_own_property(self[this.name], "prototype",
assert_own_property(this.get_interface_object(), "prototype",
'interface "' + this.name + '" does not have own property "prototype"');
assert_own_property(self[this.name].prototype, member.name);
assert_equals(self[this.name].prototype[member.name], constValue(member.value),
assert_own_property(this.get_interface_object().prototype, member.name);
assert_equals(this.get_interface_object().prototype[member.name], constValue(member.value),
"property has wrong value");
var desc = Object.getOwnPropertyDescriptor(self[this.name], member.name);
var desc = Object.getOwnPropertyDescriptor(this.get_interface_object(), member.name);
assert_false("get" in desc, "property should not have a getter");
assert_false("set" in desc, "property should not have a setter");
assert_false(desc.writable, "property should not be writable");
@ -2026,13 +2057,12 @@ IdlInterface.prototype.test_member_attribute = function(member)
return;
}
assert_own_property(self, this.name,
"self does not have own property " + format_value(this.name));
assert_own_property(self[this.name], "prototype",
this.assert_interface_object_exists();
assert_own_property(this.get_interface_object(), "prototype",
'interface "' + this.name + '" does not have own property "prototype"');
if (member["static"]) {
assert_own_property(self[this.name], member.name,
assert_own_property(this.get_interface_object(), member.name,
"The interface object must have a property " +
format_value(member.name));
a_test.done();
@ -2045,7 +2075,7 @@ IdlInterface.prototype.test_member_attribute = function(member)
assert_own_property(self, member.name,
"The global object must have a property " +
format_value(member.name));
assert_false(member.name in self[this.name].prototype,
assert_false(member.name in this.get_interface_object().prototype,
"The prototype object should not have a property " +
format_value(member.name));
@ -2073,34 +2103,34 @@ IdlInterface.prototype.test_member_attribute = function(member)
// since it will call done() on a_test.
this.do_interface_attribute_asserts(self, member, a_test);
} else {
assert_true(member.name in self[this.name].prototype,
assert_true(member.name in this.get_interface_object().prototype,
"The prototype object must have a property " +
format_value(member.name));
if (!member.has_extended_attribute("LenientThis")) {
if (member.idlType.generic !== "Promise") {
assert_throws(new TypeError(), function() {
self[this.name].prototype[member.name];
this.get_interface_object().prototype[member.name];
}.bind(this), "getting property on prototype object must throw TypeError");
// do_interface_attribute_asserts must be the last thing we
// do, since it will call done() on a_test.
this.do_interface_attribute_asserts(self[this.name].prototype, member, a_test);
this.do_interface_attribute_asserts(this.get_interface_object().prototype, member, a_test);
} else {
promise_rejects(a_test, new TypeError(),
self[this.name].prototype[member.name])
this.get_interface_object().prototype[member.name])
.then(function() {
// do_interface_attribute_asserts must be the last
// thing we do, since it will call done() on a_test.
this.do_interface_attribute_asserts(self[this.name].prototype,
this.do_interface_attribute_asserts(this.get_interface_object().prototype,
member, a_test);
}.bind(this));
}
} else {
assert_equals(self[this.name].prototype[member.name], undefined,
assert_equals(this.get_interface_object().prototype[member.name], undefined,
"getting property on prototype object must return undefined");
// do_interface_attribute_asserts must be the last thing we do,
// since it will call done() on a_test.
this.do_interface_attribute_asserts(self[this.name].prototype, member, a_test);
this.do_interface_attribute_asserts(this.get_interface_object().prototype, member, a_test);
}
}
}.bind(this));
@ -2125,17 +2155,16 @@ IdlInterface.prototype.test_member_operation = function(member)
return;
}
assert_own_property(self, this.name,
"self does not have own property " + format_value(this.name));
this.assert_interface_object_exists();
if (this.is_callback()) {
assert_false("prototype" in self[this.name],
assert_false("prototype" in this.get_interface_object(),
this.name + ' should not have a "prototype" property');
a_test.done();
return;
}
assert_own_property(self[this.name], "prototype",
assert_own_property(this.get_interface_object(), "prototype",
'interface "' + this.name + '" does not have own property "prototype"');
// "For each unique identifier of an exposed operation defined on the
@ -2150,9 +2179,9 @@ IdlInterface.prototype.test_member_operation = function(member)
// "* If the operation is static, then the property exists on the
// interface object."
if (member["static"]) {
assert_own_property(self[this.name], member.name,
assert_own_property(this.get_interface_object(), member.name,
"interface object missing static operation");
memberHolderObject = self[this.name];
memberHolderObject = this.get_interface_object();
// "* Otherwise, [...] if the interface was declared with the [Global]
// extended attribute, then the property exists
// on every object that implements the interface."
@ -2163,9 +2192,9 @@ IdlInterface.prototype.test_member_operation = function(member)
// "* Otherwise, the property exists solely on the interfaces
// interface prototype object."
} else {
assert_own_property(self[this.name].prototype, member.name,
assert_own_property(this.get_interface_object().prototype, member.name,
"interface prototype object missing non-static operation");
memberHolderObject = self[this.name].prototype;
memberHolderObject = this.get_interface_object().prototype;
}
this.do_member_unscopable_asserts(member);
this.do_member_operation_asserts(memberHolderObject, member, a_test);
@ -2180,7 +2209,7 @@ IdlInterface.prototype.do_member_unscopable_asserts = function(member)
return;
}
var unscopables = self[this.name].prototype[Symbol.unscopables];
var unscopables = this.get_interface_object().prototype[Symbol.unscopables];
var prop = member.name;
var propDesc = Object.getOwnPropertyDescriptor(unscopables, prop);
assert_equals(typeof propDesc, "object",
@ -2308,27 +2337,26 @@ IdlInterface.prototype.test_to_json_operation = function(memberHolderObject, mem
IdlInterface.prototype.test_member_iterable = function(member)
{
var interfaceName = this.name;
var isPairIterator = member.idlType.length === 2;
subsetTestByKey(this.name, test, function()
{
var descriptor = Object.getOwnPropertyDescriptor(self[interfaceName].prototype, Symbol.iterator);
var descriptor = Object.getOwnPropertyDescriptor(this.get_interface_object().prototype, Symbol.iterator);
assert_true(descriptor.writable, "property should be writable");
assert_true(descriptor.configurable, "property should be configurable");
assert_false(descriptor.enumerable, "property should not be enumerable");
assert_equals(self[interfaceName].prototype[Symbol.iterator].name, isPairIterator ? "entries" : "values", "@@iterator function does not have the right name");
}, "Testing Symbol.iterator property of iterable interface " + interfaceName);
assert_equals(this.get_interface_object().prototype[Symbol.iterator].name, isPairIterator ? "entries" : "values", "@@iterator function does not have the right name");
}.bind(this), "Testing Symbol.iterator property of iterable interface " + this.name);
if (isPairIterator) {
subsetTestByKey(this.name, test, function() {
assert_equals(self[interfaceName].prototype[Symbol.iterator], self[interfaceName].prototype["entries"], "entries method is not the same as @@iterator");
}, "Testing pair iterable interface " + interfaceName);
assert_equals(this.get_interface_object().prototype[Symbol.iterator], this.get_interface_object().prototype["entries"], "entries method is not the same as @@iterator");
}.bind(this), "Testing pair iterable interface " + this.name);
} else {
subsetTestByKey(this.name, test, function() {
["entries", "keys", "values", "forEach", Symbol.Iterator].forEach(function(property) {
assert_equals(self[interfaceName].prototype[property], Array.prototype[property], property + " function is not the same as Array one");
});
}, "Testing value iterable interface " + interfaceName);
assert_equals(this.get_interface_object().prototype[property], Array.prototype[property], property + " function is not the same as Array one");
}.bind(this));
}.bind(this), "Testing value iterable interface " + this.name);
}
};
@ -2340,21 +2368,20 @@ IdlInterface.prototype.test_member_stringifier = function(member)
return;
}
assert_own_property(self, this.name,
"self does not have own property " + format_value(this.name));
this.assert_interface_object_exists();
if (this.is_callback()) {
assert_false("prototype" in self[this.name],
assert_false("prototype" in this.get_interface_object(),
this.name + ' should not have a "prototype" property');
return;
}
assert_own_property(self[this.name], "prototype",
assert_own_property(this.get_interface_object(), "prototype",
'interface "' + this.name + '" does not have own property "prototype"');
// ". . . the property exists on the interface prototype object."
var interfacePrototypeObject = self[this.name].prototype;
assert_own_property(self[this.name].prototype, "toString",
var interfacePrototypeObject = this.get_interface_object().prototype;
assert_own_property(interfacePrototypeObject, "toString",
"interface prototype object missing non-static operation");
var stringifierUnforgeable = member.isUnforgeable;
@ -2380,7 +2407,7 @@ IdlInterface.prototype.test_member_stringifier = function(member)
// "Let O be the result of calling ToObject on the this value."
assert_throws(new TypeError(), function() {
self[this.name].prototype.toString.apply(null, []);
interfacePrototypeObject.toString.apply(null, []);
}, "calling stringifier with this = null didn't throw TypeError");
// "If O is not an object that implements the interface on which the
@ -2389,7 +2416,7 @@ IdlInterface.prototype.test_member_stringifier = function(member)
// TODO: Test a platform object that implements some other
// interface. (Have to be sure to get inheritance right.)
assert_throws(new TypeError(), function() {
self[this.name].prototype.toString.apply({}, []);
interfacePrototypeObject.toString.apply({}, []);
}, "calling stringifier with this = {} didn't throw TypeError");
}.bind(this), this.name + " interface: stringifier");
};
@ -2419,10 +2446,10 @@ IdlInterface.prototype.test_members = function()
if (!exposed_in(exposure_set(member, this.exposureSet))) {
subsetTestByKey(this.name, test, function() {
// It's not exposed, so we shouldn't find it anywhere.
assert_false(member.name in self[this.name],
assert_false(member.name in this.get_interface_object(),
"The interface object must not have a property " +
format_value(member.name));
assert_false(member.name in self[this.name].prototype,
assert_false(member.name in this.get_interface_object().prototype,
"The prototype object must not have a property " +
format_value(member.name));
}.bind(this), this.name + " interface: member " + member.name);
@ -2538,9 +2565,8 @@ IdlInterface.prototype.test_primary_interface_of = function(desc, obj, exception
{
assert_equals(exception, null, "Unexpected exception when evaluating object");
assert_equals(typeof obj, expected_typeof, "wrong typeof object");
assert_own_property(self, this.name,
"self does not have own property " + format_value(this.name));
assert_own_property(self[this.name], "prototype",
this.assert_interface_object_exists();
assert_own_property(this.get_interface_object(), "prototype",
'interface "' + this.name + '" does not have own property "prototype"');
// "The value of the internal [[Prototype]] property of the
@ -2548,22 +2574,22 @@ IdlInterface.prototype.test_primary_interface_of = function(desc, obj, exception
// interface from the platform objects associated global
// environment."
assert_equals(Object.getPrototypeOf(obj),
self[this.name].prototype,
this.get_interface_object().prototype,
desc + "'s prototype is not " + this.name + ".prototype");
}.bind(this), this.name + " must be primary interface of " + desc);
}
// "The class string of a platform object that implements one or more
// interfaces must be the identifier of the primary interface of the
// interfaces must be the qualified name of the primary interface of the
// platform object."
subsetTestByKey(this.name, test, function()
{
assert_equals(exception, null, "Unexpected exception when evaluating object");
assert_equals(typeof obj, expected_typeof, "wrong typeof object");
assert_class_string(obj, this.name, "class string of " + desc);
assert_class_string(obj, this.get_qualified_name(), "class string of " + desc);
if (!this.has_stringifier())
{
assert_equals(String(obj), "[object " + this.name + "]", "String(" + desc + ")");
assert_equals(String(obj), "[object " + this.get_qualified_name() + "]", "String(" + desc + ")");
}
}.bind(this), "Stringification of " + desc);
};

View file

@ -0,0 +1,22 @@
<!DOCTYPE HTML>
<title>IdlInterface.prototype.get_interface_object()</title>
<div id="log"></div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../../../idl-helper.js"></script>
<script>
"use strict";
test(function() {
window.A = {};
var i = interfaceFrom('interface A { };');
assert_equals(i.get_interface_object(), window.A);
}, 'Interface does not have LegacyNamespace.');
test(function() {
window.Foo = { A: {} };
var i = interfaceFrom('[LegacyNamespace=Foo] interface A { }; namespace Foo { };');
assert_equals(i.get_interface_object(), window.Foo.A);
}, 'Interface has LegacyNamespace');
</script>

View file

@ -0,0 +1,21 @@
<!DOCTYPE HTML>
<title>IdlInterface.prototype.get_interface_object_owner()</title>
<div id="log"></div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../../../idl-helper.js"></script>
<script>
"use strict";
test(function() {
var i = interfaceFrom('interface A { };');
assert_equals(i.get_interface_object_owner(), window);
}, 'Interface does not have LegacyNamespace.');
test(function() {
window.Foo = {};
var i = interfaceFrom('[LegacyNamespace=Foo] interface A { }; namespace Foo { };');
assert_equals(i.get_interface_object_owner(), window.Foo);
}, 'Interface has LegacyNamespace');
</script>

View file

@ -0,0 +1,20 @@
<!DOCTYPE HTML>
<title>IdlInterface.prototype.get_legacy_namespace()</title>
<div id="log"></div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../../../idl-helper.js"></script>
<script>
"use strict";
test(function() {
var i = interfaceFrom('interface A { };');
assert_equals(i.get_legacy_namespace(), undefined);
}, 'Interface does not have LegacyNamespace.');
test(function() {
var i = interfaceFrom('[LegacyNamespace=Foo] interface A { }; namespace Foo { };');
assert_equals(i.get_legacy_namespace(), "Foo");
}, 'Interface has LegacyNamespace');
</script>

View file

@ -0,0 +1,20 @@
<!DOCTYPE HTML>
<title>IdlInterface.prototype.get_qualified_name()</title>
<div id="log"></div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../../../idl-helper.js"></script>
<script>
"use strict";
test(function() {
var i = interfaceFrom('interface A { };');
assert_equals(i.get_qualified_name(), "A");
}, 'Interface does not have LegacyNamespace.');
test(function() {
var i = interfaceFrom('[LegacyNamespace=Foo] interface A { }; namespace Foo { };');
assert_equals(i.get_qualified_name(), "Foo.A");
}, 'Interface has LegacyNamespace');
</script>

View file

@ -1,7 +1,20 @@
def main(request, response):
service_worker_header = request.headers.get('service-worker')
if service_worker_header == 'script':
body = '// Request has `Service-Worker: script` header'
return 200, [('Content-Type', 'application/javascript')], body
else:
if 'header' in request.GET and service_worker_header != 'script':
return 400, [('Content-Type', 'text/plain')], 'Bad Request'
if 'no-header' in request.GET and service_worker_header == 'script':
return 400, [('Content-Type', 'text/plain')], 'Bad Request'
# no-cache itself to ensure the user agent finds a new version for each
# update.
headers = [('Cache-Control', 'no-cache, must-revalidate'),
('Pragma', 'no-cache'),
('Content-Type', 'application/javascript')]
body = '/* This is a service worker script */\n'
if 'import' in request.GET:
body += "importScripts('%s');" % request.GET['import']
return 200, headers, body

View file

@ -5,14 +5,19 @@
<script src="resources/test-helpers.sub.js"></script>
<script>
promise_test(t => {
const script = 'resources/service-worker-header.py';
promise_test(async t => {
const script = 'resources/service-worker-header.py'
+ '?header&import=service-worker-header.py?no-header';
const scope = 'resources/service-worker-header';
return service_worker_unregister_and_register(t, script, scope)
.then(registration => {
assert_true(registration instanceof ServiceWorkerRegistration);
return registration.unregister();
});
}, 'A request to fetch service worker script should have Service-Worker header');
const expected_url = normalizeURL(script);
const registration =
await service_worker_unregister_and_register(t, script, scope);
t.add_cleanup(() => registration.unregister());
assert_true(registration instanceof ServiceWorkerRegistration);
await wait_for_state(t, registration.installing, 'activated');
await registration.update();
}, 'A request to fetch service worker main script should have Service-Worker '
+ 'header and imported scripts should not have one');
</script>

View file

@ -14,7 +14,7 @@ test_infrastructure() {
else
ARGS=$1
fi
./wpt run --yes --manifest ~/meta/MANIFEST.json --metadata infrastructure/metadata/ --install-fonts $ARGS $PRODUCT infrastructure/
./wpt run --log-tbpl - --yes --manifest ~/meta/MANIFEST.json --metadata infrastructure/metadata/ --install-fonts $ARGS $PRODUCT infrastructure/
}
main() {

View file

@ -458,10 +458,15 @@ def check_parsed(repo_root, path, f):
if source_file.type == "visual" and not source_file.name_is_visual:
errors.append(("CONTENT-VISUAL", "Visual test whose filename doesn't end in '-visual'", path, None))
about_blank_parts = urlsplit("about:blank")
for reftest_node in source_file.reftest_nodes:
href = reftest_node.attrib.get("href", "").strip(space_chars)
parts = urlsplit(href)
if (parts.scheme or parts.netloc) and parts != urlsplit("about:blank"):
if parts == about_blank_parts:
continue
if (parts.scheme or parts.netloc):
errors.append(("ABSOLUTE-URL-REF",
"Reference test with a reference file specified via an absolute URL: '%s'" % href, path, None))
continue

View file

@ -444,6 +444,7 @@ product_setup = {
def setup_wptrunner(venv, prompt=True, install_browser=False, **kwargs):
from wptrunner import wptrunner, wptcommandline
import mozlog
global logger
@ -453,7 +454,12 @@ def setup_wptrunner(venv, prompt=True, install_browser=False, **kwargs):
kwargs["product"] = product_parts[0]
sub_product = product_parts[1:]
wptrunner.setup_logging(kwargs, {"mach": sys.stdout})
# Use the grouped formatter by default where mozlog 3.9+ is installed
if hasattr(mozlog.formatters, "GroupingFormatter"):
default_formatter = "grouped"
else:
default_formatter = "mach"
wptrunner.setup_logging(kwargs, {default_formatter: sys.stdout})
logger = wptrunner.logger
check_environ(kwargs["product"])

View file

@ -217,16 +217,6 @@ class FennecBrowser(FirefoxBrowser):
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))
@ -243,6 +233,7 @@ class FennecBrowser(FirefoxBrowser):
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
self.runner.stop()
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))]:

View file

@ -502,6 +502,9 @@ def check_args(kwargs):
kwargs["certutil_binary"] = path
if kwargs['extra_prefs']:
# If a single pref is passed in as a string, make it a list
if type(kwargs['extra_prefs']) in (str, unicode):
kwargs['extra_prefs'] = [kwargs['extra_prefs']]
missing = any('=' not in prefarg for prefarg in kwargs['extra_prefs'])
if missing:
print >> sys.stderr, "Preferences via --setpref must be in key=value format"

View file

@ -4,10 +4,11 @@
<script src="support/helper.sub.js"></script>
<body>
<script>
// TrustedHTML assignments do not throw.
test(t => {
let p = createHTML_policy(window, 1);
let html = p.createHTML(INPUTS.HTML);
document.write(html);
assert_equals(document.body.innerText, RESULTS.HTML);
}, "document.write with html assigned via policy (successful URL transformation).");
assert_true(document.body.innerText.indexOf(RESULTS.HTML) !== -1);
}, "document.write with html assigned via policy (successful transformation).");
</script>

View file

@ -9,14 +9,6 @@
</head>
<body>
<script>
// TrustedURL assignments do not throw.
test(t => {
let p = createHTML_policy(window, 1);
let html = p.createHTML(INPUTS.HTML);
document.write(html);
assert_equals(document.body.innerText, RESULTS.HTML);
}, "document.write with html assigned via policy (successful URL transformation).");
// String assignments throw.
test(t => {
assert_throws(new TypeError(), _ => {

View file

@ -1,6 +1,6 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: script=resources/load_wasm.js
// META: script=../resources/load_wasm.js
'use strict';
@ -12,15 +12,22 @@ promise_test(async () => {
srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text())));
const idl_array = new IdlArray();
idl_array.add_idls(wasm);
idl_array.add_idls(wasm, {
// Note the prose requirements in the specification.
except: ['CompileError', 'LinkError', 'RuntimeError']
});
// https://github.com/web-platform-tests/wpt/issues/12850
idl_array.add_untested_idls('[Exposed=(Window,Worker)] interface ArrayBuffer {};');
// Ignored errors are surfaced in idlharness.js's test_object below.
try {
self.memory = new Memory({initial: 1024});
self.memory = new WebAssembly.Memory({initial: 1024});
} catch (e) { }
try {
self.mod = await createWasmModule();
self.instance = new Instance(self.mod);
self.instance = new WebAssembly.Instance(self.mod);
} catch (e) { }
idl_array.add_objects({

View file

@ -3,7 +3,7 @@
// found in the LICENSE file.
function createWasmModule() {
return fetch('incrementer.wasm')
return fetch('/wasm/incrementer.wasm')
.then(response => {
if (!response.ok) throw new Error(response.statusText);
return response.arrayBuffer();

View file

@ -2104,7 +2104,7 @@ const filterListType = {
// 10deg = 0.1745rad.
testAnimationSamples(animation, idlName,
[{ time: 500, expected: 'hue-rotate(50.0873rad)' }]);
[{ time: 500, expected: 'hue-rotate(2869.79deg)' }]);
}, `${property}: hue-rotate function with different unit(deg -> rad)`);
test(t => {