Update web-platform-tests to revision 3bac98b37f29ec287e115fcecff566eb081131a8

This commit is contained in:
WPT Sync Bot 2019-08-24 10:23:06 +00:00
parent 6ff2524781
commit 57ea61dc86
64 changed files with 1309 additions and 347 deletions

View file

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

View file

@ -14,6 +14,9 @@
[Revoke blob URL after creating Request, will fetch]
expected: FAIL
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL
[url-with-fetch.any.html]
[Untitled]
@ -34,6 +37,3 @@
[Revoke blob URL after creating Request, will fetch]
expected: FAIL
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL

View file

@ -204469,6 +204469,18 @@
}
]
],
"infrastructure/reftest/reftest_fuzzy_chain_ini.html": [
[
"infrastructure/reftest/reftest_fuzzy_chain_ini.html",
[
[
"/infrastructure/reftest/fuzzy-ref-2.html",
"=="
]
],
{}
]
],
"infrastructure/reftest/reftest_fuzzy_ini_full.html": [
[
"infrastructure/reftest/reftest_fuzzy_ini_full.html",
@ -211729,6 +211741,18 @@
{}
]
],
"infrastructure/reftest/fuzzy-ref-2.html": [
[
"infrastructure/reftest/fuzzy-ref-2.html",
[
[
"/infrastructure/reftest/fuzzy-ref-2a.html",
"=="
]
],
{}
]
],
"infrastructure/reftest/reftest_and_fail_0-ref.html": [
[
"infrastructure/reftest/reftest_and_fail_0-ref.html",
@ -275063,6 +275087,9 @@
"infrastructure/metadata/infrastructure/reftest/reftest_cycle_fail.html.ini": [
[]
],
"infrastructure/metadata/infrastructure/reftest/reftest_fuzzy_chain_ini.html": [
[]
],
"infrastructure/metadata/infrastructure/reftest/reftest_fuzzy_ini_full.html.ini": [
[]
],
@ -275129,6 +275156,9 @@
"infrastructure/reftest/fuzzy-ref-1.html": [
[]
],
"infrastructure/reftest/fuzzy-ref-2a.html": [
[]
],
"infrastructure/reftest/green.html": [
[]
],
@ -279623,6 +279653,9 @@
"resource-timing/resources/object-refresh.html": [
[]
],
"resource-timing/resources/preflight.py": [
[]
],
"resource-timing/resources/resource_timing_test0.css": [
[]
],
@ -329123,6 +329156,18 @@
{}
]
],
"css/css-values/minmax-length-percent-computed.html": [
[
"css/css-values/minmax-length-percent-computed.html",
{}
]
],
"css/css-values/minmax-length-percent-invalid.html": [
[
"css/css-values/minmax-length-percent-invalid.html",
{}
]
],
"css/css-values/minmax-number-computed.html": [
[
"css/css-values/minmax-number-computed.html",
@ -331665,6 +331710,12 @@
{}
]
],
"css/motion/animation/offset-interpolation.html": [
[
"css/motion/animation/offset-interpolation.html",
{}
]
],
"css/motion/animation/offset-path-interpolation-001.html": [
[
"css/motion/animation/offset-path-interpolation-001.html",
@ -393997,6 +394048,38 @@
{}
]
],
"resource-timing/cors-preflight.any.js": [
[
"resource-timing/cors-preflight.any.html",
{
"script_metadata": [
[
"script",
"/common/utils.js"
],
[
"script",
"/common/get-host-info.sub.js"
]
]
}
],
[
"resource-timing/cors-preflight.any.worker.html",
{
"script_metadata": [
[
"script",
"/common/utils.js"
],
[
"script",
"/common/get-host-info.sub.js"
]
]
}
]
],
"resource-timing/crossorigin-sandwich-TAO.sub.html": [
[
"resource-timing/crossorigin-sandwich-TAO.sub.html",
@ -552546,7 +552629,7 @@
"testharness"
],
"css/css-fonts/animations/font-variation-settings-interpolation.html": [
"e11079cfc012ce8937b504662e1f0f6f92351fe2",
"cb99d7b255e9ac8743b7afadc79c7276ff5f74ed",
"testharness"
],
"css/css-fonts/calc-in-font-variation-settings.html": [
@ -594725,6 +594808,14 @@
"1405c3198128530939d9778642aaab2920bb6e60",
"testharness"
],
"css/css-values/minmax-length-percent-computed.html": [
"881905ddd565960d47839f1b5a64770ad7627ba5",
"testharness"
],
"css/css-values/minmax-length-percent-invalid.html": [
"ee086ef269d07bf6b0db5d1306a0f24af0ad8fab",
"testharness"
],
"css/css-values/minmax-number-computed.html": [
"c72c276625466a193bf8829e3ddbb87d7a565dc0",
"testharness"
@ -605246,11 +605337,15 @@
"support"
],
"css/motion/animation/offset-anchor-interpolation.html": [
"75f855a2c8aff046c2817201197b3eb345327a4a",
"9c69c0f0bed2b14c02091ccf63f50ace61f2eb2a",
"testharness"
],
"css/motion/animation/offset-distance-interpolation.html": [
"4912b9cf2510b45915756b320f5872dad2cae5d8",
"bc0c094a8e5305c970f0a4d44ee8a3726d2965a1",
"testharness"
],
"css/motion/animation/offset-interpolation.html": [
"0d1ba1c8875ca1d76e52a01a655037cad6f8eff9",
"testharness"
],
"css/motion/animation/offset-path-interpolation-001.html": [
@ -605270,15 +605365,15 @@
"testharness"
],
"css/motion/animation/offset-path-interpolation-005.html": [
"afe4bf5774357f0387f1ab63642ab6d02a8e9c6a",
"9924106f4b75ede89e5270a76fe217f85ef20050",
"testharness"
],
"css/motion/animation/offset-position-interpolation.html": [
"5ccca37dc304fbdabf73f0bc074b54d2682c6336",
"9faaf9487afb20059046e95a8cd5b3a796e8fd42",
"testharness"
],
"css/motion/animation/offset-rotate-interpolation.html": [
"a55a005747f6d0a45a950b8b2315c8a71970043c",
"55845108ebf5f3c42a8b0532121199136160d695",
"testharness"
],
"css/motion/animation/reftests/offset-distance-interpolation-001.html": [
@ -607538,7 +607633,7 @@
"support"
],
"css/support/interpolation-testcommon.js": [
"62f40790dbdf25720a127e21ed14d7fedafdef0f",
"e7ee011cdb470ee228a8a32442d6a717ef6ffd0a",
"support"
],
"css/support/parsing-testcommon.js": [
@ -647029,6 +647124,10 @@
"472b33f7764bde6e2aea7bc2ccd8bf3739babad2",
"support"
],
"infrastructure/metadata/infrastructure/reftest/reftest_fuzzy_chain_ini.html": [
"69dc018f38990001626df54f1d067efd3421fdd0",
"support"
],
"infrastructure/metadata/infrastructure/reftest/reftest_fuzzy_ini_full.html.ini": [
"0ebde2f4a62f4df54dd5639904df0478b457e56b",
"support"
@ -647121,6 +647220,14 @@
"e50fc11ef6ea80754e702becfbf675feebe3dbb9",
"support"
],
"infrastructure/reftest/fuzzy-ref-2.html": [
"cdaf6446ed40dd5c251a7f7031aeaba91bf79541",
"reftest_node"
],
"infrastructure/reftest/fuzzy-ref-2a.html": [
"99da3203afba94574df823bb79d39a735b282b44",
"support"
],
"infrastructure/reftest/green-ref.html": [
"0e145d60b55b3502639d15f10d4d63a6b0f79b7d",
"reftest"
@ -647181,6 +647288,10 @@
"1930fe0ae8fb1aee30e91e691fe6a73ccfc87d0e",
"reftest"
],
"infrastructure/reftest/reftest_fuzzy_chain_ini.html": [
"4353379ddb443355a978a7fc100ef470488035fd",
"reftest"
],
"infrastructure/reftest/reftest_fuzzy_ini_full.html": [
"7429025798151b620dd72db71a46070aafe6c070",
"reftest"
@ -647566,7 +647677,7 @@
"support"
],
"interfaces/element-timing.idl": [
"cf56426fb6ea9ed133c76d1b36327ca95fe348b9",
"6a54bbd2af6952ff51b37907f866e7bdd770257a",
"support"
],
"interfaces/encoding.idl": [
@ -647662,15 +647773,15 @@
"support"
],
"interfaces/largest-contentful-paint.idl": [
"d2c69c4757553fd4b6d7133067859fa39fe013b5",
"d3cfd56bafd171fb5820ace2c99eaa4e1a09b45a",
"support"
],
"interfaces/layout-instability.idl": [
"c46151a923dd32f1eb186b18e6d6d26bfb800451",
"0cd2262a9f32d4a4d6f81aae165c3a411868cfc4",
"support"
],
"interfaces/longtasks.idl": [
"333b842f86e5d41f6f1aab8827cf086356c5a782",
"ef3f660038bed8cf7064d51f7e261af11532df9c",
"support"
],
"interfaces/magnetometer.idl": [
@ -647682,7 +647793,7 @@
"support"
],
"interfaces/media-playback-quality.idl": [
"12b2c74e6183af66ec5bfae1897b7c46f276bdac",
"5a93de9f06c654c5e4f2a015674ae93dd21cbfc4",
"support"
],
"interfaces/media-source.idl": [
@ -647814,7 +647925,7 @@
"support"
],
"interfaces/screen-capture.idl": [
"f22f7a9a810e0d1330ee43b425fb778e7c4da911",
"b5b0067650d3e6de5fa78991409a3744a1995066",
"support"
],
"interfaces/screen-orientation.idl": [
@ -647822,7 +647933,7 @@
"support"
],
"interfaces/scroll-animations.idl": [
"21013919a5d9d8cc0181e9f9b7637d0212409681",
"f2560d9ffc88eaadf961b055480ed605610f72bf",
"support"
],
"interfaces/secure-contexts.idl": [
@ -647854,7 +647965,7 @@
"support"
],
"interfaces/touch-events.idl": [
"17be1b46b379fe1aefef076ef8066e0a4570bad0",
"1a8c9d7d24ece0ea221b6863ce8ea3595bcbb697",
"support"
],
"interfaces/trusted-types.tentative.idl": [
@ -647894,7 +648005,7 @@
"support"
],
"interfaces/web-animations.idl": [
"0fc5b47a976dd55a3d9701dd4cbc8e4ad8ada9b0",
"72ac87f3e33633864b779632c85cb2fbb473ef4c",
"support"
],
"interfaces/web-bluetooth.idl": [
@ -647930,7 +648041,7 @@
"support"
],
"interfaces/webmidi.idl": [
"58d6357f7365765c7e9142024caddba51c373927",
"0dfcb7771a871ff9a3568afc99a564c1e06b71a2",
"support"
],
"interfaces/webrtc-dscp.idl": [
@ -671965,6 +672076,10 @@
"eaf21b483ccd6ec63bcb8dc87c9e19a4305bf43d",
"testharness"
],
"resource-timing/cors-preflight.any.js": [
"5bbf3d2a2345ed4a5202d64b241468614352b0a8",
"testharness"
],
"resource-timing/crossorigin-sandwich-TAO.sub.html": [
"c3085950bd68ac72e1079a04d52ac3e1e1c603fb",
"testharness"
@ -672349,6 +672464,10 @@
"9e43e19de19fc7c364e68e0b2415963f55e9ddb2",
"support"
],
"resource-timing/resources/preflight.py": [
"4fca99d0717488b67c7c389d400b2ee57ec88fa2",
"support"
],
"resource-timing/resources/resource_timing_test0.css": [
"8bc8326ba675adcc8aa809dd0b885dba3285782d",
"support"
@ -683438,7 +683557,7 @@
"support"
],
"tools/ci/run_tc.py": [
"1cfb41fcaaba55d9e1ee7d4722bb6c56aabeb459",
"240517a1ff68ba072cc48f31bf42ed8c9d888048",
"support"
],
"tools/ci/taskcluster-run.py": [
@ -689198,7 +689317,7 @@
"support"
],
"tools/wptserve/tests/functional/test_pipes.py": [
"bad4d624c9f0a29bc8e4b3a740c0ffe834dc88f3",
"a6a703e304902dafaf43975ab1ac0580e160fdc3",
"support"
],
"tools/wptserve/tests/functional/test_request.py": [
@ -689242,7 +689361,7 @@
"support"
],
"tools/wptserve/wptserve/handlers.py": [
"e846ff807a6163688473d80e9cdbaca8d13f45ff",
"ca5118009cfc9c4763f99e2a6296d784a6539216",
"support"
],
"tools/wptserve/wptserve/logger.py": [
@ -694450,7 +694569,7 @@
"support"
],
"webdriver/tests/support/fixtures.py": [
"9f8c983d49816e21c07541daa54cecddca7d206e",
"ab2aaf4e75d96492d9c6419ab11d567205652b8f",
"support"
],
"webdriver/tests/support/helpers.py": [
@ -694482,7 +694601,7 @@
"support"
],
"webdriver/tests/switch_to_frame/cross_origin.py": [
"3e5bab191a8eaa0976065d94f657b207e83d8ef9",
"4425a3ab901fef0effb2fc94ca3611e57f2ba51c",
"wdspec"
],
"webdriver/tests/switch_to_frame/switch.py": [
@ -695410,7 +695529,7 @@
"testharness"
],
"webrtc/RTCIceTransport.html": [
"6a00e1c59e7183fd84712862b6c6b044d4be340d",
"94dc1c461fb5b2074b4975612251a7814af045e5",
"testharness"
],
"webrtc/RTCPeerConnection-add-track-no-deadlock.https.html": [
@ -695478,7 +695597,7 @@
"testharness"
],
"webrtc/RTCPeerConnection-iceConnectionState.https.html": [
"282771153c4645994a661048d2829859c73d705f",
"c0ce25eb76bfe3464863ec42b31842cfbb88b8de",
"testharness"
],
"webrtc/RTCPeerConnection-iceGatheringState.html": [
@ -700418,11 +700537,11 @@
"testharness"
],
"webxr/xrDevice_requestSession_optionalFeatures.https.html": [
"c274f4ff7138df2bdc98fbc173db73d29321afc2",
"0071b81e828603c3765edc1fea3ff659b3e39452",
"testharness"
],
"webxr/xrDevice_requestSession_requiredFeatures_unknown.https.html": [
"02b26c05cb5dc0e5b721e472632fae3aa83b6275",
"9fa8c31d63aab6f74886b55596ff63911018f51e",
"testharness"
],
"webxr/xrDevice_supportsSession_immersive.https.html": [

View file

@ -0,0 +1,151 @@
[minmax-length-percent-computed.html]
[Property margin-left value 'min(20px, 10%)' computes to '10px']
expected: FAIL
[Property margin-left value 'min(1vh + 1%)' computes to '11.4px']
expected: FAIL
[Property margin-left value 'max(1pc + 1%)' computes to '20px']
expected: FAIL
[Property margin-left value 'min(1em, 10%)' computes to '10px']
expected: FAIL
[Property margin-left value 'min(30px + 10%, 60px + 5%)' computes to '70px']
expected: FAIL
[Property margin-left value 'max(20px, 10%)' computes to '40px']
expected: FAIL
[Property margin-left value 'calc(min(1.5em, 10%) * 2)' computes to '60px']
expected: FAIL
[Property margin-left value 'calc(min(1.5em, 10%) - 10px)' computes to '20px']
expected: FAIL
[Property margin-left value 'max(20px, 10%)' computes to '20px']
expected: FAIL
[Property margin-left value 'min(1mm + 1%)' computes to '7.78333333333333px']
expected: FAIL
[Property margin-left value 'min(1em + 1%)' computes to '24px']
expected: FAIL
[Property margin-left value 'min(1Q + 1%)' computes to '4.95px']
expected: FAIL
[Property margin-left value 'min(20px, 10%)' computes to '20px']
expected: FAIL
[Property margin-left value 'calc(max(1em, 15%) * 2)' computes to '120px']
expected: FAIL
[Property margin-left value 'min(1vmin + 1%)' computes to '11.4px']
expected: FAIL
[Property margin-left value 'max(1px + 1%)' computes to '5px']
expected: FAIL
[Property margin-left value 'max(1Q + 1%)' computes to '4.95px']
expected: FAIL
[Property margin-left value 'max(1cm + 1%)' computes to '41.8px']
expected: FAIL
[Property margin-left value 'min(1vmax + 1%)' computes to '14.2333333333333px']
expected: FAIL
[Property margin-left value 'calc(min(1.5em, 10%) - max(1em, 15%))' computes to '-30px']
expected: FAIL
[Property margin-left value 'min(1vw + 1%)' computes to '14.2333333333333px']
expected: FAIL
[Property margin-left value 'max(2em + 10%, 1em + 20%)' computes to '100px']
expected: FAIL
[Property margin-left value 'min(1in + 1%)' computes to '100px']
expected: FAIL
[Property margin-left value 'min(1cm + 1%)' computes to '41.8px']
expected: FAIL
[Property margin-left value 'calc(min(1.5em, 10%) + max(1em, 15%))' computes to '90px']
expected: FAIL
[Property margin-left value 'max(1vw + 1%)' computes to '14.2333333333333px']
expected: FAIL
[Property margin-left value 'calc(min(1.5em, 10%) / 2)' computes to '15px']
expected: FAIL
[Property margin-left value 'max(1em + 1%)' computes to '24px']
expected: FAIL
[Property margin-left value 'max(1pt + 1%)' computes to '5.33333333333333px']
expected: FAIL
[Property margin-left value 'max(1ch + 1%)' computes to '14px']
expected: FAIL
[Property margin-left value 'max(1mm + 1%)' computes to '7.78333333333333px']
expected: FAIL
[Property margin-left value 'max(1rem + 1%)' computes to '20px']
expected: FAIL
[Property margin-left value 'max(1vmin + 1%)' computes to '11.4px']
expected: FAIL
[Property margin-left value 'max(1em, 10%)' computes to '40px']
expected: FAIL
[Property margin-left value 'max(1vh + 1%)' computes to '11.4px']
expected: FAIL
[Property margin-left value 'max(1vmax + 1%)' computes to '14.2333333333333px']
expected: FAIL
[Property margin-left value 'min(1pt + 1%)' computes to '5.33333333333333px']
expected: FAIL
[Property margin-left value 'min(1ex + 1%)' computes to '14px']
expected: FAIL
[Property margin-left value 'calc(min(1.5em, 10%) + 10px)' computes to '40px']
expected: FAIL
[Property margin-left value 'max(1em, 10%)' computes to '20px']
expected: FAIL
[Property margin-left value 'min(1em, 10%)' computes to '20px']
expected: FAIL
[Property margin-left value 'max(1ex + 1%)' computes to '14px']
expected: FAIL
[Property margin-left value 'calc(max(1em, 15%) - 10px)' computes to '50px']
expected: FAIL
[Property margin-left value 'min(1ch + 1%)' computes to '14px']
expected: FAIL
[Property margin-left value 'max(1in + 1%)' computes to '100px']
expected: FAIL
[Property margin-left value 'calc(max(1em, 15%) / 2)' computes to '30px']
expected: FAIL
[Property margin-left value 'min(1pc + 1%)' computes to '20px']
expected: FAIL
[Property margin-left value 'min(1px + 1%)' computes to '5px']
expected: FAIL
[Property margin-left value 'min(1rem + 1%)' computes to '20px']
expected: FAIL
[Property margin-left value 'calc(max(1em, 15%) + 10px)' computes to '70px']
expected: FAIL

View file

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

View file

@ -312,12 +312,6 @@
[<iframe>: separate response Content-Type: */* text/html]
expected: FAIL
[<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 */*]
expected: FAIL
@ -330,3 +324,12 @@
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL

View file

@ -53,15 +53,6 @@
[combined text/javascript ]
expected: FAIL
[separate text/javascript x/x]
expected: FAIL
[separate text/javascript;charset=windows-1252 error text/javascript]
expected: FAIL
[separate text/javascript error]
expected: FAIL
[separate text/javascript;charset=windows-1252 text/javascript]
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,4 +1,4 @@
[traverse_the_history_3.html]
[traverse_the_history_4.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,24 +1,5 @@
[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,24 +1,5 @@
[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,24 +1,5 @@
[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,48 +1,32 @@
[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: TIMEOUT
expected: FAIL
[features "height=405.32" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "height=405e1" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "height=405/5" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "height=405^4" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "height=405.5" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "height=405e-1" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "height=405 " should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "height=405LLl" should set "height=405"]
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
expected: FAIL

View file

@ -1,42 +1,32 @@
[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: TIMEOUT
expected: FAIL
[features "innerheight=405LLl" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405^4" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405e1" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405 " should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405/5" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405.32" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405.5" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405*3" should set "height=405"]
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
expected: FAIL

View file

@ -1,42 +1,32 @@
[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: TIMEOUT
expected: FAIL
[features "innerwidth=405*3" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405.5" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405e1" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405.32" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405 " should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405LLl" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405/5" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405^4" should set "width=405"]
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
expected: FAIL

View file

@ -1,42 +1,32 @@
[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: TIMEOUT
expected: FAIL
[features "screenx=105e1" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105 " should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105*3" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105e-1" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105^4" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105LLl" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105/5" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105.32" should set "left=105"]
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
expected: FAIL

View file

@ -1,42 +1,32 @@
[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: TIMEOUT
expected: FAIL
[features "screeny=405e-1" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405LLl" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405e1" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405 " should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405/5" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405*3" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405.32" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405.5" should set "height=405"]
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
expected: FAIL

View file

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

View file

@ -1,48 +1,32 @@
[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: TIMEOUT
expected: FAIL
[features "width=405.5" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405e1" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405 " should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405.32" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405LLl" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405*3" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405e-1" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405/5" should set "width=405"]
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
expected: FAIL

View file

@ -1,5 +1,11 @@
[embedded-opener-remove-frame.html]
expected: CRASH
expected: TIMEOUT
[opener and "removed" embedded documents]
expected: FAIL
[opener of discarded nested browsing context]
expected: FAIL
[opener of discarded auxiliary browsing context]
expected: TIMEOUT

View file

@ -0,0 +1,7 @@
[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

@ -1,5 +1,4 @@
[promise-rejection-events.html]
expected: TIMEOUT
[delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire]
expected: FAIL
@ -9,6 +8,3 @@
[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,9 @@
[cors-preflight.any.html]
[PerformanceResourceTiming sizes fetch with preflight test]
expected: FAIL
[cors-preflight.any.worker.html]
[PerformanceResourceTiming sizes fetch with preflight test]
expected: FAIL

View file

@ -11,3 +11,6 @@
[The iframe should have one resource timing entry.]
expected: FAIL
[responseEnd should not be 0 in timing-allow cross-origin request.]
expected: FAIL

View file

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

View file

@ -0,0 +1,4 @@
[cross_origin.py]
[test_nested_cross_origin_iframe]
expected: FAIL

View file

@ -5,3 +5,9 @@
[Tests requestSession accepts XRSessionInit dictionary with empty feature lists]
expected: FAIL
[Tests requestSession ignores unknown objects in optionalFeatures]
expected: FAIL
[Tests requestSession ignores unknown strings in optionalFeatures]
expected: FAIL

View file

@ -1,2 +0,0 @@
[Worker-constructor.html]
expected: ERROR

View file

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

View file

@ -20,10 +20,24 @@
<body></body>
<script>
// Because font-variation-settings is specced as a map rather than a list
// (https://github.com/w3c/csswg-drafts/issues/1959), browsers are allowed to
// reorder the output as they see fit.
function compareFontVariationSettings(actual, expected) {
// This is not perfect, but should serve as a reasonable comparison. We split
// the inputs into arrays and trim each characteristic, then sort the array
// and compare them.
const actual_arr = actual.split(',').map(x => x.trim()).sort();
const expected_arr = expected.split(',').map(x => x.trim()).sort();
assert_array_equals(actual_arr, expected_arr);
}
test_interpolation({
property: 'font-variation-settings',
from: neutralKeyframe,
to: '"test" 20',
comparisonFunction: compareFontVariationSettings,
}, [
{at: -0.5, expect: "'test' 5"},
{at: 0, expect: "'test' 10"},
@ -43,6 +57,7 @@ test_interpolation({
property: 'font-variation-settings',
from: 'inherit',
to: "'test' 20",
comparisonFunction: compareFontVariationSettings,
}, [
{at: -0.5, expect: "'test' 35"},
{at: 0, expect: "'test' 30"},
@ -56,6 +71,7 @@ test_interpolation({
property: 'font-variation-settings',
from: 'unset',
to: "'test' 20",
comparisonFunction: compareFontVariationSettings,
}, [
{at: -0.5, expect: "'test' 35"},
{at: 0, expect: "'test' 30"},
@ -75,6 +91,7 @@ test_interpolation({
property: 'font-variation-settings',
from: "'test' 20",
to: "'test' 30",
comparisonFunction: compareFontVariationSettings,
}, [
{at: -0.5, expect: "'test' 15"},
{at: 0, expect: "'test' 20"},
@ -88,6 +105,7 @@ test_interpolation({
property: 'font-variation-settings',
from: "'aaaa' 0, 'bbbb' 10, 'cccc' 20",
to: "'aaaa' 10, 'bbbb' 20, 'cccc' 30",
comparisonFunction: compareFontVariationSettings,
}, [
{at: -0.5, expect: "'aaaa' -5, 'bbbb' 5, 'cccc' 15"},
{at: 0, expect: "'aaaa' 0, 'bbbb' 10, 'cccc' 20"},
@ -97,6 +115,21 @@ test_interpolation({
{at: 1.5, expect: "'aaaa' 15, 'bbbb' 25, 'cccc' 35"},
]);
// font-variation-settings is a map, so any order works.
test_interpolation({
property: 'font-variation-settings',
from: "'aaaa' 0, 'bbbb' 10, 'cccc' 20",
to: "'cccc' 10, 'bbbb' 20, 'aaaa' 30",
comparisonFunction: compareFontVariationSettings,
}, [
{at: -0.5, expect: "'aaaa' -15, 'bbbb' 5, 'cccc' 25"},
{at: 0, expect: "'aaaa' 0, 'bbbb' 10, 'cccc' 20"},
{at: 0.3, expect: "'aaaa' 9, 'bbbb' 13, 'cccc' 17"},
{at: 0.7, expect: "'aaaa' 21, 'bbbb' 17, 'cccc' 13"},
{at: 1, expect: "'aaaa' 30, 'bbbb' 20, 'cccc' 10"},
{at: 1.5, expect: "'aaaa' 45, 'bbbb' 25, 'cccc' 5"},
]);
test_no_interpolation({
property: 'font-variation-settings',
from: "'aaaa' 0, 'bbbb' 10",
@ -109,12 +142,6 @@ test_no_interpolation({
to: "'aaaa' 0, 'bbbb' 10",
});
test_no_interpolation({
property: 'font-variation-settings',
from: "'aaaa' 0, 'bbbb' 10, 'cccc' 20",
to: "'cccc' 10, 'bbbb' 20, 'aaaa' 30",
});
test_no_interpolation({
property: 'font-variation-settings',
from: "'aaaa' 0, 'bbbb' 10, 'cccc' 20",
@ -126,7 +153,9 @@ test_interpolation({
property: 'font-variation-settings',
from: "'aaaa' 30, 'bbbb' 20",
to: "'aaaa' 20, 'bbbb' 30",
comparisonFunction: compareFontVariationSettings,
}, [
{at: 3.40282e+38, expect: "'aaaa' -3.40282e+38, 'bbbb' 3.40282e+38"},
]);
</script>

View file

@ -0,0 +1,84 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#mixed-percentages">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-type-checking">
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/computed-testcommon.js"></script>
<div id="container" style="font-size: 20px; width: 400px">
<div id="target"></div>
<div id="reference"></div>
</div>
<script>
const property = 'margin-left';
function test_length_percent_equals(value, expected) {
const reference = document.getElementById('reference');
reference.style[property] = '';
reference.style[property] = expected;
const computed = getComputedStyle(reference)[property];
test_computed_value(property, value, computed);
}
// Identity tests
test_length_percent_equals('min(1px + 1%)', 'calc(1px + 1%)');
test_length_percent_equals('min(1cm + 1%)', 'calc(1cm + 1%)');
test_length_percent_equals('min(1mm + 1%)', 'calc(1mm + 1%)');
test_length_percent_equals('min(1Q + 1%)', 'calc(1Q + 1%)');
test_length_percent_equals('min(1in + 1%)', 'calc(1in + 1%)');
test_length_percent_equals('min(1pc + 1%)', 'calc(1pc + 1%)');
test_length_percent_equals('min(1pt + 1%)', 'calc(1pt + 1%)');
test_length_percent_equals('min(1em + 1%)', 'calc(1em + 1%)');
test_length_percent_equals('min(1ex + 1%)', 'calc(1ex + 1%)');
test_length_percent_equals('min(1ch + 1%)', 'calc(1ch + 1%)');
test_length_percent_equals('min(1rem + 1%)', 'calc(1rem + 1%)');
test_length_percent_equals('min(1vh + 1%)', 'calc(1vh + 1%)');
test_length_percent_equals('min(1vw + 1%)', 'calc(1vw + 1%)');
test_length_percent_equals('min(1vmin + 1%)', 'calc(1vmin + 1%)');
test_length_percent_equals('min(1vmax + 1%)', 'calc(1vmax + 1%)');
test_length_percent_equals('max(1px + 1%)', 'calc(1px + 1%)');
test_length_percent_equals('max(1cm + 1%)', 'calc(1cm + 1%)');
test_length_percent_equals('max(1mm + 1%)', 'calc(1mm + 1%)');
test_length_percent_equals('max(1Q + 1%)', 'calc(1Q + 1%)');
test_length_percent_equals('max(1in + 1%)', 'calc(1in + 1%)');
test_length_percent_equals('max(1pc + 1%)', 'calc(1pc + 1%)');
test_length_percent_equals('max(1pt + 1%)', 'calc(1pt + 1%)');
test_length_percent_equals('max(1em + 1%)', 'calc(1em + 1%)');
test_length_percent_equals('max(1ex + 1%)', 'calc(1ex + 1%)');
test_length_percent_equals('max(1ch + 1%)', 'calc(1ch + 1%)');
test_length_percent_equals('max(1rem + 1%)', 'calc(1rem + 1%)');
test_length_percent_equals('max(1vh + 1%)', 'calc(1vh + 1%)');
test_length_percent_equals('max(1vw + 1%)', 'calc(1vw + 1%)');
test_length_percent_equals('max(1vmin + 1%)', 'calc(1vmin + 1%)');
test_length_percent_equals('max(1vmax + 1%)', 'calc(1vmax + 1%)');
// Comparisons between lengths and percentages
test_length_percent_equals('min(20px, 10%)', '20px');
test_length_percent_equals('min(1em, 10%)', '20px');
test_length_percent_equals('max(20px, 10%)', '40px');
test_length_percent_equals('max(1em, 10%)', '40px');
document.getElementById('container').style.width = '100px';
test_length_percent_equals('min(20px, 10%)', '10px');
test_length_percent_equals('min(1em, 10%)', '10px');
test_length_percent_equals('max(20px, 10%)', '20px');
test_length_percent_equals('max(1em, 10%)', '20px');
document.getElementById('container').style.width = '400px';
// Comparisons between different mixings
test_length_percent_equals('min(30px + 10%, 60px + 5%)', '70px');
test_length_percent_equals('max(2em + 10%, 1em + 20%)', '100px');
// General calculations
test_length_percent_equals('calc(min(1.5em, 10%) + 10px)', '40px');
test_length_percent_equals('calc(min(1.5em, 10%) - 10px)', '20px');
test_length_percent_equals('calc(min(1.5em, 10%) * 2)', '60px');
test_length_percent_equals('calc(min(1.5em, 10%) / 2)', '15px');
test_length_percent_equals('calc(max(1em, 15%) + 10px)', '70px');
test_length_percent_equals('calc(max(1em, 15%) - 10px)', '50px');
test_length_percent_equals('calc(max(1em, 15%) * 2)', '120px');
test_length_percent_equals('calc(max(1em, 15%) / 2)', '30px');
test_length_percent_equals('calc(min(1.5em, 10%) + max(1em, 15%))', '90px');
test_length_percent_equals('calc(min(1.5em, 10%) - max(1em, 15%))', '-30px');
</script>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#mixed-percentages">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-type-checking">
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script>
function test_invalid_length_percent(value) {
test_invalid_value('margin-left', value);
}
// Type checking only. Syntax checking is done by other test files.
// <length-percentage> accepts mixing lengths and percentages only.
test_invalid_length_percent('min(1px, 0)');
test_invalid_length_percent('min(1px, 0s)');
test_invalid_length_percent('min(1px, 0Hz)');
test_invalid_length_percent('min(1px, 0dpi)');
test_invalid_length_percent('min(1px, 0fr)');
test_invalid_length_percent('min(1%, 0)');
test_invalid_length_percent('min(1%, 0s)');
test_invalid_length_percent('min(1%, 0Hz)');
test_invalid_length_percent('min(1%, 0dpi)');
test_invalid_length_percent('min(1%, 0fr)');
test_invalid_length_percent('max(1px, 0)');
test_invalid_length_percent('max(1px, 0s)');
test_invalid_length_percent('max(1px, 0Hz)');
test_invalid_length_percent('max(1px, 0dpi)');
test_invalid_length_percent('max(1px, 0fr)');
test_invalid_length_percent('max(1%, 0)');
test_invalid_length_percent('max(1%, 0s)');
test_invalid_length_percent('max(1%, 0Hz)');
test_invalid_length_percent('max(1%, 0dpi)');
test_invalid_length_percent('max(1%, 0fr)');
</script>

View file

@ -10,14 +10,11 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<style>
body {
width: 500px;
height: 500px;
transform: rotate(0deg);
.parent {
offset-anchor: 30px 10px;
}
div {
width: 10px;
height: 10px;
.target {
offset-anchor: 10px 30px;
}
</style>
</head>
@ -67,6 +64,63 @@
from: 'right 10px top 20%',
to: 'auto'
});
test_interpolation({
property: 'offset-anchor',
from: neutralKeyframe,
to: '20px 20px',
}, [
{at: -0.3, expect: '7px 33px'},
{at: 0, expect: '10px 30px'},
{at: 0.3, expect: '13px 27px'},
{at: 0.6, expect: '16px 24px'},
{at: 1, expect: '20px 20px'},
{at: 1.5, expect: '25px 15px'},
]);
test_no_interpolation({
property: 'offset-anchor',
from: 'initial',
to: '60% 40%',
});
test_interpolation({
property: 'offset-anchor',
from: 'inherit',
to: '20px 20px',
}, [
{at: -0.3, expect: '33px 7px'},
{at: 0, expect: '30px 10px'},
{at: 0.3, expect: '27px 13px'},
{at: 0.6, expect: '24px 16px'},
{at: 1, expect: '20px 20px'},
{at: 1.5, expect: '15px 25px'},
]);
test_no_interpolation({
property: 'offset-anchor',
from: 'unset',
to: '50% 10px',
});
test_interpolation({
property: 'offset-anchor',
from: '0% 50%',
to: '100% 150%'
}, [
{at: -0.3, expect: '-30% 20%'},
{at: 0, expect: '0% 50%'},
{at: 0.3, expect: '30% 80%'},
{at: 0.6, expect: '60% 110%'},
{at: 1, expect: '100% 150%'},
{at: 1.5, expect: '150% 200%'}
]);
test_no_interpolation({
property: 'offset-anchor',
from: 'auto',
to: '20px 20px',
});
</script>
</body>
</html>

View file

@ -10,6 +10,21 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
</head>
<style>
.parent {
offset-distance: 30px;
}
.target {
width: 10px;
height: 10px;
background-color: black;
offset-path: path("M0 0H 400");
offset-distance: 10px;
}
.expected {
background-color: green;
}
</style>
<body>
<script>
test_interpolation({
@ -50,6 +65,71 @@
{at: 1, expect: 'calc(50px + 100%)'},
{at: 2, expect: 'calc(130px + 180%)'}
]);
test_interpolation({
property: 'offset-distance',
from: neutralKeyframe,
to: '20px',
}, [
{at: -0.3, expect: '7px'},
{at: 0, expect: '10px'},
{at: 0.3, expect: '13px'},
{at: 0.6, expect: '16px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '25px'},
]);
test_interpolation({
property: 'offset-distance',
from: 'initial',
to: '20px',
}, [
{at: -0.3, expect: '-6px'},
{at: 0, expect: '0px'},
{at: 0.3, expect: '6px'},
{at: 0.6, expect: '12px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '30px'},
]);
test_interpolation({
property: 'offset-distance',
from: 'inherit',
to: '20px',
}, [
{at: -0.3, expect: '33px'},
{at: 0, expect: '30px'},
{at: 0.3, expect: '27px'},
{at: 0.6, expect: '24px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '15px'},
]);
test_interpolation({
property: 'offset-distance',
from: 'unset',
to: '20px',
}, [
{at: -0.3, expect: '-6px'},
{at: 0, expect: '0px'},
{at: 0.3, expect: '6px'},
{at: 0.6, expect: '12px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '30px'},
]);
test_interpolation({
property: 'offset-distance',
from: '10px',
to: '100%',
}, [
{at: -0.3, expect: 'calc(13px + -30%)'},
{at: 0, expect: 'calc(0% + 10px)'},
{at: 0.3, expect: 'calc(7px + 30%)'},
{at: 0.6, expect: 'calc(4px + 60%)'},
{at: 1, expect: '100%'},
{at: 1.5, expect: 'calc(-5px + 150%)'},
]);
</script>
</body>
</html>

View file

@ -0,0 +1,106 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-shorthand">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
</head>
<body>
<script>
test_interpolation({
property: 'offset',
from: 'path("M0 200H 700") 500px 800deg',
to: 'path("M0 300H 700 Z") 600px 900deg',
method: 'CSS Transitions',
}, [
{at: -0.3, expect: 'path("M0 300H 700 Z") 470px 770deg'},
{at: 0, expect: 'path("M0 300H 700 Z") 500px 800deg'},
{at: 0.3, expect: 'path("M0 300H 700 Z") 530px 830deg'},
{at: 0.6, expect: 'path("M0 300H 700 Z") 560px 860deg'},
{at: 1, expect: 'path("M0 300H 700 Z") 600px 900deg'},
{at: 1.5, expect: 'path("M0 300H 700 Z") 650px 950deg'},
]);
test_interpolation({
property: 'offset',
from: 'path("M0 0H 200") 500px auto',
to: 'path("M0 0H 300") 600px 0deg',
method: 'CSS Transitions',
}, [
{at: -0.3, expect: 'path("M0 0H 170") 470px 0deg'},
{at: 0, expect: 'path("M0 0H 200") 500px 0deg'},
{at: 0.3, expect: 'path("M0 0H 230") 530px 0deg'},
{at: 0.6, expect: 'path("M0 0H 260") 560px 0deg'},
{at: 1, expect: 'path("M0 0H 300") 600px 0deg'},
{at: 1.5, expect: 'path("M0 0H 350") 650px 0deg'},
]);
test_interpolation({
property: 'offset',
from: 'path("M0 200H 700") 500px 800deg',
to: 'path("M0 300H 700 Z") 600px 900deg',
method: 'CSS Animations',
}, [
{at: -0.3, expect: 'path("M0 200H 700") 470px 770deg'},
{at: 0, expect: 'path("M0 200H 700") 500px 800deg'},
{at: 0.3, expect: 'path("M0 200H 700") 530px 830deg'},
{at: 0.6, expect: 'path("M0 300H 700 Z") 560px 860deg'},
{at: 1, expect: 'path("M0 300H 700 Z") 600px 900deg'},
{at: 1.5, expect: 'path("M0 300H 700 Z") 650px 950deg'},
]);
test_interpolation({
property: 'offset',
from: 'path("M0 0H 200") 500px auto',
to: 'path("M0 0H 300") 600px 0deg',
method: 'CSS Animations',
}, [
{at: -0.3, expect: 'path("M0 0H 170") 470px auto'},
{at: 0, expect: 'path("M0 0H 200") 500px auto'},
{at: 0.3, expect: 'path("M0 0H 230") 530px auto'},
{at: 0.6, expect: 'path("M0 0H 260") 560px 0deg'},
{at: 1, expect: 'path("M0 0H 300") 600px 0deg'},
{at: 1.5, expect: 'path("M0 0H 350") 650px 0deg'},
]);
test_interpolation({
property: 'offset',
from: 'path("M0 200H 700") 500px 800deg',
to: 'path("M0 300H 700 Z") 600px 900deg',
method: 'Web Animations',
}, [
{at: -0.3, expect: 'path("M0 200H 700") 470px 770deg'},
{at: 0, expect: 'path("M0 200H 700") 500px 800deg'},
{at: 0.3, expect: 'path("M0 200H 700") 530px 830deg'},
{at: 0.6, expect: 'path("M0 300H 700 Z") 560px 860deg'},
{at: 1, expect: 'path("M0 300H 700 Z") 600px 900deg'},
{at: 1.5, expect: 'path("M0 300H 700 Z") 650px 950deg'},
]);
test_interpolation({
property: 'offset',
from: 'path("M0 0V 200") 500px auto',
to: 'path("M0 0H 300") 600px 0deg',
method: 'Web Animations',
}, [
{at: -0.3, expect: 'path("M0 0V 200") 470px auto'},
{at: 0, expect: 'path("M0 0V 200") 500px auto'},
{at: 0.3, expect: 'path("M0 0V 200") 530px auto'},
{at: 0.6, expect: 'path("M0 0H 300") 560px 0deg'},
{at: 1, expect: 'path("M0 0H 300") 600px 0deg'},
{at: 1.5, expect: 'path("M0 0H 300") 650px 0deg'},
]);
// Regression test for crbug.com/994489
test_interpolation({
property: 'offset',
from: 'path("M0 0H 200") 500px auto',
to: 'path("M0 0H 300") 600px 0deg',
}, [
{at: 3.40282e+038, expect: 'path("M0 0H 3.4e+38") 3.36e+07px 0deg'},
]);
</script>
</body>
</html>

View file

@ -10,6 +10,14 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
</head>
<style>
.parent {
offset-path: ray(30deg closest-side);
}
.target {
offset-path: ray(10deg closest-side);
}
</style>
<body>
<script>
'use strict';
@ -26,6 +34,48 @@
to: "none",
});
// Neutral keyframes use the inline style.
test_interpolation({
property: 'offset-path',
from: neutralKeyframe,
to: 'ray(20deg closest-side)',
}, [
{at: -0.3, expect: 'ray(7deg closest-side)'},
{at: 0, expect: 'ray(10deg closest-side)'},
{at: 0.3, expect: 'ray(13deg closest-side)'},
{at: 0.6, expect: 'ray(16deg closest-side)'},
{at: 1, expect: 'ray(20deg closest-side)'},
{at: 1.5, expect: 'ray(25deg closest-side)'},
]);
// No interpolation to a ray from the initial value 'none'.
test_no_interpolation({
property: 'offset-path',
from: 'initial',
to: 'ray(20deg closest-side)',
});
// 'inherit' keyframes use the parent style.
test_interpolation({
property: 'offset-path',
from: 'inherit',
to: 'ray(20deg closest-side)',
}, [
{at: -0.3, expect: 'ray(33deg closest-side)'},
{at: 0, expect: 'ray(30deg closest-side)'},
{at: 0.3, expect: 'ray(27deg closest-side)'},
{at: 0.6, expect: 'ray(24deg closest-side)'},
{at: 1, expect: 'ray(20deg closest-side)'},
{at: 1.5, expect: 'ray(15deg closest-side)'},
]);
// No interpolation to a ray from the initial value 'none'.
test_no_interpolation({
property: 'offset-path',
from: 'unset',
to: 'ray(20deg closest-side)',
});
// No interpolation to a ray from the initial value 'none'.
test_no_interpolation({
property: 'offset-path',

View file

@ -10,14 +10,11 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<style>
body {
width: 500px;
height: 500px;
transform: rotate(0deg);
.parent {
offset-position: 30px 10px;
}
div {
width: 10px;
height: 10px;
.target {
offset-position: 10px 30px;
}
</style>
</head>
@ -67,6 +64,63 @@
from: 'right 10px top 20%',
to: 'auto'
});
test_interpolation({
property: 'offset-position',
from: neutralKeyframe,
to: '20px 20px',
}, [
{at: -0.3, expect: '7px 33px'},
{at: 0, expect: '10px 30px'},
{at: 0.3, expect: '13px 27px'},
{at: 0.6, expect: '16px 24px'},
{at: 1, expect: '20px 20px'},
{at: 1.5, expect: '25px 15px'},
]);
test_no_interpolation({
property: 'offset-position',
from: 'initial',
to: '20px 20px',
});
test_interpolation({
property: 'offset-position',
from: 'inherit',
to: '20px 20px',
}, [
{at: -0.3, expect: '33px 7px'},
{at: 0, expect: '30px 10px'},
{at: 0.3, expect: '27px 13px'},
{at: 0.6, expect: '24px 16px'},
{at: 1, expect: '20px 20px'},
{at: 1.5, expect: '15px 25px'},
]);
test_no_interpolation({
property: 'offset-position',
from: 'unset',
to: '20px 20px',
});
test_interpolation({
property: 'offset-position',
from: '0% 50%',
to: '100% 150%'
}, [
{at: -0.3, expect: '-30% 20%'},
{at: 0, expect: '0% 50%'},
{at: 0.3, expect: '30% 80%'},
{at: 0.6, expect: '60% 110%'},
{at: 1, expect: '100% 150%'},
{at: 1.5, expect: '150% 200%'}
]);
test_no_interpolation({
property: 'offset-position',
from: 'auto',
to: '20px 20px',
});
</script>
</body>
</html>

View file

@ -10,6 +10,23 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
</head>
<style>
.parent {
offset-rotate: 30deg;
}
.target {
width: 80px;
height: 80px;
display: inline-block;
background-color: black;
margin-right: 5px;
offset-rotate: 10deg;
}
.expected {
background-color: green;
margin-right: 15px;
}
</style>
<body>
<script>
test_interpolation({
@ -89,6 +106,137 @@
from: '6rad',
to: 'auto',
});
// Neutral keyframes use the inline style.
test_interpolation({
property: 'offset-rotate',
from: neutralKeyframe,
to: '20deg',
}, [
{at: -0.3, expect: '7deg'},
{at: 0, expect: '10deg'},
{at: 0.3, expect: '13deg'},
{at: 0.6, expect: '16deg'},
{at: 1, expect: '20deg'},
{at: 1.5, expect: '25deg'},
]);
// No interpolation to an angle from the initial value 'auto'.
test_no_interpolation({
property: 'offset-rotate',
from: 'initial',
to: '20deg',
});
// 'inherit' keyframes use the parent style.
test_interpolation({
property: 'offset-rotate',
from: 'inherit',
to: '20deg',
}, [
{at: -0.3, expect: '33deg'},
{at: 0, expect: '30deg'},
{at: 0.3, expect: '27deg'},
{at: 0.6, expect: '24deg'},
{at: 1, expect: '20deg'},
{at: 1.5, expect: '15deg'},
]);
// No interpolation to an angle from the initial value 'auto'.
test_no_interpolation({
property: 'offset-rotate',
from: 'unset',
to: '20deg',
});
// Interpolation between angles.
test_interpolation({
property: 'offset-rotate',
from: '10deg',
to: '50deg'
}, [
{at: -0.3, expect: '-2deg'},
{at: 0, expect: '10deg'},
{at: 0.3, expect: '22deg'},
{at: 0.6, expect: '34deg'},
{at: 1, expect: '50deg'},
{at: 1.5, expect: '70deg'},
]);
// Regression test for crbug.com/918430.
test_interpolation({
property: 'offset-rotate',
from: '800deg',
to: '900deg'
}, [
{at: -3.40282e+38, expect: '-3.40282e+38deg'},
]);
// Interpolation between auto angles.
test_interpolation({
property: 'offset-rotate',
from: 'auto 10deg',
to: 'auto 50deg'
}, [
{at: -0.3, expect: 'auto -2deg'},
{at: 0, expect: 'auto 10deg'},
{at: 0.3, expect: 'auto 22deg'},
{at: 0.6, expect: 'auto 34deg'},
{at: 1, expect: 'auto 50deg'},
{at: 1.5, expect: 'auto 70deg'},
]);
// 'reverse' is like 'auto 180deg'.
test_interpolation({
property: 'offset-rotate',
from: 'reverse -170deg',
to: 'reverse -130deg'
}, [
{at: -0.3, expect: 'auto -2deg'},
{at: 0, expect: 'auto 10deg'},
{at: 0.3, expect: 'auto 22deg'},
{at: 0.6, expect: 'auto 34deg'},
{at: 1, expect: 'auto 50deg'},
{at: 1.5, expect: 'auto 70deg'},
]);
// Interpolation between 'auto' and 'reverse'.
test_interpolation({
property: 'offset-rotate',
from: 'auto 10deg',
to: 'reverse -130deg'
}, [
{at: -0.3, expect: 'auto -2deg'},
{at: 0, expect: 'auto 10deg'},
{at: 0.3, expect: 'auto 22deg'},
{at: 0.6, expect: 'auto 34deg'},
{at: 1, expect: 'auto 50deg'},
{at: 1.5, expect: 'auto 70deg'},
]);
test_interpolation({
property: 'offset-rotate',
from: 'reverse -170deg',
to: 'auto 50deg'
}, [
{at: -0.3, expect: 'auto -2deg'},
{at: 0, expect: 'auto 10deg'},
{at: 0.3, expect: 'auto 22deg'},
{at: 0.6, expect: 'auto 34deg'},
{at: 1, expect: 'auto 50deg'},
{at: 1.5, expect: 'auto 70deg'},
]);
// No interpolation between auto/reverse and angle.
test_no_interpolation({
property: 'offset-rotate',
from: 'auto 200deg',
to: '300deg'
});
test_no_interpolation({
property: 'offset-rotate',
from: '300deg',
to: 'reverse 20deg'
});
</script>
</body>
</html>

View file

@ -11,14 +11,12 @@
return keyframe === neutralKeyframe;
}
// For all the CSS interpolation methods, we set the animation duration very
// very long so that any advancement in time that does happen is irrelevant
// in terms of the progress value. In particular, the animation duration is
// 2e9s which is ~63 years.
// We then set the delay to be *negative* half the duration, so we are
// immediately at the halfway point of the animation. Finally, we using an
// easing function that maps halfway (0.5) to whatever progress we actually
// want.
// For the CSS interpolation methods, we set the animation duration long
// enough that any advancement in time during the test is irrelevant in terms
// of the progress. We then set the delay to be negative half the duration, so
// we are immediately at the halfway point of the animation. Finally, we use
// an easing function that maps halfway to whatever progress we actually want.
var cssAnimationsInterpolation = {
name: 'CSS Animations',
supportsProperty: function() {return true;},
@ -233,12 +231,15 @@
var property = interpolationTest.options.property;
var from = interpolationTest.options.from;
var to = interpolationTest.options.to;
var comparisonFunction = interpolationTest.options.comparisonFunction;
if ((interpolationTest.options.method && interpolationTest.options.method != interpolationMethod.name)
|| !interpolationMethod.supportsProperty(property)
|| !interpolationMethod.supportsValue(from)
|| !interpolationMethod.supportsValue(to)) {
return;
}
var testText = `${interpolationMethod.name}: property <${property}> from ${keyframeText(from)} to ${keyframeText(to)}`;
var testContainer = createElement(interpolationMethodContainer, 'div');
createElement(testContainer);
@ -246,6 +247,14 @@
if (expectations === expectNoInterpolation) {
expectations = interpolationMethod.nonInterpolationExpectations(from, to);
}
// Setup a standard equality function if an override is not provided.
if (!comparisonFunction) {
comparisonFunction = (actual, expected) => {
assert_equals(normalizeValue(actual), normalizeValue(expected));
};
}
return expectations.map(function(expectation) {
var actualTargetContainer = createTargetContainer(testContainer, 'actual');
var expectedTargetContainer = createTargetContainer(testContainer, 'expected');
@ -270,9 +279,9 @@
assert_true(CSS.supports(property, underlying), '\'underlying\' value should be supported');
}
assert_equals(
normalizeValue(getComputedStyle(target).getPropertyValue(property)),
normalizeValue(expectedValue));
comparisonFunction(
getComputedStyle(target).getPropertyValue(property),
expectedValue);
}, `${testText} at (${expectation.at}) should be [${sanitizeUrls(expectedValue)}]`);
};
return target;
@ -314,6 +323,7 @@
container.remove();
interpolationTests = [];
}
window.test_interpolation = test_interpolation;
window.test_no_interpolation = test_no_interpolation;
window.neutralKeyframe = neutralKeyframe;

View file

@ -0,0 +1,2 @@
[reftest_fuzzy_chain_ini.html]
fuzzy: maxDifference=255;100-100

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<!-- This will only match with the fuzzy set in the ini file -->
<link rel="match" href="fuzzy-ref-2a.html">
<style>
div {
width: 100px;
height: 100px;
background-color: green;
}
</style>
<div></div>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<style>
div {
width: 101px;
height: 100px;
background-color: green;
}
</style>
<div></div>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<link rel=match href=fuzzy-ref-2.html>
<!-- The metadata is added to the corresponding ini file -->
<style>
div {
width: 99px;
height: 100px;
background-color: green;
}
</style>
<div></div>

View file

@ -3,6 +3,7 @@
// (https://github.com/tidoust/reffy-reports)
// Source: Element Timing API (https://wicg.github.io/element-timing/)
[Exposed=Window]
interface PerformanceElementTiming : PerformanceEntry {
readonly attribute DOMHighResTimeStamp renderTime;
readonly attribute DOMHighResTimeStamp loadTime;

View file

@ -3,6 +3,7 @@
// (https://github.com/tidoust/reffy-reports)
// Source: Largest Contentful Paint (https://wicg.github.io/largest-contentful-paint/)
[Exposed=Window]
interface LargestContentfulPaint : PerformanceEntry {
readonly attribute DOMHighResTimeStamp renderTime;
readonly attribute DOMHighResTimeStamp loadTime;

View file

@ -3,6 +3,7 @@
// (https://github.com/tidoust/reffy-reports)
// Source: Layout Instability API (https://wicg.github.io/layout-instability/)
[Exposed=Window]
interface LayoutShift : PerformanceEntry {
readonly attribute long value;
readonly attribute boolean hadRecentInput;

View file

@ -3,11 +3,13 @@
// (https://github.com/tidoust/reffy-reports)
// Source: Long Tasks API 1 (https://w3c.github.io/longtasks/)
[Exposed=Window]
interface PerformanceLongTaskTiming : PerformanceEntry {
readonly attribute FrozenArray<TaskAttributionTiming> attribution;
[Default] object toJSON();
};
[Exposed=Window]
interface TaskAttributionTiming : PerformanceEntry {
readonly attribute DOMString containerType;
readonly attribute DOMString containerSrc;

View file

@ -7,6 +7,7 @@ partial interface HTMLVideoElement {
VideoPlaybackQuality getVideoPlaybackQuality();
};
[Exposed=Window]
interface VideoPlaybackQuality {
readonly attribute DOMHighResTimeStamp creationTime;
readonly attribute unsigned long corruptedVideoFrames;

View file

@ -4,7 +4,7 @@
// Source: Screen Capture (https://w3c.github.io/mediacapture-screen-share/)
partial interface MediaDevices {
Promise<MediaStream> getDisplayMedia(optional DisplayMediaStreamConstraints constraints);
Promise<MediaStream> getDisplayMedia (optional DisplayMediaStreamConstraints constraints = {});
};
dictionary DisplayMediaStreamConstraints {

View file

@ -22,7 +22,7 @@ dictionary ScrollTimelineOptions {
};
[Exposed=Window,
Constructor(optional ScrollTimelineOptions options)]
Constructor(optional ScrollTimelineOptions options = {})]
interface ScrollTimeline : AnimationTimeline {
readonly attribute Element scrollSource;
readonly attribute ScrollDirection orientation;

View file

@ -45,6 +45,7 @@ interface Touch {
readonly attribute TouchType touchType;
};
[Exposed=Window]
interface TouchList {
readonly attribute unsigned long length;
getter Touch? item(unsigned long index);
@ -56,7 +57,7 @@ dictionary TouchEventInit : EventModifierInit {
sequence<Touch> changedTouches = [];
};
[Constructor(DOMString type, optional TouchEventInit eventInitDict), Exposed=Window]
[Constructor(DOMString type, optional TouchEventInit eventInitDict = {}), Exposed=Window]
interface TouchEvent : UIEvent {
readonly attribute TouchList touches;
readonly attribute TouchList targetTouches;

View file

@ -13,7 +13,7 @@ dictionary DocumentTimelineOptions {
};
[Exposed=Window,
Constructor(optional DocumentTimelineOptions options)]
Constructor(optional DocumentTimelineOptions options = {})]
interface DocumentTimeline : AnimationTimeline {
};
@ -53,7 +53,7 @@ enum AnimationReplaceState { "active", "removed", "persisted" };
interface AnimationEffect {
EffectTiming getTiming();
ComputedEffectTiming getComputedTiming();
void updateTiming(optional OptionalEffectTiming timing);
void updateTiming(optional OptionalEffectTiming timing = {});
};
dictionary EffectTiming {
@ -93,7 +93,7 @@ dictionary ComputedEffectTiming : EffectTiming {
[Exposed=Window,
Constructor((Element or CSSPseudoElement)? target,
object? keyframes,
optional (unrestricted double or KeyframeEffectOptions) options),
optional (unrestricted double or KeyframeEffectOptions) options = {}),
Constructor(KeyframeEffect source)]
interface KeyframeEffect : AnimationEffect {
attribute (Element or CSSPseudoElement)? target;
@ -135,8 +135,8 @@ enum CompositeOperationOrAuto { "replace", "add", "accumulate", "auto" };
interface mixin Animatable {
Animation animate(object? keyframes,
optional (unrestricted double or KeyframeAnimationOptions) options);
sequence<Animation> getAnimations(optional GetAnimationsOptions options);
optional (unrestricted double or KeyframeAnimationOptions) options = {});
sequence<Animation> getAnimations(optional GetAnimationsOptions options = {});
};
dictionary KeyframeAnimationOptions : KeyframeEffectOptions {
@ -160,7 +160,7 @@ Element includes Animatable;
CSSPseudoElement includes Animatable;
[Exposed=Window,
Constructor(DOMString type, optional AnimationPlaybackEventInit eventInitDict)]
Constructor(DOMString type, optional AnimationPlaybackEventInit eventInitDict = {})]
interface AnimationPlaybackEvent : Event {
readonly attribute double? currentTime;
readonly attribute double? timelineTime;

View file

@ -4,7 +4,7 @@
// Source: Web MIDI API (http://webaudio.github.io/web-midi-api/)
partial interface Navigator {
[SecureContext] Promise<MIDIAccess> requestMIDIAccess(optional MIDIOptions options);
[SecureContext] Promise <MIDIAccess> requestMIDIAccess(optional MIDIOptions options = {});
};
dictionary MIDIOptions {
@ -12,22 +12,22 @@ dictionary MIDIOptions {
boolean software;
};
[SecureContext] interface MIDIInputMap {
[SecureContext, Exposed=Window] interface MIDIInputMap {
readonly maplike<DOMString, MIDIInput>;
};
[SecureContext] interface MIDIOutputMap {
[SecureContext, Exposed=Window] interface MIDIOutputMap {
readonly maplike<DOMString, MIDIOutput>;
};
[SecureContext] interface MIDIAccess : EventTarget {
[SecureContext, Exposed=Window] interface MIDIAccess : EventTarget {
readonly attribute MIDIInputMap inputs;
readonly attribute MIDIOutputMap outputs;
attribute EventHandler onstatechange;
readonly attribute boolean sysexEnabled;
};
[SecureContext] interface MIDIPort : EventTarget {
[SecureContext, Exposed=Window] interface MIDIPort : EventTarget {
readonly attribute DOMString id;
readonly attribute DOMString? manufacturer;
readonly attribute DOMString? name;
@ -40,11 +40,11 @@ dictionary MIDIOptions {
Promise<MIDIPort> close();
};
[SecureContext] interface MIDIInput : MIDIPort {
[SecureContext, Exposed=Window] interface MIDIInput : MIDIPort {
attribute EventHandler onmidimessage;
};
[SecureContext] interface MIDIOutput : MIDIPort {
[SecureContext, Exposed=Window] interface MIDIOutput : MIDIPort {
void send(sequence<octet> data, optional DOMHighResTimeStamp timestamp = 0);
void clear();
};
@ -65,7 +65,7 @@ enum MIDIPortConnectionState {
"pending",
};
[SecureContext, Constructor(DOMString type, optional MIDIMessageEventInit eventInitDict)]
[SecureContext, Exposed=Window, Constructor(DOMString type, optional MIDIMessageEventInit eventInitDict = {})]
interface MIDIMessageEvent : Event {
readonly attribute Uint8Array data;
};
@ -74,7 +74,7 @@ dictionary MIDIMessageEventInit : EventInit {
Uint8Array data;
};
[SecureContext, Constructor(DOMString type, optional MIDIConnectionEventInit eventInitDict)]
[SecureContext, Exposed=Window, Constructor(DOMString type, optional MIDIConnectionEventInit eventInitDict = {})]
interface MIDIConnectionEvent : Event {
readonly attribute MIDIPort port;
};

View file

@ -0,0 +1,33 @@
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
// Because apache decrements the Keep-Alive max value on each request, the
// transferSize will vary slightly between requests for the same resource.
const fuzzFactor = 3; // bytes
const hostInfo = get_host_info();
const url = new URL('/resource-timing/resources/preflight.py', hostInfo['HTTP_REMOTE_ORIGIN']).href;
// The header bytes are expected to be > |minHeaderSize| and
// < |maxHeaderSize|. If they are outside this range the test will fail.
const minHeaderSize = 100;
const maxHeaderSize = 1024;
function checkResourceSizes() {
const entries = performance.getEntriesByName(url);
assert_equals(entries.length, 2, 'Wrong number of entries');
assert_greater_than(entries[0].transferSize, 0, 'No-preflight transferSize');
const lowerBound = entries[0].transferSize - fuzzFactor;
const upperBound = entries[0].transferSize + fuzzFactor;
assert_between_exclusive(entries[1].transferSize, lowerBound, upperBound, 'Preflighted transferSize');
}
promise_test(() => {
const eatBody = response => response.arrayBuffer();
const requirePreflight = {headers: {'X-Require-Preflight' : '1'}};
return fetch(url)
.then(eatBody)
.then(() => fetch(url, requirePreflight))
.then(eatBody)
.then(checkResourceSizes);
}, 'PerformanceResourceTiming sizes fetch with preflight test');

View file

@ -0,0 +1,8 @@
def main(request, response):
response.headers.set("Access-Control-Allow-Origin", "*");
response.headers.set("Access-Control-Max-Age", "0");
response.headers.set("Timing-Allow-Origin", "*");
# If this script is accessed with the header X-Require-Preflight then the
# browser will send a preflight request. Otherwise it won't.
if request.method == 'OPTIONS':
response.headers.set("Access-Control-Allow-Headers", "X-Require-Preflight");

View file

@ -109,7 +109,7 @@ def get_parser():
def start_userspace_oom_killer():
# Start userspace OOM killer: https://github.com/rfjakob/earlyoom
# It will report memory usage every minute and prefer to kill browsers.
start(["sudo", "earlyoom", "-p", "-r", "60" "--prefer=(chrome|firefox)", "--avoid=python"])
start(["sudo", "earlyoom", "-p", "-r", "60", "--prefer=(chrome|firefox)", "--avoid=python"])
def make_hosts_file():

View file

@ -102,6 +102,10 @@ server: http://localhost:{0}""".format(self.server.port).encode("ascii")
resp = self.request("/sub_url_base.sub.txt")
self.assertEqual(resp.read().rstrip(), b"Before / After")
def test_sub_url_base_via_filename_with_query(self):
resp = self.request("/sub_url_base.sub.txt?pipe=slice(5,10)")
self.assertEqual(resp.read().rstrip(), b"e / A")
def test_sub_uuid(self):
resp = self.request("/sub_uuid.sub.txt")
self.assertRegexpMatches(resp.read().rstrip(), b"Before [a-f0-9-]+ After")

View file

@ -105,17 +105,21 @@ class DirectoryHandler(object):
def wrap_pipeline(path, request, response):
query = parse_qs(request.url_parts.query)
pipe_string = ""
pipeline = None
if "pipe" in query:
pipeline = Pipeline(query["pipe"][-1])
elif ".sub." in path:
if ".sub." in path:
ml_extensions = {".html", ".htm", ".xht", ".xhtml", ".xml", ".svg"}
escape_type = "html" if os.path.splitext(path)[1] in ml_extensions else "none"
pipeline = Pipeline("sub(%s)" % escape_type)
pipe_string = "sub(%s)" % escape_type
if pipeline is not None:
response = pipeline(request, response)
if "pipe" in query:
if pipe_string:
pipe_string += "|"
pipe_string += query["pipe"][-1]
if pipe_string:
response = Pipeline(pipe_string)(request, response)
return response

View file

@ -168,10 +168,10 @@ def current_session():
@pytest.fixture
def url(server_config):
def inner(path, protocol="http", subdomain="", query="", fragment=""):
domain = server_config["domains"][""][subdomain]
def inner(path, protocol="http", domain="", subdomain="", query="", fragment=""):
domain = server_config["domains"][domain][subdomain]
port = server_config["ports"][protocol][0]
host = "%s:%s" % (domain, port)
host = "{0}:{1}".format(domain, port)
return urlparse.urlunsplit((protocol, host, path, query, fragment))
inner.__name__ = "url"

View file

@ -1,11 +1,10 @@
from urlparse import urlparse
import webdriver.protocol as protocol
from tests.support.asserts import assert_success
from tests.support.helpers import document_location
from tests.support.inline import (
iframe,
inline,
)
from tests.support.inline import iframe, inline
"""
@ -29,32 +28,37 @@ def switch_to_frame(session, frame):
def test_cross_origin_iframe(session, server_config):
session.url = inline(iframe("", subdomain="www"))
session.url = inline(iframe("", domain="alt"))
frame_element = session.find.css("iframe", all=False)
response = switch_to_frame(session, frame_element)
value = assert_success(response)
assert document_location(session).startswith(
"http://www.{}".format(server_config["browser_host"]))
assert_success(response)
parse_result = urlparse(document_location(session))
assert parse_result.netloc != server_config["browser_host"]
def test_nested_cross_origin_iframe(session, server_config):
frame2 = iframe("", subdomain="www.www")
frame1 = iframe(frame2, subdomain="www")
top_doc = inline(frame1, subdomain="")
frame2 = iframe("", domain="alt", subdomain="www")
frame1 = iframe(frame2)
top_doc = inline(frame1, domain="alt")
session.url = top_doc
assert document_location(session).startswith(
"http://{}".format(server_config["browser_host"]))
frame1_el = session.find.css("iframe", all=False)
response = switch_to_frame(session, frame1_el)
value = assert_success(response)
assert document_location(session).startswith(
"http://www.{}".format(server_config["browser_host"]))
parse_result = urlparse(document_location(session))
top_level_host = parse_result.netloc
assert not top_level_host.startswith(server_config["browser_host"])
frame1_element = session.find.css("iframe", all=False)
response = switch_to_frame(session, frame1_element)
assert_success(response)
parse_result = urlparse(document_location(session))
assert parse_result.netloc.startswith(server_config["browser_host"])
frame2_el = session.find.css("iframe", all=False)
response = switch_to_frame(session, frame2_el)
value = assert_success(response)
assert document_location(session).startswith(
"http://www.www.{}".format(server_config["browser_host"]))
assert_success(response)
parse_result = urlparse(document_location(session))
assert parse_result.netloc == "www.{}".format(top_level_host)

View file

@ -81,7 +81,6 @@
assert_equals(typeof param.usernameFragment, 'string',
'Expect param.usernameFragment to be set with string value');
assert_equals(typeof param.password, 'string',
'Expect param.password to be set with string value');
}
@ -90,7 +89,7 @@
const { state, gatheringState, role, component } = iceTransport;
assert_true(role === 'controlling' || role === 'controlled',
'Expect RTCIceRole to be either controlling or controlled');
'Expect RTCIceRole to be either controlling or controlled, found ' + role);
assert_true(component === 'rtp' || component === 'rtcp',
'Expect RTCIceComponent to be either rtp or rtcp');

View file

@ -315,4 +315,52 @@ for (let bundle_policy of ['balanced', 'max-bundle', 'max-compat']) {
bundle_policy);
}
promise_test(async t => {
const pc1 = new RTCPeerConnection();
t.add_cleanup(() => pc1.close());
const pc2 = new RTCPeerConnection();
t.add_cleanup(() => pc2.close());
pc1.onicecandidate = async e => {
if (e.candidate) {
await pc2.addIceCandidate(e.candidate);
}
};
pc1.candidateBuffer = [];
pc2.onicecandidate = e => {
// Don't add candidate if candidate buffer is already used
if (e.candidate && pc1.candidateBuffer) {
pc1.candidateBuffer.push(e.candidate)
}
};
pc1.iceStates = [pc1.iceConnectionState];
pc2.iceStates = [pc2.iceConnectionState];
pc1.oniceconnectionstatechange = () => {
pc1.iceStates.push(pc1.iceConnectionState);
};
pc2.oniceconnectionstatechange = () => {
pc2.iceStates.push(pc2.iceConnectionState);
};
const localStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});
const localStream2 = await navigator.mediaDevices.getUserMedia({audio: true, video: true});
const remoteStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});
for (const stream of [localStream, localStream2, remoteStream]) {
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
}
localStream.getTracks().forEach(t => pc1.addTrack(t, localStream));
localStream2.getTracks().forEach(t => pc1.addTrack(t, localStream2));
remoteStream.getTracks().forEach(t => pc2.addTrack(t, remoteStream));
const offer = await pc1.createOffer();
await pc2.setRemoteDescription(offer);
await pc1.setLocalDescription(offer);
const answer = await pc2.createAnswer();
await pc2.setLocalDescription(answer);
await pc1.setRemoteDescription(answer);
pc1.candidateBuffer.forEach(c => pc1.addIceCandidate(c));
delete pc1.candidateBuffer;
await listenToIceConnected(pc1);
assert_array_equals(pc1.iceStates, ['new', 'checking', 'connected']);
assert_array_equals(pc2.iceStates, ['new', 'checking', 'connected']);
}, 'Responder ICE connection state behaves as expected');
</script>

View file

@ -19,9 +19,15 @@
}, TRACKED_IMMERSIVE_DEVICE, 'immersive-vr', {requiredFeatures: [], optionalFeatures: []});
xr_session_promise_test(
"Tests requestSession ignores unknown optionalFeatures",
"Tests requestSession ignores unknown strings in optionalFeatures",
(session) => {
assert_not_equals(session, null);
}, TRACKED_IMMERSIVE_DEVICE, 'immersive-vr', {optionalFeatures: ['unicorns']});
xr_session_promise_test(
"Tests requestSession ignores unknown objects in optionalFeatures",
(session) => {
assert_not_equals(session, null);
}, TRACKED_IMMERSIVE_DEVICE, 'immersive-vr', {optionalFeatures: [{ unicorns: "please" }]});
</script>
</body>

View file

@ -18,7 +18,15 @@
navigator.xr.requestSession('immersive-vr',
{requiredFeatures: ['undefined-unicorns']}),
"unexpected requestSession success"
))
).then(() => {
return promise_rejects(
t,
"NotSupportedError",
navigator.xr.requestSession('immersive-vr',
{requiredFeatures: [{unicorns: "please"}]}),
"unexpected requestSession success with unknown object"
);
}));
});
}));
});