Update web-platform-tests to revision 786fc058fd83cbf002be3a35100ab2a3b1f98d58

This commit is contained in:
WPT Sync Bot 2019-09-20 10:34:03 +00:00
parent 748fa72320
commit d38b1c8241
76 changed files with 1323 additions and 174 deletions

View file

@ -7,7 +7,7 @@
expected: FAIL
[Opening a blob URL in a new window immediately before revoking it works.]
expected: TIMEOUT
expected: FAIL
[Opening a blob URL in a noopener about:blank window immediately before revoking it works.]
expected: FAIL

View file

@ -203889,6 +203889,102 @@
{}
]
],
"svg/geometry/reftests/circle-001.svg": [
[
"svg/geometry/reftests/circle-001.svg",
[
[
"/svg/geometry/reftests/circle-ref.svg",
"=="
]
],
{}
]
],
"svg/geometry/reftests/circle-002.svg": [
[
"svg/geometry/reftests/circle-002.svg",
[
[
"/svg/geometry/reftests/circle-ref.svg",
"=="
]
],
{}
]
],
"svg/geometry/reftests/circle-003.svg": [
[
"svg/geometry/reftests/circle-003.svg",
[
[
"/svg/geometry/reftests/circle-ref.svg",
"=="
]
],
{}
]
],
"svg/geometry/reftests/circle-004.svg": [
[
"svg/geometry/reftests/circle-004.svg",
[
[
"/svg/geometry/reftests/circle-ref.svg",
"=="
]
],
{}
]
],
"svg/geometry/reftests/ellipse-001.svg": [
[
"svg/geometry/reftests/ellipse-001.svg",
[
[
"/svg/geometry/reftests/ellipse-ref.svg",
"=="
]
],
{}
]
],
"svg/geometry/reftests/ellipse-002.svg": [
[
"svg/geometry/reftests/ellipse-002.svg",
[
[
"/svg/geometry/reftests/ellipse-ref.svg",
"=="
]
],
{}
]
],
"svg/geometry/reftests/ellipse-003.svg": [
[
"svg/geometry/reftests/ellipse-003.svg",
[
[
"/svg/geometry/reftests/ellipse-ref.svg",
"=="
]
],
{}
]
],
"svg/geometry/reftests/ellipse-004.svg": [
[
"svg/geometry/reftests/ellipse-004.svg",
[
[
"/svg/geometry/reftests/ellipse-ref.svg",
"=="
]
],
{}
]
],
"svg/geometry/reftests/percentage-attribute.svg": [
[
"svg/geometry/reftests/percentage-attribute.svg",
@ -203913,6 +204009,54 @@
{}
]
],
"svg/geometry/reftests/rect-001.svg": [
[
"svg/geometry/reftests/rect-001.svg",
[
[
"/svg/geometry/reftests/rect-ref.svg",
"=="
]
],
{}
]
],
"svg/geometry/reftests/rect-002.svg": [
[
"svg/geometry/reftests/rect-002.svg",
[
[
"/svg/geometry/reftests/rect-ref.svg",
"=="
]
],
{}
]
],
"svg/geometry/reftests/rect-003.svg": [
[
"svg/geometry/reftests/rect-003.svg",
[
[
"/svg/geometry/reftests/rect-ref.svg",
"=="
]
],
{}
]
],
"svg/geometry/reftests/rect-004.svg": [
[
"svg/geometry/reftests/rect-004.svg",
[
[
"/svg/geometry/reftests/rect-ref.svg",
"=="
]
],
{}
]
],
"svg/linking/reftests/href-a-element-attr-change.html": [
[
"svg/linking/reftests/href-a-element-attr-change.html",
@ -259722,6 +259866,9 @@
"css/support/ruler-v-50px.png": [
[]
],
"css/support/shorthand-testcommon.js": [
[]
],
"css/support/square-purple.png": [
[]
],
@ -277341,6 +277488,12 @@
"resource-timing/resources/all_resource_types.htm": [
[]
],
"resource-timing/resources/blank-with-tao.html": [
[]
],
"resource-timing/resources/blank-with-tao.html.headers": [
[]
],
"resource-timing/resources/blank_page_green.htm": [
[]
],
@ -280200,9 +280353,18 @@
"svg/extensibility/foreignObject/will-change-in-transformed-foreign-object-ref.html": [
[]
],
"svg/geometry/reftests/circle-ref.svg": [
[]
],
"svg/geometry/reftests/ellipse-ref.svg": [
[]
],
"svg/geometry/reftests/percentage-ref.svg": [
[]
],
"svg/geometry/reftests/rect-ref.svg": [
[]
],
"svg/import/woffs/Blocky.woff": [
[]
],
@ -311891,6 +312053,12 @@
{}
]
],
"css/css-align/parsing/gap-shorthand.html": [
[
"css/css-align/parsing/gap-shorthand.html",
{}
]
],
"css/css-align/parsing/gap-valid.html": [
[
"css/css-align/parsing/gap-valid.html",
@ -311963,6 +312131,12 @@
{}
]
],
"css/css-align/parsing/place-content-shorthand.html": [
[
"css/css-align/parsing/place-content-shorthand.html",
{}
]
],
"css/css-align/parsing/place-content-valid.html": [
[
"css/css-align/parsing/place-content-valid.html",
@ -311981,6 +312155,12 @@
{}
]
],
"css/css-align/parsing/place-items-shorthand.html": [
[
"css/css-align/parsing/place-items-shorthand.html",
{}
]
],
"css/css-align/parsing/place-items-valid.html": [
[
"css/css-align/parsing/place-items-valid.html",
@ -311999,6 +312179,12 @@
{}
]
],
"css/css-align/parsing/place-self-shorthand.html": [
[
"css/css-align/parsing/place-self-shorthand.html",
{}
]
],
"css/css-align/parsing/place-self-valid.html": [
[
"css/css-align/parsing/place-self-valid.html",
@ -353218,7 +353404,9 @@
"html/semantics/embedded-content/media-elements/media_fragment_seek.html": [
[
"html/semantics/embedded-content/media-elements/media_fragment_seek.html",
{}
{
"timeout": "long"
}
]
],
"html/semantics/embedded-content/media-elements/mime-types/canPlayType.html": [
@ -393551,6 +393739,12 @@
{}
]
],
"resource-timing/crossorigin-sandwich-partial-TAO.sub.html": [
[
"resource-timing/crossorigin-sandwich-partial-TAO.sub.html",
{}
]
],
"resource-timing/document-domain-no-impact-loader.sub.html": [
[
"resource-timing/document-domain-no-impact-loader.sub.html",
@ -404449,6 +404643,12 @@
{}
]
],
"svg/painting/parsing/marker-shorthand.svg": [
[
"svg/painting/parsing/marker-shorthand.svg",
{}
]
],
"svg/painting/parsing/marker-start-computed.svg": [
[
"svg/painting/parsing/marker-start-computed.svg",
@ -410535,18 +410735,18 @@
{}
]
],
"web-nfc/NFCReader.https.html": [
[
"web-nfc/NFCReader.https.html",
{}
]
],
"web-nfc/NFCReader_options.https.html": [
[
"web-nfc/NFCReader_options.https.html",
{}
]
],
"web-nfc/NFCReader_scan.https.html": [
[
"web-nfc/NFCReader_scan.https.html",
{}
]
],
"web-nfc/NFCReadingEvent_constructor.https.html": [
[
"web-nfc/NFCReadingEvent_constructor.https.html",
@ -456216,7 +456416,7 @@
"support"
],
"common/security-features/resources/common.sub.js": [
"64d2b9ffb4e3b2231f3b90313c4376ba2f4d867a",
"12776b1a4b55dc76415ea63abc4a93dab2fedd2a",
"support"
],
"common/security-features/resources/common.sub.js.headers": [
@ -456340,7 +456540,7 @@
"support"
],
"common/security-features/tools/spec_validator.py": [
"dae5c6e35a3fe978571e9976c6aaaf1c5d3c1076",
"06a5acce23a41ad0157871bc2d5de26d307a1c53",
"support"
],
"common/security-features/tools/template/disclaimer.template": [
@ -539875,6 +540075,10 @@
"c2eae8f7aad23be0bda0dc423b62bd6cece1e1d0",
"testharness"
],
"css/css-align/parsing/gap-shorthand.html": [
"52397fb744b990c3b9227f4f7a68a9004223007e",
"testharness"
],
"css/css-align/parsing/gap-valid.html": [
"3104e3fbbdf31742bc7247180aef51f8e8b24c4c",
"testharness"
@ -539923,6 +540127,10 @@
"3fcd9a8dbed1b488ed16a40945fcb1e48c4fe6b8",
"testharness"
],
"css/css-align/parsing/place-content-shorthand.html": [
"a46c58a29b284e35c15a78d3c489038cadd94e20",
"testharness"
],
"css/css-align/parsing/place-content-valid.html": [
"a83aa4cec86db72adb691c8ad1bb061bb793267e",
"testharness"
@ -539935,6 +540143,10 @@
"9468d30e2e745ddc576b4bee18923d6943286222",
"testharness"
],
"css/css-align/parsing/place-items-shorthand.html": [
"991510b5b6b524ea8228ff75c87e722519166623",
"testharness"
],
"css/css-align/parsing/place-items-valid.html": [
"72179bf2db0dcc7b76c8e0bbe5fe42ee8d81f9f3",
"testharness"
@ -539947,6 +540159,10 @@
"8a7a2ab187f9a34593d46da69d5d29ff62a7d716",
"testharness"
],
"css/css-align/parsing/place-self-shorthand.html": [
"52afa92b40982096940041a7e7c632e0b6885226",
"testharness"
],
"css/css-align/parsing/place-self-valid.html": [
"36a8bd5026eab2870307c223028b499c02c92099",
"testharness"
@ -573848,7 +574064,7 @@
"testharness"
],
"css/css-scroll-anchoring/text-anchor-in-vertical-rl.html": [
"2a56298e982888fcf1745137b9e8868bae70a76a",
"0edf950936b2739aec9bded7c221d250e43c223a",
"testharness"
],
"css/css-scroll-anchoring/wrapped-text.html": [
@ -607247,6 +607463,10 @@
"84141028020b7e8cdf2412acbca3c799ba50a534",
"support"
],
"css/support/shorthand-testcommon.js": [
"1fd603c290c14d4672fc8f63f2d964da9867be78",
"support"
],
"css/support/square-purple.png": [
"0f522d78728417b0f74b694e2e47cd41c00359d1",
"support"
@ -617400,7 +617620,7 @@
"support"
],
"docs/writing-tests/test-templates.md": [
"22f8f78920cacf46eb772a179180f23f9d92ca7a",
"f34b1d8d3334302d05bc4599e70a00c5e17dcdd0",
"support"
],
"docs/writing-tests/testdriver-tutorial.md": [
@ -637312,7 +637532,7 @@
"testharness"
],
"html/semantics/embedded-content/media-elements/media_fragment_seek.html": [
"d6f6e6c30bf89cbb87c7fbab1529973aa69b03f6",
"2a0106ce166cef7f826efca55d447f0621048bc0",
"testharness"
],
"html/semantics/embedded-content/media-elements/mime-types/canPlayType.html": [
@ -643280,11 +643500,11 @@
"testharness"
],
"html/semantics/scripting-1/the-script-element/module/referrer-no-referrer.sub.html": [
"e640fe468988b33bd992a07a195b7902c4d65d7a",
"b8866f9511867469a5987b2f918a812d22f3b861",
"testharness"
],
"html/semantics/scripting-1/the-script-element/module/referrer-origin-when-cross-origin.sub.html": [
"1ca6b1dfda33e5a5dd7fa2b423979cbee8844a31",
"8351289029190f908c86ad507886ed393937ec45",
"testharness"
],
"html/semantics/scripting-1/the-script-element/module/referrer-origin.sub.html": [
@ -647620,7 +647840,7 @@
"support"
],
"interfaces/gamepad.idl": [
"c0dee67b4d3245cd4e17e827d512fa289c189c14",
"b7497c276f1610139ef14c1cc4d0c34c1f2c406b",
"support"
],
"interfaces/generic-sensor.idl": [
@ -647716,7 +647936,7 @@
"support"
],
"interfaces/mediasession.idl": [
"237cea53adf296d8e626e6828847df80c8cda41a",
"7a5a45c56c6c6ee4de947dceb2808bf15fba966a",
"support"
],
"interfaces/mediastream-recording.idl": [
@ -647952,7 +648172,7 @@
"support"
],
"interfaces/webrtc-stats.idl": [
"ab437ce0ee11eb83a6b74ab83fb3afcedf7675a2",
"c2dc1f7a0b0a482d226b881995414b558fbe2baf",
"support"
],
"interfaces/webrtc.idl": [
@ -649956,7 +650176,7 @@
"support"
],
"mathml/support/feature-detection.js": [
"6f1d033b5b9ce7d8c2a6f9bfff589189719b586f",
"1952d3b06c123955832d0f9d5e35031285703c73",
"support"
],
"mathml/support/layout-comparison.js": [
@ -673576,13 +673796,17 @@
"testharness"
],
"resource-timing/crossorigin-sandwich-TAO.sub.html": [
"c3085950bd68ac72e1079a04d52ac3e1e1c603fb",
"04c5e2c9970c9fa1f6d4427a5a30fab4045f8e9b",
"testharness"
],
"resource-timing/crossorigin-sandwich-no-TAO.sub.html": [
"c7e7e5948dc5cbb5fb331112ab2dc562d5e430ad",
"testharness"
],
"resource-timing/crossorigin-sandwich-partial-TAO.sub.html": [
"2b748e9097dacea75424412beae53fe2bf7a2bb7",
"testharness"
],
"resource-timing/document-domain-no-impact-loader.sub.html": [
"8a1c433a5c3a7b79d92b797ee1057c624d4a9866",
"testharness"
@ -673628,7 +673852,7 @@
"testharness"
],
"resource-timing/resource_TAO_cross_origin_redirect_chain.html": [
"522188279c3ab81ec27cd7e83f014ecf747b21a8",
"9089e8fbb00bb8c0e84d7ce7eac84c90b1ed3e04",
"testharness"
],
"resource-timing/resource_TAO_match_origin.htm": [
@ -673763,6 +673987,14 @@
"bc7101c219230376ffec008dce73bc42f06cbe3f",
"support"
],
"resource-timing/resources/blank-with-tao.html": [
"b8a1947b77e25ac6b0d100c75932e8c0a67d846f",
"support"
],
"resource-timing/resources/blank-with-tao.html.headers": [
"7296361df3d1c5755acdb825661dbd9a1807b64f",
"support"
],
"resource-timing/resources/blank_page_green.htm": [
"b8a1947b77e25ac6b0d100c75932e8c0a67d846f",
"support"
@ -673924,7 +674156,7 @@
"support"
],
"resource-timing/resources/multi_redirect.py": [
"39121ddbb45824240655eafd0ef6554334bcffd8",
"e70c90bb44827466cfd5a55960de47fe37038f2c",
"support"
],
"resource-timing/resources/navigate_back.html": [
@ -674084,7 +674316,7 @@
"support"
],
"resources/chromium/generic_sensor_mocks.js": [
"572c0deced61d04b113f025c3b8c23e4be544998",
"d4ba89e199113b2aea9f393f0d38461ea1d30631",
"support"
],
"resources/chromium/generic_sensor_mocks.js.headers": [
@ -674144,7 +674376,7 @@
"support"
],
"resources/chromium/sensor_provider.mojom.js": [
"d74ad97a281d90f0573924ed42af7c9f299fb30a",
"d82b15a304a2439f5206e5bc86b91c51fcf94bd8",
"support"
],
"resources/chromium/sms_mock.js": [
@ -674724,7 +674956,7 @@
"support"
],
"scroll-to-text-fragment/scroll-to-text-fragment.html": [
"3e3cfcbbb5bdf9f9e7715f7c3c300211bfb1ab92",
"85f07f38229404e45f0afbb413ea950241238ff4",
"testharness"
],
"secure-contexts/META.yml": [
@ -680684,7 +680916,7 @@
"testharness"
],
"svg/animations/syncbase-remove-add-while-running.html": [
"bebd537250151a254b2b672bc11ba28f80595790",
"5b3ae94488f0a83f61cf1b4af4f6c9dc613552dc",
"testharness"
],
"svg/coordinate-systems/abspos.html": [
@ -680939,6 +681171,46 @@
"aad0e4e2937064224de6a2313379fb43ffdf8322",
"testharness"
],
"svg/geometry/reftests/circle-001.svg": [
"2fbd70d5a63d12a93d843a80477101b3c50beb78",
"reftest"
],
"svg/geometry/reftests/circle-002.svg": [
"7f98f56ad0f70f73df86d9f8ed2e3325b1cc6df8",
"reftest"
],
"svg/geometry/reftests/circle-003.svg": [
"74c32fb33cb94cbb8637fc2504026409eaac605a",
"reftest"
],
"svg/geometry/reftests/circle-004.svg": [
"36c9e0096f0272d0762deb3305b07e2022fa66f7",
"reftest"
],
"svg/geometry/reftests/circle-ref.svg": [
"36ccde7fce5f82093b4930f314f3a2558a5518f9",
"support"
],
"svg/geometry/reftests/ellipse-001.svg": [
"e6d394de206f8831136dbe916d55166038ee94c2",
"reftest"
],
"svg/geometry/reftests/ellipse-002.svg": [
"081617288a1b782f36bb513329f7b988c78fac4c",
"reftest"
],
"svg/geometry/reftests/ellipse-003.svg": [
"6b81eadf1b7cf7b85406336b5bc7bcc576338dea",
"reftest"
],
"svg/geometry/reftests/ellipse-004.svg": [
"1c6b132cd669f770a72a2f957f0784d8d0b946da",
"reftest"
],
"svg/geometry/reftests/ellipse-ref.svg": [
"57e6f4d5e854cd1672f987d5f639bcb1e6186d5e",
"support"
],
"svg/geometry/reftests/percentage-attribute.svg": [
"44c386d517179621fbf763d0c82c6750ca8d0f63",
"reftest"
@ -680951,6 +681223,26 @@
"c2ca49341c5ec5d4d96d1541999893053146eecd",
"reftest"
],
"svg/geometry/reftests/rect-001.svg": [
"020e499dc297c093aeb8bfb27618da5b203bea41",
"reftest"
],
"svg/geometry/reftests/rect-002.svg": [
"e9b27db7e69984e494090744091da0b508550a62",
"reftest"
],
"svg/geometry/reftests/rect-003.svg": [
"d3d7c5abb406c1de8f6c2342da01fe06b1c058c0",
"reftest"
],
"svg/geometry/reftests/rect-004.svg": [
"926b2a8e0a93e53c32182428cc39ef668374495c",
"reftest"
],
"svg/geometry/reftests/rect-ref.svg": [
"ddfd51eed1f2403e2c6a964cee6a307c0d3838fb",
"support"
],
"svg/geometry/svg-baseval-in-display-none.html": [
"fa52d1b4c3f0918ee13127decf4b2e3d878bcf67",
"testharness"
@ -683543,6 +683835,10 @@
"119fd706b12189342a6ad9d9d94c512df57ccbdc",
"testharness"
],
"svg/painting/parsing/marker-shorthand.svg": [
"930a4e29402b7998cab922aaac7503f186fd752d",
"testharness"
],
"svg/painting/parsing/marker-start-computed.svg": [
"08ef87516fcfc0059a3b0ec79e25642273ea7d12",
"testharness"
@ -693392,7 +693688,7 @@
"support"
],
"web-animations/animation-model/animation-types/property-types.js": [
"80d3b8f77ff5589f2f4dc5ee69b4fa102786f85a",
"9f549c9a199e8078612932a7b666b85c0d7439ab",
"support"
],
"web-animations/animation-model/animation-types/visibility.html": [
@ -693855,14 +694151,14 @@
"1cc9ce160be46955a9b15485ee4c040605722961",
"testharness"
],
"web-nfc/NFCReader.https.html": [
"448f2c74f5ca307c6afcfffa28cd1f1c66b6bfe5",
"testharness"
],
"web-nfc/NFCReader_options.https.html": [
"8b38f558a0a8fb03afac573bd8f39820f37cc4fa",
"testharness"
],
"web-nfc/NFCReader_scan.https.html": [
"638d0c5a1d1b8d0e2e8e8422bd4b9e9488512e54",
"testharness"
],
"web-nfc/NFCReadingEvent_constructor.https.html": [
"20585176b7f89a129fad99f17d068b2deb828f68",
"testharness"

View file

@ -0,0 +1,13 @@
[gap-shorthand.html]
[e.style['gap'\] = "10px 20%" should set the longhand values]
expected: FAIL
[e.style['gap'\] = "normal calc(20% + 10px)" should set the longhand values]
expected: FAIL
[e.style['gap'\] = "normal" should set the longhand values]
expected: FAIL
[e.style['gap'\] = "10px normal" should set the longhand values]
expected: FAIL

View file

@ -0,0 +1,16 @@
[place-content-shorthand.html]
[e.style['place-content'\] = "space-around" should set the longhand values]
expected: FAIL
[e.style['place-content'\] = "first baseline" should set the longhand values]
expected: FAIL
[e.style['place-content'\] = "space-evenly unsafe end" should set the longhand values]
expected: FAIL
[e.style['place-content'\] = "normal" should set the longhand values]
expected: FAIL
[e.style['place-content'\] = "last baseline flex-start" should set the longhand values]
expected: FAIL

View file

@ -0,0 +1,13 @@
[place-items-shorthand.html]
[e.style['place-items'\] = "stretch right legacy" should set the longhand values]
expected: FAIL
[e.style['place-items'\] = "normal" should set the longhand values]
expected: FAIL
[e.style['place-items'\] = "last baseline flex-start" should set the longhand values]
expected: FAIL
[e.style['place-items'\] = "first baseline" should set the longhand values]
expected: FAIL

View file

@ -0,0 +1,13 @@
[place-self-shorthand.html]
[e.style['place-self'\] = "normal" should set the longhand values]
expected: FAIL
[e.style['place-self'\] = "unsafe self-start stretch" should set the longhand values]
expected: FAIL
[e.style['place-self'\] = "last baseline flex-start" should set the longhand values]
expected: FAIL
[e.style['place-self'\] = "first baseline" should set the longhand values]
expected: FAIL

View file

@ -1,2 +1,4 @@
[perspective-interpolation.html]
expected: CRASH
[ perspective interpolation]
expected: FAIL

View file

@ -1,2 +0,0 @@
[matchMedia-display-none-iframe.html]
expected: ERROR

View file

@ -1,2 +0,0 @@
[contenttype_txt.html]
expected: CRASH

View file

@ -312,21 +312,21 @@
[<iframe>: separate response Content-Type: */* text/html]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*]
expected: FAIL
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
[<iframe>: combined response Content-Type: */* text/html]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL

View file

@ -53,12 +53,6 @@
[combined text/javascript ]
expected: FAIL
[separate text/javascript;charset=windows-1252 error text/javascript]
expected: FAIL
[separate text/javascript x/x]
expected: FAIL
[separate text/javascript;charset=windows-1252 text/javascript]
expected: FAIL

View file

@ -11,6 +11,9 @@
[X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL
[X-Content-Type-Options%3A%20%2Cnosniff]
[X-Content-Type-Options%3A%20'NosniFF']
expected: FAIL
[Content-Type-Options%3A%20nosniff]
expected: FAIL

View file

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

View file

@ -1,5 +0,0 @@
[creating_browsing_context_test_01.html]
expected: TIMEOUT
[first argument: absolute url]
expected: TIMEOUT

View file

@ -1,5 +1,24 @@
[open-features-negative-innerwidth-innerheight.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: negative values for legacy `innerwidth`, `innerheight`]
expected: FAIL
[features "innerheight=-404.5" should NOT set "height=404"]
expected: TIMEOUT
[features "innerwidth=-404.5" should NOT set "width=404"]
expected: TIMEOUT
[features "innerwidth=-404" should NOT set "width=404"]
expected: TIMEOUT
[features "innerheight=-404e1" should NOT set "height=404"]
expected: TIMEOUT
[features "innerheight=-404" should NOT set "height=404"]
expected: TIMEOUT
[features "innerwidth=-404e1" should NOT set "width=404"]
expected: TIMEOUT

View file

@ -1,5 +1,24 @@
[open-features-negative-screenx-screeny.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: negative values for legacy `screenx`, `screeny`]
expected: FAIL
[features "screenx=-204" should NOT set "left=204"]
expected: TIMEOUT
[features "screeny=-204" should NOT set "top=204"]
expected: TIMEOUT
[features "screeny=-204.5" should NOT set "top=204"]
expected: TIMEOUT
[features "screeny=-0" should NOT set "top=204"]
expected: TIMEOUT
[features "screenx=-0" should NOT set "left=204"]
expected: TIMEOUT
[features "screenx=-204.5" should NOT set "left=204"]
expected: TIMEOUT

View file

@ -1,5 +1,24 @@
[open-features-negative-top-left.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: negative values for `top`, `left`]
expected: FAIL
[features "top=-204" should NOT set "top=204"]
expected: TIMEOUT
[features "top=-204.5" should NOT set "top=204"]
expected: TIMEOUT
[features "left=-204" should NOT set "left=204"]
expected: TIMEOUT
[features "top=-0" should NOT set "top=204"]
expected: TIMEOUT
[features "left=-204.5" should NOT set "left=204"]
expected: TIMEOUT
[features "left=-0" should NOT set "left=204"]
expected: TIMEOUT

View file

@ -1,5 +1,24 @@
[open-features-negative-width-height.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: negative values for `width`, `height`]
expected: FAIL
[features "height=-404" should NOT set "height=404"]
expected: TIMEOUT
[features "height=-404e1" should NOT set "height=404"]
expected: TIMEOUT
[features "height=-404.5" should NOT set "height=404"]
expected: TIMEOUT
[features "width=-404" should NOT set "width=404"]
expected: TIMEOUT
[features "width=-404e1" should NOT set "width=404"]
expected: TIMEOUT
[features "width=-404.5" should NOT set "width=404"]
expected: TIMEOUT

View file

@ -1,32 +1,48 @@
[open-features-non-integer-height.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for feature `height`]
expected: FAIL
[features "height=405*3" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "height=405.32" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "height=405e1" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "height=405/5" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "height=405^4" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "height=405.5" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "height=405e-1" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "height=405 " should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "height=405LLl" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "height=/404" should NOT set "height=404"]
expected: TIMEOUT
[top=0,left=0,width=401,: absence of feature "height" should be treated same as "height=0"]
expected: TIMEOUT
[top=0,left=0: absence of feature "height" should be treated same as "height=0"]
expected: TIMEOUT
[features "height=_404" should NOT set "height=404"]
expected: TIMEOUT
[features "height=L404" should NOT set "height=404"]
expected: TIMEOUT

View file

@ -1,32 +1,42 @@
[open-features-non-integer-innerheight.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for legacy feature `innerheight`]
expected: FAIL
[features "innerheight=405e-1" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "innerheight=405LLl" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "innerheight=405^4" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "innerheight=405e1" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "innerheight=405 " should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "innerheight=405/5" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "innerheight=405.32" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "innerheight=405.5" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "innerheight=405*3" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "innerheight=_404" should NOT set "height=404"]
expected: TIMEOUT
[features "innerheight=L404" should NOT set "height=404"]
expected: TIMEOUT
[features "innerheight=/404" should NOT set "height=404"]
expected: TIMEOUT

View file

@ -1,32 +1,42 @@
[open-features-non-integer-innerwidth.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for legacy feature `innerwidth`]
expected: FAIL
[features "innerwidth=405e-1" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "innerwidth=405*3" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "innerwidth=405.5" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "innerwidth=405e1" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "innerwidth=405.32" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "innerwidth=405 " should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "innerwidth=405LLl" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "innerwidth=405/5" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "innerwidth=405^4" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "innerwidth=/404" should NOT set "width=404"]
expected: TIMEOUT
[features "innerwidth=_404" should NOT set "width=404"]
expected: TIMEOUT
[features "innerwidth=L404" should NOT set "width=404"]
expected: TIMEOUT

View file

@ -1,32 +1,42 @@
[open-features-non-integer-left.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for feature `left`]
expected: FAIL
[features "left=105e1" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "left=105 " should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "left=105/5" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "left=105e-1" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "left=105^4" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "left=105LLl" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "left=105.32" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "left=105*3" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "left=105.5" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "left=L104" should NOT set "left=104"]
expected: TIMEOUT
[features "left=/104" should NOT set "left=104"]
expected: TIMEOUT
[features "left=_104" should NOT set "left=104"]
expected: TIMEOUT

View file

@ -1,32 +1,42 @@
[open-features-non-integer-screenx.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for legacy feature `screenx`]
expected: FAIL
[features "screenx=105.5" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "screenx=105e1" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "screenx=105 " should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "screenx=105*3" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "screenx=105e-1" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "screenx=105^4" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "screenx=105LLl" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "screenx=105/5" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "screenx=105.32" should set "left=105"]
expected: FAIL
expected: TIMEOUT
[features "screenx=_104" should NOT set "left=104"]
expected: TIMEOUT
[features "screenx=L104" should NOT set "left=104"]
expected: TIMEOUT
[features "screenx=/104" should NOT set "left=104"]
expected: TIMEOUT

View file

@ -1,32 +1,42 @@
[open-features-non-integer-screeny.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for legacy feature `screeny`]
expected: FAIL
[features "screeny=405^4" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "screeny=405e-1" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "screeny=405LLl" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "screeny=405e1" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "screeny=405 " should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "screeny=405/5" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "screeny=405*3" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "screeny=405.32" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "screeny=405.5" should set "height=405"]
expected: FAIL
expected: TIMEOUT
[features "screeny=_404" should NOT set "height=404"]
expected: TIMEOUT
[features "screeny=L404" should NOT set "height=404"]
expected: TIMEOUT
[features "screeny=/404" should NOT set "height=404"]
expected: TIMEOUT

View file

@ -1,32 +1,48 @@
[open-features-non-integer-width.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for feature `width`]
expected: FAIL
[features "width=405^4" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "width=405.5" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "width=405e1" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "width=405 " should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "width=405.32" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "width=405LLl" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "width=405*3" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "width=405e-1" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[features "width=405/5" should set "width=405"]
expected: FAIL
expected: TIMEOUT
[top=0,left=0: absence of feature "width" should be treated same as "width=0"]
expected: TIMEOUT
[features "width=_404" should NOT set "width=404"]
expected: TIMEOUT
[top=0,left=0,height=401,: absence of feature "width" should be treated same as "width=0"]
expected: TIMEOUT
[features "width=/404" should NOT set "width=404"]
expected: TIMEOUT
[features "width=L404" should NOT set "width=404"]
expected: TIMEOUT

View file

@ -1,8 +1,4 @@
[skip-document-with-fragment.html]
expected: TIMEOUT
[Autofocus elements in iframed documents with URL fragments should be skipped.]
expected: FAIL
[Autofocus elements in top-level browsing context's documents with URI fragments should be skipped.]
expected: TIMEOUT

View file

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

View file

@ -1,4 +1,5 @@
[promise-rejection-events.html]
expected: TIMEOUT
[delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire]
expected: FAIL
@ -8,3 +9,6 @@
[no unhandledrejection/rejectionhandled: rejection handler attached synchronously to a promise created from createImageBitmap]
expected: FAIL
[rejectionhandled is dispatched from a queued task, and not immediately]
expected: TIMEOUT

View file

@ -0,0 +1,5 @@
[crossorigin-sandwich-partial-TAO.sub.html]
expected: ERROR
[There should be one entry.]
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

@ -83,3 +83,9 @@
[X SNR (-316.5326738819981 dB) is not greater than or equal to 65.737. Got -316.5326738819981.]
expected: FAIL
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[30\]\t1.9724091887474060e-1\t9.5236867666244507e-1\t7.5512775778770447e-1\t7.9289436569253091e-1\t3.8985999999999999e-3\n\t[60\]\t-2.2450675070285797e-1\t-5.8084785938262939e-1\t3.5634110867977142e-1\t6.1348441407448528e-1\t3.8985999999999999e-3\n\t[90\]\t-3.7808802723884583e-1\t-5.9811043739318848e-1\t2.2002241015434265e-1\t3.6786251568070089e-1\t3.8985999999999999e-3\n\t[120\]\t7.6881676912307739e-1\t9.4563448429107666e-1\t1.7681771516799927e-1\t1.8698315057805445e-1\t3.8985999999999999e-3\n\t[151\]\t5.4644601186737418e-4\t-4.1306272149085999e-2\t4.1852718160953373e-2\t1.0132291292202573e+0\t3.8985999999999999e-3\n\t...and 1419 more errors.\n\tMax AbsError of 3.9596761213669287e+23 at index of 20238.\n\t[20238\]\t3.9596761213669287e+23\t-4.7574958205223083e-1\t3.9596761213669287e+23\t8.3230259589218307e+23\t3.8985999999999999e-3\n\tMax RelError of 8.3230259589218307e+23 at index of 20238.\n\t[20238\]\t3.9596761213669287e+23\t-4.7574958205223083e-1\t3.9596761213669287e+23\t8.3230259589218307e+23\t3.8985999999999999e-3\n]
expected: FAIL
[X SNR (-428.623168034801 dB) is not greater than or equal to 65.737. Got -428.623168034801.]
expected: FAIL

View file

@ -1,5 +1,5 @@
[xrBoundedReferenceSpace_updates.https.html]
expected: TIMEOUT
expected: ERROR
['XRBoundedReferenceSpace updates properly when the changes are applied]
expected: TIMEOUT

View file

@ -1118,6 +1118,9 @@ function invokeRequest(subresource, sourceContextList) {
"iframe": { // <iframe src="same-origin-URL"></iframe>
invoker: invokeFromIframe,
},
"iframe-blank": { // <iframe></iframe>
invoker: invokeFromIframe,
},
"worker-classic": {
// Classic dedicated worker loaded from same-origin.
invoker: invokeFromWorker.bind(undefined, false, {}),
@ -1204,21 +1207,40 @@ function invokeFromIframe(subresource, sourceContextList) {
encodeURIComponent(JSON.stringify(
currentSourceContext.policyDeliveries || []));
let iframe;
let promise;
if (currentSourceContext.sourceContextType === 'srcdoc') {
promise = fetch(frameUrl)
.then(r => r.text())
.then(srcdoc => {
return createElement("iframe", {srcdoc: srcdoc}, document.body, true);
iframe = createElement(
"iframe", {srcdoc: srcdoc}, document.body, true);
return iframe.eventPromise;
});
} else if (currentSourceContext.sourceContextType === 'iframe') {
promise = Promise.resolve(
createElement("iframe", {src: frameUrl}, document.body, true));
iframe = createElement("iframe", {src: frameUrl}, document.body, true);
promise = iframe.eventPromise;
} else if (currentSourceContext.sourceContextType === 'iframe-blank') {
let frameContent;
promise = fetch(frameUrl)
.then(r => r.text())
.then(t => {
frameContnent = t;
iframe = createElement("iframe", {}, document.body, true);
return iframe.eventPromise;
})
.then(() => {
// Reinitialize `iframe.eventPromise` with a new promise
// that catches the load event for the document.write() below.
bindEvents(iframe);
iframe.contentDocument.write(frameContent);
iframe.contentDocument.close();
return iframe.eventPromise;
});
}
return promise
.then(iframe => {
return iframe.eventPromise
.then(() => {
const promise = bindEvents2(
window, "message", iframe, "error", window, "error");
@ -1233,7 +1255,6 @@ function invokeFromIframe(subresource, sourceContextList) {
return Promise.reject(event.data.error);
return event.data;
});
});
}
// SanityChecker does nothing in release mode. See sanity-checker.js for debug

View file

@ -101,9 +101,11 @@ def validate(spec_json, details):
valid_test_expansion_fields = ['name'] + test_expansion_schema.keys()
# Should be consistent with `sourceContextMap` in
# `/common/security-features/resources/common.sub.js`.
valid_source_context_names = [
"top", "iframe", "srcdoc", "worker-classic", "worker-module",
"worker-classic-data", "worker-module-data"
"top", "iframe", "iframe-blank", "srcdoc", "worker-classic",
"worker-module", "worker-classic-data", "worker-module-data"
]
valid_subresource_names = [

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Box Alignment Level 3: gap sets longhands</title>
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-gap">
<meta name="assert" content="row-gap supports the full grammar '<row-gap> <column-gap>?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/shorthand-testcommon.js"></script>
</head>
<body>
<script>
test_shorthand_value('gap', 'normal', {
'row-gap': 'normal',
'column-gap': 'normal'
});
test_shorthand_value('gap', '10px 20%', {
'row-gap': '10px',
'column-gap': '20%'
});
test_shorthand_value('gap', '10px normal', {
'row-gap': '10px',
'column-gap': 'normal'
});
test_shorthand_value('gap', 'normal calc(20% + 10px)', {
'row-gap': 'normal',
'column-gap': 'calc(20% + 10px)'
});
</script>
</body>
</html>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Box Alignment Level 3: place-content sets longhands</title>
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-place-content">
<meta name="assert" content="place-content supports the full grammar '<align-content> <justify-content>?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/shorthand-testcommon.js"></script>
</head>
<body>
<script>
test_shorthand_value('place-content', 'normal', {
'align-content': 'normal',
'justify-content': 'normal'
});
test_shorthand_value('place-content', 'first baseline', {
'align-content': 'baseline',
'justify-content': 'start'
});
test_shorthand_value('place-content', 'last baseline flex-start', {
'align-content': 'last baseline',
'justify-content': 'flex-start'
});
test_shorthand_value('place-content', 'space-around', {
'align-content': 'space-around',
'justify-content': 'space-around'
});
test_shorthand_value('place-content', 'space-evenly unsafe end', {
'align-content': 'space-evenly',
'justify-content': 'unsafe end'
});
</script>
</body>
</html>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Box Alignment Level 3: place-items sets longhands</title>
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-place-items">
<meta name="assert" content="place-items supports the full grammar '<align-items> <justify-items>?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/shorthand-testcommon.js"></script>
</head>
<body>
<script>
test_shorthand_value('place-items', 'normal', {
'align-items': 'normal',
'justify-items': 'normal'
});
test_shorthand_value('place-items', 'first baseline', {
'align-items': 'baseline',
'justify-items': 'baseline'
});
test_shorthand_value('place-items', 'last baseline flex-start', {
'align-items': 'last baseline',
'justify-items': 'flex-start'
});
test_shorthand_value('place-items', 'stretch right legacy', {
'align-items': 'stretch',
'justify-items': 'legacy right'
});
</script>
</body>
</html>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Box Alignment Level 3: place-self sets longhands</title>
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-place-self">
<meta name="assert" content="place-self supports the full grammar '<align-self> <justify-self>?'.">
<meta name="assert" content="<baseline-position> and <baseline-position> start are equivalent.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/shorthand-testcommon.js"></script>
</head>
<body>
<script>
test_shorthand_value('place-self', 'normal', {
'align-self': 'normal',
'justify-self': 'normal'
});
test_shorthand_value('place-self', 'first baseline', {
'align-self': 'baseline',
'justify-self': 'baseline'
});
test_shorthand_value('place-self', 'last baseline flex-start', {
'align-self': 'last baseline',
'justify-self': 'flex-start'
});
test_shorthand_value('place-self', 'unsafe self-start stretch', {
'align-self': 'unsafe self-start',
'justify-self': 'stretch'
});
</script>
</body>
</html>

View file

@ -22,9 +22,9 @@
var displayMe = document.getElementById("displayMe");
var displayMeToo = document.getElementById("displayMeToo");
// Scroll the text container into view.
container.scrollLeft = 100;
container.scrollLeft = -300;
displayMe.style.display = "inline";
displayMeToo.style.display = "block";
assert_equals(container.scrollLeft, 300);
assert_equals(container.scrollLeft, -400);
}, "Line at edge of scrollport shouldn't jump visually when content is inserted before");
</script>

View file

@ -0,0 +1,20 @@
'use strict';
function test_shorthand_value(property, value, longhands) {
const stringifiedValue = JSON.stringify(value);
test(function(){
var div = document.getElementById('target') || document.createElement('div');
div.style[property] = "";
div.style[property] = value;
for (let longhand of Object.keys(longhands).sort()) {
const readValue = div.style[longhand];
assert_equals(readValue, longhands[longhand], longhand + " should be canonical");
div.style[longhand] = "";
div.style[longhand] = readValue;
assert_equals(div.style[longhand], readValue, "serialization should round-trip");
}
}, "e.style['" + property + "'] = " + stringifiedValue + " should set the longhand values");
}

View file

@ -9,7 +9,7 @@ delimit text to be replaced and `#` represents a digit.
## Reftests
### Test
### HTML test
<!--
Syntax highlighting cannot be enabled for the following template because it
@ -31,7 +31,7 @@ delimit text to be replaced and `#` represents a digit.
Filename: `{test-topic}-###.html`
### Reference:
### HTML reference
<!--
Syntax highlighting cannot be enabled for the following template because it
@ -52,8 +52,36 @@ Filename: `{test-topic}-###.html`
Filename: `{description}.html` or `{test-topic}-###-ref.html`
### SVG test
``` svg
<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml">
<title>${1:Test title}</title>
<metadata>
<h:link rel="help" href="${2:Specification link}"/>
<h:link rel="match" href="${3:URL of match}"/>
</metadata>
${4:Test body}
</svg>
```
Filename: `{test-topic}-###.svg`
### SVG reference
``` svg
<svg xmlns="http://www.w3.org/2000/svg">
<title>${1:Reference title}</title>
${2:Reference content}
</svg>
```
Filename: `{description}.svg` or `{test-topic}-###-ref.svg`
## testharness.js tests
### HTML
``` html
<!DOCTYPE html>
<meta charset="utf-8">
@ -67,8 +95,28 @@ ${2:Test body}
Filename: `{test-topic}-###.html`
### SVG
``` svg
<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml">
<title>${1:Test title}</title>
<metadata>
<h:link rel="help" href="${2:Specification link}"/>
</metadata>
<h:script src="/resources/testharness.js"/>
<h:script src="/resources/testharnessreport.js"/>
<script><![CDATA[
${4:Test body}
]]></script>
</svg>
```
Filename: `{test-topic}-###.svg`
### Manual Test
#### HTML
``` html
<!DOCTYPE html>
<meta charset="utf-8">
@ -82,3 +130,22 @@ ${2:Test body}
```
Filename: `{test-topic}-###-manual.html`
#### SVG
``` svg
<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml">
<title>${1:Test title}</title>
<metadata>
<h:link rel="help" href="${2:Specification link}"/>
</metadata>
<h:script src="/resources/testharness.js"/>
<h:script src="/resources/testharnessreport.js"/>
<script><![CDATA[
setup({explicit_timeout: true});
${4:Test body}
]]></script>
</svg>
```
Filename: `{test-topic}-###-manual.svg`

View file

@ -1,5 +1,6 @@
<!doctype html>
<meta charset="utf-8">
<meta name="timeout" content="long">
<title>Video should seek to time specified in media fragment syntax</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

View file

@ -49,6 +49,13 @@ test(t => {
}, "Importing a remote-origin descendant script from a same-origin top-level " +
"script with the no-referrer policy.");
test(t => {
assert_equals(
referrerRemoteRemote, "",
"Referrer should not be sent for the remote-origin descendant script.");
}, "Importing a remote-origin descendant script from a remote-origin " +
"top-level script with the no-referrer policy.");
test(t => {
assert_equals(
referrerRemoteSame, "",

View file

@ -39,6 +39,7 @@ test(t => {
"Referrer should be sent for the remote-origin top-level script.");
}, "Importing a remote-origin top-level script with the " +
"origin-when-cross-origin policy.");
test(t => {
const scriptURL =
new URL("resources/import-referrer-checker.sub.js", location.href)
@ -47,6 +48,7 @@ test(t => {
"Referrer should be sent for the same-origin descendant script.");
}, "Importing a same-origin descendant script from a same-origin top-level " +
"script with the origin-when-cross-origin policy.");
test(t => {
assert_equals(
referrerSameRemote, origin,

View file

@ -31,12 +31,13 @@ partial interface Navigator {
sequence<Gamepad?> getGamepads();
};
[Constructor(DOMString type, GamepadEventInit eventInitDict), Exposed=Window]
[Exposed=Window]
interface GamepadEvent : Event {
interface GamepadEvent: Event {
constructor(DOMString type, GamepadEventInit eventInitDict);
[SameObject] readonly attribute Gamepad gamepad;
};
dictionary GamepadEventInit : EventInit {
dictionary GamepadEventInit: EventInit {
required Gamepad gamepad;
};

View file

@ -39,8 +39,9 @@ interface MediaSession {
void setPositionState(optional MediaPositionState? state);
};
[Constructor(optional MediaMetadataInit init), Exposed=Window]
[Exposed=Window]
interface MediaMetadata {
constructor(optional MediaMetadataInit init = {});
attribute DOMString title;
attribute DOMString artist;
attribute DOMString album;

View file

@ -109,7 +109,10 @@ dictionary RTCInboundRtpStreamStats : RTCReceivedRtpStreamStats {
dictionary RTCRemoteInboundRtpStreamStats : RTCReceivedRtpStreamStats {
DOMString localId;
double roundTripTime;
double totalRoundTripTime;
double fractionLost;
unsigned long long reportsReceived;
unsigned long long roundTripTimeMeasurements;
};
dictionary RTCSentRtpStreamStats : RTCRtpStreamStats {
@ -165,6 +168,7 @@ enum RTCQualityLimitationReason {
dictionary RTCRemoteOutboundRtpStreamStats : RTCSentRtpStreamStats {
DOMString localId;
DOMHighResTimeStamp remoteTimestamp;
unsigned long long reportsSent;
};
dictionary RTCMediaSourceStats : RTCStats {

View file

@ -320,15 +320,15 @@ var MathMLFeatureDetection = {
<mn>1</mn><mo lspace='0px' rspace='0px'>+</mo><mn>2</mn>\
</mrow>\
<mrow>\
<mn>1</mn><mo lspace='8px' rspace='8px'>+</mo><mn>2</mn>\
<mn>1</mn><mo lspace='20px' rspace='20px'>+</mo><mn>2</mn>\
</mrow>\
</math>");
var math = document.body.lastElementChild;
var mrow = math.getElementsByTagName("mrow");
// lspace/rspace will add 16px per MathML and none if not supported.
// lspace/rspace will add 40px per MathML and none if not supported.
this._has_operator_spacing =
mrow[1].getBoundingClientRect().width -
mrow[0].getBoundingClientRect().width > 10;
mrow[0].getBoundingClientRect().width > 30;
document.body.removeChild(math);
}
return this._has_operator_spacing;

View file

@ -38,6 +38,7 @@
destUrl += 'page_origin=' + pageOrigin;
destUrl += '&timing_allow=1';
destUrl += '&cross_origin=' + crossOrigin;
destUrl += '&tao_steps=3';
const frameContext = document.getElementById('frameContext');
frameContext.onload = onload_test;
frameContext.src = destUrl;

View file

@ -0,0 +1,47 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>This test validates resource timing information for a same-origin=>cross-origin=>same-origin redirect chain with Timing-Allow-Origin.</title>
<link rel="help" href="http://www.w3.org/TR/resource-timing/#performanceresourcetiming"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="resources/webperftestharness.js"></script>
<script src="resources/webperftestharnessextension.js"></script>
<script>
setup({explicit_done: true});
test_namespace('getEntriesByName');
const pageOrigin = get_host_info()['ORIGIN'];
const crossOrigin = get_host_info()['REMOTE_ORIGIN'];
function onload_test()
{
const entries = performance.getEntriesByName(document.getElementById('frameContext').src, 'resource');
test_equals(entries.length, 1, 'There should be one entry.');
const entry = entries[0];
test_equals(entry.redirectStart, 0, 'redirectStart == 0 in cross-origin redirect with Timing-Allow-Origin in some of the chain but not all of it.');
test_equals(entry.redirectEnd, 0, 'redirectEnd == 0 in cross-origin redirect with Timing-Allow-Origin in some of the chain but not all of it.');
test_greater_than(entry.fetchStart, 0, 'fetchStart > 0 in cross-origin redirect.');
test_equals(entry.fetchStart, entry.startTime, 'startTime == fetchStart in cross-origin redirect with Timing-Allow-Origin in some of the chain but not all of it.');
done();
}
</script>
</head>
<body>
<iframe id="frameContext" src="" style="width: 250px; height: 250px;"></iframe>
<script>
let destUrl = pageOrigin + '/resource-timing/resources/multi_redirect.py?';
destUrl += 'page_origin=' + pageOrigin;
destUrl += '&timing_allow=1';
destUrl += '&cross_origin=' + crossOrigin;
destUrl += '&tao_steps=2';
const frameContext = document.getElementById('frameContext');
frameContext.onload = onload_test;
frameContext.src = destUrl;
</script>
</body>
</html>

View file

@ -37,6 +37,7 @@
let destUrl = get_host_info().HTTP_REMOTE_ORIGIN + '/resource-timing/resources/multi_redirect.py?';
destUrl += 'page_origin=' + 'http://' + document.location.host;
destUrl += '&cross_origin=' + get_host_info().HTTP_REMOTE_ORIGIN;
destUrl += '&tao_steps=3';
destUrl += '&timing_allow=1';
const frameContext = document.getElementById('frameContext');
frameContext.onload = onload_test;

View file

@ -0,0 +1,10 @@
<!DOCTYPE HTML>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Green Test Page</title>
</head>
<body style="background-color:#00FF00;">
<h1>Placeholder</h1>
</body>
</html>

View file

@ -0,0 +1 @@
Timing-Allow-Origin: *

View file

@ -16,29 +16,32 @@ def main(request, response):
origin = request.url_parts.scheme + "://" + request.url_parts.hostname + ":" + str(request.url_parts.port)
page_origin = request.GET.first("page_origin")
cross_origin = request.GET.first("cross_origin")
tao_steps = 0
if "tao_steps" in request.GET:
tao_steps = int(request.GET.first("tao_steps"))
timing_allow = "0"
if "timing_allow" in request.GET:
timing_allow = request.GET.first("timing_allow")
next_tao_steps = tao_steps - 1
redirect_url_path = "/resource-timing/resources/multi_redirect.py?"
redirect_url_path += "page_origin=" + page_origin
redirect_url_path += "&cross_origin=" + cross_origin
redirect_url_path += "&timing_allow=" + timing_allow
redirect_url_path += "&tao_steps=" + str(next_tao_steps)
redirect_url_path += "&step="
if timing_allow != "0" and tao_steps > 0:
response.headers.set("timing-allow-origin", page_origin)
if step == 1:
# On the first request, redirect to a cross origin URL
redirect_url = cross_origin + redirect_url_path + "2"
if timing_allow != "0" and origin != page_origin:
response.headers.set("timing-allow-origin", page_origin)
elif step == 2:
# On the second request, redirect to a same origin URL
redirect_url = page_origin + redirect_url_path + "3"
if timing_allow != "0":
response.headers.set("timing-allow-origin", page_origin)
else:
# On the third request, redirect to a static response
redirect_url = page_origin + "/resource-timing/resources/blank_page_green.htm"
redirect_url = page_origin + "/resource-timing/resources/blank-with-tao.html"
response.status = 302
response.headers.set("Location", redirect_url)

View file

@ -200,7 +200,7 @@ var GenericSensorTest = (() => {
const initParams = new device.mojom.SensorInitParams({
sensor: sensorPtr,
clientRequest: mojo.makeRequest(this.activeSensors_.get(type).client_),
clientReceiver: mojo.makeRequest(this.activeSensors_.get(type).client_),
memory: rv.handle,
bufferOffset: offset,
mode: reportingMode,

View file

@ -57,7 +57,7 @@
SensorInitParams.kReadBufferSizeForTests = 48;
SensorInitParams.prototype.initDefaults_ = function() {
this.sensor = new sensor$.SensorPtr();
this.clientRequest = new bindings.InterfaceRequest();
this.clientReceiver = new bindings.InterfaceRequest();
this.memory = null;
this.bufferOffset = 0;
this.mode = 0;
@ -92,7 +92,7 @@
return err;
// validate SensorInitParams.clientRequest
// validate SensorInitParams.clientReceiver
err = messageValidator.validateInterfaceRequest(offset + codec.kStructHeaderSize + 8, false)
if (err !== validator.validationError.NONE)
return err;
@ -129,7 +129,7 @@
var numberOfBytes = decoder.readUint32();
var version = decoder.readUint32();
val.sensor = decoder.decodeStruct(new codec.Interface(sensor$.SensorPtr));
val.clientRequest = decoder.decodeStruct(codec.InterfaceRequest);
val.clientReceiver = decoder.decodeStruct(codec.InterfaceRequest);
val.memory = decoder.decodeStruct(codec.Handle);
val.bufferOffset = decoder.decodeStruct(codec.Uint64);
val.mode = decoder.decodeStruct(codec.Int32);
@ -148,7 +148,7 @@
encoder.writeUint32(SensorInitParams.encodedSize);
encoder.writeUint32(0);
encoder.encodeStruct(new codec.Interface(sensor$.SensorPtr), val.sensor);
encoder.encodeStruct(codec.InterfaceRequest, val.clientRequest);
encoder.encodeStruct(codec.InterfaceRequest, val.clientReceiver);
encoder.encodeStruct(codec.Handle, val.memory);
encoder.encodeStruct(codec.Uint64, val.bufferOffset);
encoder.encodeStruct(codec.Int32, val.mode);

View file

@ -16,6 +16,7 @@ let test_cases = [
{ fragment: '##targetText=this,test,-page', expect_position: 'text' },
{ fragment: '##targetText=this%20is%20a%20test%20page', expect_position: 'text' },
{ fragment: '##targetText=this&targetText=test,page', expect_position: 'text' },
{ fragment: '##targetText=tes&targetText=age', expect_position: 'top' },
{ fragment: '#pagestate##targetText=test', expect_position: 'text' },
{ fragment: '#pagestate##targetText=nomatch', expect_position: 'top' },
{ fragment: '#element##targetText=nomatch', expect_position: 'element' },

View file

@ -1,6 +1,4 @@
<!doctype html>
<meta charset="utf-8">
<!DOCTYPE html>
<title>Remove/Add syncbase while animation is running</title>
<link rel="help" href="https://www.w3.org/TR/SMIL3/smil-timing.html#q26">
<link rel="author" title="Edvard Thörnros" href="mailto:edvardt@opera.com">
@ -15,7 +13,8 @@
</svg>
<script>
document.querySelector("body").onload = async_test(function(t) {
async_test(function(t) {
window.onload = t.step_func(function() {
let svg = document.querySelector("svg");
let rect = document.querySelector("rect");
@ -41,4 +40,5 @@
}));
}));
});
});
</script>

View file

@ -0,0 +1,16 @@
<svg width="340" height="140"
xmlns="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Circle coordinates and radius specified by properties</title>
<html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
<html:link rel="match" href="circle-ref.svg" />
<style>
circle {
cx: 204px;
cy: 56px;
r: 65px;
fill: blue;
}
</style>
<circle />
</svg>

After

Width:  |  Height:  |  Size: 436 B

View file

@ -0,0 +1,16 @@
<svg width="340" height="140" viewBox="60000 70000 3400 1400"
xmlns="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Circle coordinates and radius specified in user units</title>
<html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
<html:link rel="match" href="circle-ref.svg" />
<style>
circle {
cx: 62040px;
cy: 70560px;
r: 650px;
fill: blue;
}
</style>
<circle />
</svg>

After

Width:  |  Height:  |  Size: 474 B

View file

@ -0,0 +1,16 @@
<svg width="340" height="140"
xmlns="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Circle coordinates and radius specified by percentage</title>
<html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
<html:link rel="match" href="circle-ref.svg" />
<style>
circle {
cx: 60%; /* 60% of width 340 */
cy: 40%; /* 40% of height 140 */
r: 25%; /* 25% of normalized diagonal 260 */
fill: blue;
}
</style>
<circle />
</svg>

After

Width:  |  Height:  |  Size: 516 B

View file

@ -0,0 +1,15 @@
<svg width="340" height="140"
xmlns="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Circle coordinates and radius specified using calc</title>
<html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
<html:link rel="match" href="circle-ref.svg" />
<style>
circle {
fill: blue;
font-size: 40px;
}
</style>
<circle cx="calc(80px + 60% - 2em)" cy="calc(80px + 40% - 2em)"
r="calc(5 * 5%)" />
</svg>

After

Width:  |  Height:  |  Size: 485 B

View file

@ -0,0 +1,4 @@
<svg width="340" height="140"
xmlns="http://www.w3.org/2000/svg">
<circle cx="204" cy="56" r="65" fill="blue" />
</svg>

After

Width:  |  Height:  |  Size: 124 B

View file

@ -0,0 +1,17 @@
<svg width="300" height="200"
xmlns="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Ellipse coordinates and radii specified by properties</title>
<html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
<html:link rel="match" href="ellipse-ref.svg" />
<style>
ellipse {
cx: 75px;
cy: 120px;
rx: 60px;
ry: 50px;
fill: blue;
}
</style>
<ellipse />
</svg>

After

Width:  |  Height:  |  Size: 456 B

View file

@ -0,0 +1,17 @@
<svg width="300" height="200" viewBox="6000 7000 600 400"
xmlns="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Ellipse coordinates and radii specified in user units</title>
<html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
<html:link rel="match" href="ellipse-ref.svg" />
<style>
ellipse {
cx: 6150px;
cy: 7240px;
rx: 120px;
ry: 100px;
fill: blue;
}
</style>
<ellipse />
</svg>

After

Width:  |  Height:  |  Size: 489 B

View file

@ -0,0 +1,17 @@
<svg width="300" height="200"
xmlns="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Ellipse coordinates and radii specified by percentage</title>
<html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
<html:link rel="match" href="ellipse-ref.svg" />
<style>
ellipse {
cx: 25%;
cy: 60%;
rx: 20%;
ry: 25%;
fill: blue;
}
</style>
<ellipse />
</svg>

After

Width:  |  Height:  |  Size: 451 B

View file

@ -0,0 +1,15 @@
<svg width="300" height="200"
xmlns="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Ellipse coordinates and radii specified using calc</title>
<html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
<html:link rel="match" href="ellipse-ref.svg" />
<style>
ellipse {
fill: blue;
font-size: 40px;
}
</style>
<ellipse cx="calc(80px + 25% - 2em)" cy="calc(80px + 60% - 2em)"
rx="calc(4 * 5%)" ry="calc(5 * 5%)" />
</svg>

After

Width:  |  Height:  |  Size: 507 B

View file

@ -0,0 +1,4 @@
<svg width="300" height="200"
xmlns="http://www.w3.org/2000/svg">
<ellipse cx="75" cy="120" rx="60" ry="50" fill="blue" />
</svg>

After

Width:  |  Height:  |  Size: 134 B

View file

@ -0,0 +1,17 @@
<svg width="300" height="200"
xmlns="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Rectangle coordinates and sizes specified by properties</title>
<html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
<html:link rel="match" href="rect-ref.svg" />
<style>
rect {
x: 30px;
y: 60px;
width: 120px;
height: 100px;
fill: blue;
}
</style>
<rect />
</svg>

After

Width:  |  Height:  |  Size: 455 B

View file

@ -0,0 +1,17 @@
<svg width="300" height="200" viewBox="600 700 150 100"
xmlns="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Rectangle coordinates and sizes specified in user units</title>
<html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
<html:link rel="match" href="rect-ref.svg" />
<style>
rect {
x: 615px;
y: 730px;
width: 60px;
height: 50px;
fill: blue;
}
</style>
<rect />
</svg>

After

Width:  |  Height:  |  Size: 481 B

View file

@ -0,0 +1,17 @@
<svg width="300" height="200"
xmlns="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Rectangle coordinates and sizes specified by percentage</title>
<html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
<html:link rel="match" href="rect-ref.svg" />
<style>
rect {
x: 10%;
y: 30%;
width: 40%;
height: 50%;
fill: blue;
}
</style>
<rect />
</svg>

After

Width:  |  Height:  |  Size: 449 B

View file

@ -0,0 +1,15 @@
<svg width="300" height="200"
xmlns="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Rectangle coordinates and sizes specified using calc</title>
<html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
<html:link rel="match" href="rect-ref.svg" />
<style>
rect {
fill: blue;
font-size: 40px;
}
</style>
<rect x="calc(80px + 10% - 2em)" y="calc(80px + 30% - 2em)"
width="calc(8 * 5%)" height="calc(10 * 5%)" />
</svg>

After

Width:  |  Height:  |  Size: 506 B

View file

@ -0,0 +1,4 @@
<svg width="300" height="200"
xmlns="http://www.w3.org/2000/svg">
<rect x="30" y="60" width="120" height="100" fill="blue" />
</svg>

After

Width:  |  Height:  |  Size: 137 B

View file

@ -0,0 +1,28 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:h="http://www.w3.org/1999/xhtml"
width="800px" height="800px">
<title>SVG Painting: marker sets longhands</title>
<metadata>
<h:link rel="help" href="https://svgwg.org/svg2-draft/painting.html#MarkerProperty"/>
<h:meta name="assert" content="marker supports the full paint grammar 'none | marker-ref'."/>
</metadata>
<g id="target"></g>
<h:script src="/resources/testharness.js"/>
<h:script src="/resources/testharnessreport.js"/>
<h:script src="/css/support/shorthand-testcommon.js"/>
<script><![CDATA[
test_shorthand_value('marker', 'none', {
'marker-start': 'none',
'marker-mid': 'none',
'marker-end': 'none'
});
test_shorthand_value('marker', 'url("https://example.com/")', {
'marker-start': 'url("https://example.com/")',
'marker-mid': 'url("https://example.com/")',
'marker-end': 'url("https://example.com/")'
});
]]></script>
</svg>

After

Width:  |  Height:  |  Size: 937 B

View file

@ -2195,7 +2195,6 @@ const filterListType = {
test(t => {
const idlName = propertyToIDL(property);
const target = createTestElement(t, setup);
target.style.color = "rgba(255, 0, 0, 0.4)";
const animation = target.animate(
{ [idlName]:
['blur(0px)',
@ -2204,9 +2203,9 @@ const filterListType = {
testAnimationSamples(animation, idlName,
[{ time: 500,
// The lacuna value of drop-shadow's color is taken from
// the color property.
expected: 'blur(5px) drop-shadow(rgba(85, 0, 170, 0.6) 5px 5px 5px' }]);
// Per the spec: The initial value for interpolation is all length values
// set to 0 and the used color set to transparent.
expected: 'blur(5px) drop-shadow(rgba(0, 0, 255, 0.4) 5px 5px 5px' }]);
}, `${property}: interpolate different length of filter-function-list`
+ ' with drop-shadow function');

View file

@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Web NFC: NFCReader tests</title>
<title>Web NFC: NFCReader.scan tests</title>
<link rel="author" title="Intel" href="http://www.intel.com"/>
<link rel="help" href="https://w3c.github.io/web-nfc/"/>
<script src="/resources/testharness.js"></script>
@ -10,6 +10,16 @@
"use strict";
const invalid_signals = [
"string",
123,
{},
true,
Symbol(),
() => {},
self
];
function waitSyntaxErrorPromise(t, scan_options) {
const reader = new NFCReader();
const readerWatcher = new EventWatcher(t, reader, ["reading", "error"]);
@ -131,4 +141,54 @@ nfc_test(async (t, mockNFC) => {
await promise;
}, "Test that NFCReader.scan succeeds if NFCScanOptions.url is empty.");
nfc_test(async (t, mockNFC) => {
const reader = new NFCReader();
const readerWatcher = new EventWatcher(t, reader, ["reading", "error"]);
mockNFC.setReadingMessage(createMessage([createTextRecord(test_text_data)]));
const controller = new AbortController();
controller.abort();
reader.scan({signal: controller.signal});
await new Promise((resolve, reject) => {
readerWatcher.wait_for("reading").then(event => {
reject("reading event should not be fired.");
});
t.step_timeout(resolve, 100);
});
}, "Test that NFCReader.onreading should not be fired if NFCScanOptions.signal \
is aborted.");
nfc_test(async (t, mockNFC) => {
const reader = new NFCReader();
const controller = new AbortController();
const readerWatcher = new EventWatcher(t, reader, ["reading", "error"]);
const message = createMessage([createTextRecord(test_text_data)]);
mockNFC.setReadingMessage(message);
reader.scan({signal: controller.signal});
const event = await readerWatcher.wait_for("reading");
assert_true(event instanceof NFCReadingEvent);
mockNFC.setReadingMessage(message);
controller.abort();
await new Promise((resolve, reject) => {
readerWatcher.wait_for("reading").then(event => {
reject("reading event should not be fired.");
});
t.step_timeout(resolve, 100);
});
}, "Synchronously signaled abort.");
test(() => {
const reader = new NFCReader();
invalid_signals.forEach(invalid_signal => {
assert_throws(new TypeError(),
() => { reader.scan({ signal: invalid_signal }); });
});
}, "NFCReader.scan should fail if signal is not an AbortSignal.");
</script>