mirror of
https://github.com/servo/servo.git
synced 2025-06-27 18:43:40 +01:00
Update web-platform-tests to revision 912d5081b62d6e6a2f847935c82722e31cca7a1f
This commit is contained in:
parent
eeaca0b26d
commit
a44e48301c
75 changed files with 1894 additions and 292 deletions
|
@ -37,3 +37,6 @@
|
|||
[Revoke blob URL after creating Request, will fetch]
|
||||
expected: FAIL
|
||||
|
||||
[Revoke blob URL after calling fetch, fetch should succeed]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -107437,6 +107437,18 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-break/block-end-aligned-abspos-with-overflow.html": [
|
||||
[
|
||||
"/css/css-break/block-end-aligned-abspos-with-overflow.html",
|
||||
[
|
||||
[
|
||||
"/css/css-break/block-end-aligned-abspos-with-overflow-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-break/line-after-unbreakable-float-after-padding.html": [
|
||||
[
|
||||
"/css/css-break/line-after-unbreakable-float-after-padding.html",
|
||||
|
@ -251674,6 +251686,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-break/block-end-aligned-abspos-with-overflow-ref.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-break/line-after-unbreakable-float-after-padding-ref.html": [
|
||||
[
|
||||
{}
|
||||
|
@ -295564,6 +295581,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_iplicit_noopener.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"html/semantics/links/linktypes/alternate-css-ref.html": [
|
||||
[
|
||||
{}
|
||||
|
@ -338586,6 +338608,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-break/block-end-aligned-abspos.html": [
|
||||
[
|
||||
"/css/css-break/block-end-aligned-abspos.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-break/hit-test-inline-fragmentation-with-border-radius.html": [
|
||||
[
|
||||
"/css/css-break/hit-test-inline-fragmentation-with-border-radius.html",
|
||||
|
@ -342760,6 +342788,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-shadow-parts/double-forward.html": [
|
||||
[
|
||||
"/css/css-shadow-parts/double-forward.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-shadow-parts/host-stylesheet.html": [
|
||||
[
|
||||
"/css/css-shadow-parts/host-stylesheet.html",
|
||||
|
@ -342772,6 +342806,18 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-shadow-parts/invalidation-change-exportparts-forward.html": [
|
||||
[
|
||||
"/css/css-shadow-parts/invalidation-change-exportparts-forward.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-shadow-parts/invalidation-change-part-name-forward.html": [
|
||||
[
|
||||
"/css/css-shadow-parts/invalidation-change-part-name-forward.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-shadow-parts/invalidation-change-part-name-idl-domtokenlist.html": [
|
||||
[
|
||||
"/css/css-shadow-parts/invalidation-change-part-name-idl-domtokenlist.html",
|
||||
|
@ -342790,6 +342836,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-shadow-parts/invalidation-complex-selector-forward.html": [
|
||||
[
|
||||
"/css/css-shadow-parts/invalidation-complex-selector-forward.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-shadow-parts/invalidation-complex-selector.html": [
|
||||
[
|
||||
"/css/css-shadow-parts/invalidation-complex-selector.html",
|
||||
|
@ -342802,6 +342854,24 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-shadow-parts/precedence-part-vs-part.html": [
|
||||
[
|
||||
"/css/css-shadow-parts/precedence-part-vs-part.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-shadow-parts/simple-forward-shorthand.html": [
|
||||
[
|
||||
"/css/css-shadow-parts/simple-forward-shorthand.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-shadow-parts/simple-forward.html": [
|
||||
[
|
||||
"/css/css-shadow-parts/simple-forward.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-shadow-parts/simple.html": [
|
||||
[
|
||||
"/css/css-shadow-parts/simple.html",
|
||||
|
@ -364496,6 +364566,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"fetch/images/canvas-remote-read-remote-image-redirect.html": [
|
||||
[
|
||||
"/fetch/images/canvas-remote-read-remote-image-redirect.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"fetch/nosniff/image.html": [
|
||||
[
|
||||
"/fetch/nosniff/image.html",
|
||||
|
@ -371720,6 +371796,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"html/semantics/embedded-content/the-img-element/available-images-onload.html": [
|
||||
[
|
||||
"/html/semantics/embedded-content/the-img-element/available-images-onload.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"html/semantics/embedded-content/the-img-element/current-pixel-density/basic.html": [
|
||||
[
|
||||
"/html/semantics/embedded-content/the-img-element/current-pixel-density/basic.html",
|
||||
|
@ -373398,6 +373480,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.tentative.html": [
|
||||
[
|
||||
"/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.tentative.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"html/semantics/rellist-feature-detection.html": [
|
||||
[
|
||||
"/html/semantics/rellist-feature-detection.html",
|
||||
|
@ -404730,6 +404818,24 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"scroll-animations/current-time-nan.html": [
|
||||
[
|
||||
"/scroll-animations/current-time-nan.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"scroll-animations/current-time-root-scroller.html": [
|
||||
[
|
||||
"/scroll-animations/current-time-root-scroller.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"scroll-animations/current-time-writing-modes.html": [
|
||||
[
|
||||
"/scroll-animations/current-time-writing-modes.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"scroll-animations/current-time.html": [
|
||||
[
|
||||
"/scroll-animations/current-time.html",
|
||||
|
@ -414640,6 +414746,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"webrtc/protocol/msid-parse.html": [
|
||||
[
|
||||
"/webrtc/protocol/msid-parse.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"webrtc/protocol/video-codecs.https.html": [
|
||||
[
|
||||
"/webrtc/protocol/video-codecs.https.html",
|
||||
|
@ -448658,7 +448770,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"WebCryptoAPI/sign_verify/ecdsa.js": [
|
||||
"869fb796517561d7026ab8c215b62a014f72e65b",
|
||||
"208b81c45ea10fded7f24c7c99b288a914c8fe66",
|
||||
"support"
|
||||
],
|
||||
"WebCryptoAPI/sign_verify/ecdsa_vectors.js": [
|
||||
|
@ -448670,7 +448782,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"WebCryptoAPI/sign_verify/hmac.js": [
|
||||
"22a2acf64f5b5e050a9e76ca01d4fb96aaa57b22",
|
||||
"e8f9ec5815287fc9c2ab0eb039edf806f3a8f613",
|
||||
"support"
|
||||
],
|
||||
"WebCryptoAPI/sign_verify/hmac_vectors.js": [
|
||||
|
@ -448678,7 +448790,7 @@
|
|||
"support"
|
||||
],
|
||||
"WebCryptoAPI/sign_verify/rsa.js": [
|
||||
"656c320f78f6a394ceaaf01e50d540f6c5c1a2ed",
|
||||
"251f57e8bbcfffa179390fc7efab266393a27f3e",
|
||||
"support"
|
||||
],
|
||||
"WebCryptoAPI/sign_verify/rsa_pkcs.https.worker.js": [
|
||||
|
@ -453230,7 +453342,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"check_stability.ini": [
|
||||
"b939328be1cb69c3dcc47495930ba0df28b2bad2",
|
||||
"e6ab448c001021a8fd77e4766591236dfdd02890",
|
||||
"support"
|
||||
],
|
||||
"clear-site-data/META.yml": [
|
||||
|
@ -453574,7 +453686,7 @@
|
|||
"support"
|
||||
],
|
||||
"common/performance-timeline-utils.js": [
|
||||
"3efce5b5d8b3cbc9ac17171e674d317de8797a55",
|
||||
"b20241cc6106f93a999b498bbf21426f44ad89fc",
|
||||
"support"
|
||||
],
|
||||
"common/performance-timeline-utils.js.headers": [
|
||||
|
@ -540601,6 +540713,18 @@
|
|||
"bfd40518b4a6477632fa319f3e53fe22517d326d",
|
||||
"support"
|
||||
],
|
||||
"css/css-break/block-end-aligned-abspos-with-overflow-ref.html": [
|
||||
"a8470b09a7d67eb3929c0380eaa45779c2b558ad",
|
||||
"support"
|
||||
],
|
||||
"css/css-break/block-end-aligned-abspos-with-overflow.html": [
|
||||
"9000c6351384be8cec767405f7f7aecaf2223173",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-break/block-end-aligned-abspos.html": [
|
||||
"c7acaa977b240ecde638e900d0fec7844cf2b965",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-break/break-before-always-001.xht": [
|
||||
"e2e7297d1532fba60d2074aa2701600dc7441742",
|
||||
"visual"
|
||||
|
@ -565969,6 +566093,10 @@
|
|||
"7fe9744af9584c07ffff6c408574002896e8c134",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-shadow-parts/double-forward.html": [
|
||||
"d23ec775fff830bd3ed2668ec2dc7ab184a6dc37",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-shadow-parts/host-stylesheet.html": [
|
||||
"2e65c4b1b57bd9959c68e85e11b442c67f2c5a42",
|
||||
"testharness"
|
||||
|
@ -565977,6 +566105,14 @@
|
|||
"2dfd4b0510a758c73bf8ac8291088d39077578d7",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-shadow-parts/invalidation-change-exportparts-forward.html": [
|
||||
"1e319deb633cdb765ea4613eb7c2b8c6dd0e615a",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-shadow-parts/invalidation-change-part-name-forward.html": [
|
||||
"f8da6d1f543fcfdcfe9c191d5564c9c07af930f3",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-shadow-parts/invalidation-change-part-name-idl-domtokenlist.html": [
|
||||
"2f9fffb86eacb088365fc592e31c58238e8321dc",
|
||||
"testharness"
|
||||
|
@ -565989,6 +566125,10 @@
|
|||
"47630d956f9bf3053ec3ed8a2d04223bdd8720a9",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-shadow-parts/invalidation-complex-selector-forward.html": [
|
||||
"7c732b9bdf12467a40b64ebf8a02a10f249a900b",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-shadow-parts/invalidation-complex-selector.html": [
|
||||
"5b1fd800790c4e14ec8fbc34bd24eb6c2eb31ab0",
|
||||
"testharness"
|
||||
|
@ -565997,6 +566137,18 @@
|
|||
"fc3282a6e944950548eeda66a78d453ec1a552f3",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-shadow-parts/precedence-part-vs-part.html": [
|
||||
"9905cf8b5e46b51dc21326dc31f8c2bc6d7a39b6",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-shadow-parts/simple-forward-shorthand.html": [
|
||||
"0142967dfdb707a376b86e5347465117033cda01",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-shadow-parts/simple-forward.html": [
|
||||
"a1a19aee4ede175f7e862318105f4625144b6e42",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-shadow-parts/simple.html": [
|
||||
"a7f17d9670b137995b0dfc6f43221e16b988376d",
|
||||
"testharness"
|
||||
|
@ -578834,7 +578986,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/css-transitions/currentcolor-animation-001.html": [
|
||||
"e36e748150680628c150a12f686579da6e99ddcc",
|
||||
"4fd982a8cc77aa999c947d5c47e0aec8df8b9a92",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-transitions/detached-container-001.html": [
|
||||
|
@ -579466,7 +579618,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/css-transitions/transitions-animatable-properties-01.html": [
|
||||
"39dd073f929fa59abb52bc7b4b4644a351670ad2",
|
||||
"48a7d1e2e016ae914dbc9b8c08eadbc0e2a669a2",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-transitions/zero-duration-multiple-transition.html": [
|
||||
|
@ -583414,7 +583566,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/css-values/calc-unit-analysis.html": [
|
||||
"1520b4d3fa2390c219d637023fc3981dc01ab8ff",
|
||||
"20eab22bf7cdff8c4fdc7a88b1524f69d4b042fb",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-values/ch-unit-001.html": [
|
||||
|
@ -583814,7 +583966,7 @@
|
|||
"support"
|
||||
],
|
||||
"css/css-variables/test_variable_legal_values.html": [
|
||||
"2e074389f7a4ff38f7cbdac8f865f8cffde9663a",
|
||||
"1d86c0834ccb1da7965edf56f9a4aefc0a041421",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-variables/variable-animation-from-to.html": [
|
||||
|
@ -590942,7 +591094,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/cssom-view/offsetParent_element_test.html": [
|
||||
"bb5686d41daebaa6cff5b023cbab5211248b7aac",
|
||||
"c88b616986511b3220449c03421e827be0d2e534",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom-view/offsetTopLeftInScrollableParent.html": [
|
||||
|
@ -591350,7 +591502,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/cssom/computed-style-001.html": [
|
||||
"80bf06c300ec7a693ca74dc98dbf2b62df721aaa",
|
||||
"d637b066b03a71283ad89315a5c346a1715900f1",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/computed-style-002.html": [
|
||||
|
@ -591366,7 +591518,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/cssom/computed-style-005.html": [
|
||||
"998f70eb97836575c0135ff5311a43b6ee09ab94",
|
||||
"49a5977acdb999be701ecc6da3c10eb433237621",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/computed-style-set-property.html": [
|
||||
|
@ -591522,7 +591674,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/cssom/inline-style-001.html": [
|
||||
"51f36f250e5c10cec7f08f5aa1a2de989d90bfd8",
|
||||
"d4bf3b92ab2c9a45614754807cdd5f2af79c1fa5",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/insertRule-charset-no-index.html": [
|
||||
|
@ -591558,19 +591710,19 @@
|
|||
"reftest"
|
||||
],
|
||||
"css/cssom/medialist-interfaces-001.html": [
|
||||
"19c661e1b3dffa1f30d9886346317879063ae0d4",
|
||||
"f436177fb8ec210d878418883d7876f64d1c45df",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/medialist-interfaces-002.html": [
|
||||
"2b6bba2a661ed257fcb775b3a2884f3dfb630c3e",
|
||||
"9820015f5e02642ea4c544184811f9f243ee83c5",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/medialist-interfaces-003.html": [
|
||||
"649f9485f44f800b7685d604ac31c88ce43e4d81",
|
||||
"1778c4a7ae98904460054157c2cc44ae264e0e70",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/medialist-interfaces-004.html": [
|
||||
"cf9befb8ffb628f59508d5d74ec6ed4db9e4e09e",
|
||||
"7cbea37cba421bbf13887322cc48b72a8e04cdc8",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/overflow-serialization.html": [
|
||||
|
@ -591634,11 +591786,11 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/cssom/style-sheet-interfaces-001.html": [
|
||||
"20dc9713e58b05a159ef731164889fc37b4b02aa",
|
||||
"1f6c9e249357df597ecdf270bf9820be8254f40a",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/style-sheet-interfaces-002.html": [
|
||||
"51b0eb336be7abb33b7b0b29523b1eafd3d9b93e",
|
||||
"e86a9a16e3bc9c0a22277996ad1fbb5f273d4bdd",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/stylesheet-replacedata-dynamic-ref.html": [
|
||||
|
@ -592810,7 +592962,7 @@
|
|||
"support"
|
||||
],
|
||||
"css/mediaqueries/test_media_queries.html": [
|
||||
"a239efdc1168f69471f5d0a88e4f9027fc00ae17",
|
||||
"250f9524adeadeb2684196ccac8843cfed1567c2",
|
||||
"testharness"
|
||||
],
|
||||
"css/mediaqueries/viewport-script-dynamic-ref.html": [
|
||||
|
@ -611485,6 +611637,10 @@
|
|||
"721d6e79b5248ed7a4334d754b8039c366090051",
|
||||
"testharness"
|
||||
],
|
||||
"fetch/images/canvas-remote-read-remote-image-redirect.html": [
|
||||
"bfcb7537651f285d0aa5d60a41032c534ff39b95",
|
||||
"testharness"
|
||||
],
|
||||
"fetch/nosniff/image.html": [
|
||||
"9dfdb94cf62a4cde91e44f6d4299ca26c15ba9db",
|
||||
"testharness"
|
||||
|
@ -612882,7 +613038,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"hr-time/monotonic-clock.any.js": [
|
||||
"f7f254557f4296f8e69757eb9ed3ac11a05d3a33",
|
||||
"c53b04d844e4f587891595c09c56e336f3893f9b",
|
||||
"testharness"
|
||||
],
|
||||
"hr-time/performance-tojson.html": [
|
||||
|
@ -625505,6 +625661,10 @@
|
|||
"15e02bcf51535d45a702b0977f919eff8ce5ba9c",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/embedded-content/the-img-element/available-images-onload.html": [
|
||||
"5fc5cb8b61986a020b52a16dd765a88459399165",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/embedded-content/the-img-element/available-images-ref.html": [
|
||||
"8061abae50899a2befe286723d8bd5c285b356ab",
|
||||
"support"
|
||||
|
@ -626182,7 +626342,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/the-button-element/button-click-submits.html": [
|
||||
"e6f02d3e21caf3a4f53f3698f69c17f64aad069f",
|
||||
"f09d06080fbe83feb401f575e7d78b0a741009f1",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/the-button-element/button-events.html": [
|
||||
|
@ -627225,6 +627385,14 @@
|
|||
"dd2d719134fd7573e85c9a696350cffa1705b661",
|
||||
"support"
|
||||
],
|
||||
"html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_iplicit_noopener.html": [
|
||||
"bf6a1ae5bfe16e4fd50296636894859a0ee25ec1",
|
||||
"support"
|
||||
],
|
||||
"html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.tentative.html": [
|
||||
"39903dcd520c52669f7ab15494777a63c6e7c1b1",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/links/linktypes/alternate-css-ref.html": [
|
||||
"ec961eac157152db3f3428392d93cb7f74f366ed",
|
||||
"support"
|
||||
|
@ -628874,7 +629042,7 @@
|
|||
"support"
|
||||
],
|
||||
"html/semantics/scripting-1/the-script-element/muted-errors.sub.html": [
|
||||
"a42179dc85d35f328a69f12bbfd2b2f6211b7151",
|
||||
"1b255faf7e1286f9379e825403de2b069c452747",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/scripting-1/the-script-element/nomodule-reflect.html": [
|
||||
|
@ -632038,11 +632206,11 @@
|
|||
"support"
|
||||
],
|
||||
"infrastructure/metadata/infrastructure/testdriver/actions/elementPosition.html.ini": [
|
||||
"f751532cee7e7a558c85011986aa72a65b79ce7c",
|
||||
"750dd055dbd80030672572bc51f6dce2f5757698",
|
||||
"support"
|
||||
],
|
||||
"infrastructure/metadata/infrastructure/testdriver/actions/elementTiming.html.ini": [
|
||||
"a1e9ea86844e78c00282a32a5a64c6365c04ffa2",
|
||||
"7a6cf82bbd3aad03ac3367e8a9b5e20e5aab1c25",
|
||||
"support"
|
||||
],
|
||||
"infrastructure/metadata/infrastructure/testdriver/actions/eventOrder.html.ini": [
|
||||
|
@ -637566,7 +637734,7 @@
|
|||
"support"
|
||||
],
|
||||
"navigation-timing/resources/webperftestharness.js": [
|
||||
"afdfa2a768b1065f05f61de77d6528aee658d7dc",
|
||||
"3efb52783f1e5dcb0d42aad11aec2a9e47257d33",
|
||||
"support"
|
||||
],
|
||||
"navigation-timing/test_document_open.html": [
|
||||
|
@ -637586,7 +637754,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"navigation-timing/test_navigation_redirectCount_none.html": [
|
||||
"eaaef4b514c7f44aaeb64b9f0d9307fa50ad068a",
|
||||
"da94d24c746212e0fdf60872f3dc81cc10f2db9a",
|
||||
"testharness"
|
||||
],
|
||||
"navigation-timing/test_navigation_type_backforward.html": [
|
||||
|
@ -637602,7 +637770,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"navigation-timing/test_no_previous_document.html": [
|
||||
"0b9eb4b2224a70c6c75c9d35fe1871a52cc7d7b2",
|
||||
"0bce16525caa65d666e2bb061227c277478237bc",
|
||||
"testharness"
|
||||
],
|
||||
"navigation-timing/test_performance_attributes.sub.html": [
|
||||
|
@ -637626,15 +637794,15 @@
|
|||
"testharness"
|
||||
],
|
||||
"navigation-timing/test_timing_attributes_order.html": [
|
||||
"03c2619cb3e4ad4916bcdf9cf51174b61416e546",
|
||||
"5e885ea7ec3f360d6fd6ba060d49773713fef228",
|
||||
"testharness"
|
||||
],
|
||||
"navigation-timing/test_timing_client_redirect.html": [
|
||||
"3bc369234a03fe081f55a4ded8d85bd0fa6b86c0",
|
||||
"bebf39eb98a6f26dd9623dff2b31cec28f101d87",
|
||||
"testharness"
|
||||
],
|
||||
"navigation-timing/test_timing_reload.html": [
|
||||
"0e28a6479b10c3610dc18687dcb0a92e1fd95e3a",
|
||||
"a660caf4ef9fffc32dfbc9da4a76c590689cf4aa",
|
||||
"testharness"
|
||||
],
|
||||
"navigation-timing/test_timing_server_redirect.html": [
|
||||
|
@ -637642,7 +637810,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"navigation-timing/test_timing_xserver_redirect.html": [
|
||||
"93db8699f879e54e4ffb8440b4b28ab7dcc65905",
|
||||
"a39f7c2642cd0c091267af6f151ff8b45f56be09",
|
||||
"testharness"
|
||||
],
|
||||
"navigation-timing/test_unique_performance_objects.html": [
|
||||
|
@ -655498,7 +655666,7 @@
|
|||
"support"
|
||||
],
|
||||
"requestidlecallback/basic.html": [
|
||||
"e481a6bd3bd1f936d06b93a6d31d839442776981",
|
||||
"429134ec4360f1bbbae4db608a93a6ba25930604",
|
||||
"testharness"
|
||||
],
|
||||
"requestidlecallback/callback-exception.html": [
|
||||
|
@ -655874,7 +656042,7 @@
|
|||
"support"
|
||||
],
|
||||
"resource-timing/resources/webperftestharness.js": [
|
||||
"98b2954bad3765c94d6c7c3faf1128b47bf032b4",
|
||||
"203eb0d16b4f3ad8d22877ff7afc7064fe252892",
|
||||
"support"
|
||||
],
|
||||
"resource-timing/resources/webperftestharnessextension.js": [
|
||||
|
@ -657321,8 +657489,20 @@
|
|||
"a449b32d2be4bfe9e825ff3b3637a5ddb609b93e",
|
||||
"testharness"
|
||||
],
|
||||
"scroll-animations/current-time-nan.html": [
|
||||
"356f0a606826377aa20c6750cad7230fdc17c450",
|
||||
"testharness"
|
||||
],
|
||||
"scroll-animations/current-time-root-scroller.html": [
|
||||
"8e600e6ef05e17e0b1d93ce3fa12f6dbe8fe50c6",
|
||||
"testharness"
|
||||
],
|
||||
"scroll-animations/current-time-writing-modes.html": [
|
||||
"a7e55513eec655ba51d5d7ad680cab9c7f977946",
|
||||
"testharness"
|
||||
],
|
||||
"scroll-animations/current-time.html": [
|
||||
"8c70594612ac758f7934d8f30818cb0150925e5e",
|
||||
"0dc2a6fd4ad9702b5664df69fd015e3880106a47",
|
||||
"testharness"
|
||||
],
|
||||
"scroll-animations/idlharness.window.js": [
|
||||
|
@ -665982,7 +666162,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/ci/check_stability.py": [
|
||||
"cbed7a3521d3ba7ea2b5a21dc7daa14bcdff88d7",
|
||||
"a71e0956629a86ff1769014767a894471e5b09bb",
|
||||
"support"
|
||||
],
|
||||
"tools/ci/ci_built_diff.sh": [
|
||||
|
@ -666050,7 +666230,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/ci/taskcluster-run.py": [
|
||||
"fc6338ed31f73fc4a40703b0c918a60b0e174e20",
|
||||
"f443903786e9ee9a8cb2f3ab20e1cf4bb11faf68",
|
||||
"support"
|
||||
],
|
||||
"tools/ci/tcdownload.py": [
|
||||
|
@ -666278,7 +666458,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/manifest/download.py": [
|
||||
"8bb3cb673de54f0676d1cb873a0853c9ddf65d4b",
|
||||
"2e505f371ed882dc329409cc24de97b9a923bd31",
|
||||
"support"
|
||||
],
|
||||
"tools/manifest/item.py": [
|
||||
|
@ -668422,7 +668602,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/third_party/hyper/hyper/http20/connection.py": [
|
||||
"3c3927671f567d0b3314a8d5c5d56180ab6a2693",
|
||||
"12076cdaf14ead370de4e0e6b5730a7f9b2517c5",
|
||||
"support"
|
||||
],
|
||||
"tools/third_party/hyper/hyper/http20/errors.py": [
|
||||
|
@ -670782,11 +670962,11 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wpt/run.py": [
|
||||
"b07ba9e193b267bae50f4371ca76262d8f4cc954",
|
||||
"ea6069504416f57542619bfbb0e3c17db3ed7142",
|
||||
"support"
|
||||
],
|
||||
"tools/wpt/testfiles.py": [
|
||||
"bac32cf6ff24dd50f18bbacf0a179e061c5aad83",
|
||||
"c25ca2d43e21b15a614f3cf8a2d237165164bc57",
|
||||
"support"
|
||||
],
|
||||
"tools/wpt/tests/latest_mozilla_central.txt": [
|
||||
|
@ -671162,7 +671342,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/executors/executorwebdriver.py": [
|
||||
"40e67d22c7b5321248f6ba52afd2021e112ba847",
|
||||
"ce103a73bea9167dcb7448101951cf894207671a",
|
||||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/executors/executorwebkit.py": [
|
||||
|
@ -671502,7 +671682,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptserve/tests/functional/base.py": [
|
||||
"b08f5eabe46ccdb27553babbd159b1dc6287efe8",
|
||||
"c114e5e905cb8da98f0c5e6e8811e57af40abf3e",
|
||||
"support"
|
||||
],
|
||||
"tools/wptserve/tests/functional/docroot/bar.any.worker.js": [
|
||||
|
@ -671670,7 +671850,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptserve/tests/functional/test_response.py": [
|
||||
"4e1e053d01971477d259c8e8d0e67552f81753bb",
|
||||
"20fb3f776a9e98e2a6c95f23bf5b5d03bb0c0c27",
|
||||
"support"
|
||||
],
|
||||
"tools/wptserve/tests/functional/test_server.py": [
|
||||
|
@ -672782,7 +672962,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"user-timing/resources/webperftestharness.js": [
|
||||
"79c218f336fb0e7a08ae145dae39aac9517892ce",
|
||||
"4a8e2de69fc803c7fd06d7372a0de395aceec670",
|
||||
"support"
|
||||
],
|
||||
"user-timing/resources/webperftestharnessextension.js": [
|
||||
|
@ -677873,6 +678053,10 @@
|
|||
"88bdfcfc2867335ca53c30f5637b38b3d12c64ca",
|
||||
"testharness"
|
||||
],
|
||||
"webrtc/protocol/msid-parse.html": [
|
||||
"e0d3eb76a3a98497e1bcfed36d2ce0e6d4cb0e75",
|
||||
"testharness"
|
||||
],
|
||||
"webrtc/protocol/video-codecs.https.html": [
|
||||
"e728effbeb94de865df9f8860cd45c8de1f601c1",
|
||||
"testharness"
|
||||
|
|
|
@ -503,3 +503,9 @@
|
|||
[border-top-right-radius border-radius(px-px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[display display(static to absolute) / events]
|
||||
expected: FAIL
|
||||
|
||||
[display display(static to absolute) / values]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -509,7 +509,7 @@
|
|||
|
||||
|
||||
[single-byte-decoder.html?XMLHttpRequest]
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[canvas-remote-read-remote-image-redirect.html]
|
||||
[Load a no-cors image from a same-origin URL that redirects to a cross-origin URL that redirects to the initial origin]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[traverse_the_history_5.html]
|
||||
[traverse_the_history_4.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -8,8 +8,26 @@
|
|||
expected: FAIL
|
||||
|
||||
[picture: source (max-width:500px) valid image, img broken image, resize to narrow]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[picture: source (max-width:500px) valid image, img valid image, resize to narrow]
|
||||
expected: FAIL
|
||||
|
||||
[picture: source (max-width:500px) broken image, img valid image, resize to narrow]
|
||||
expected: FAIL
|
||||
|
||||
[img (srcset 1 cand) valid image, resize to wide]
|
||||
expected: FAIL
|
||||
|
||||
[picture: same URL in source (max-width:500px) and img, resize to wide]
|
||||
expected: FAIL
|
||||
|
||||
[img (srcset 1 cand) valid image, resize to narrow]
|
||||
expected: FAIL
|
||||
|
||||
[picture: source (max-width:500px) valid image, img broken image, resize to wide]
|
||||
expected: FAIL
|
||||
|
||||
[picture: same URL in source (max-width:500px) and img, resize to narrow]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -10,3 +10,9 @@
|
|||
[clicking a button that cancels the event should not trigger a submit]
|
||||
expected: FAIL
|
||||
|
||||
[clicking the child of a button by dispatching a bubbling event should trigger a submit]
|
||||
expected: TIMEOUT
|
||||
|
||||
[clicking the child of a button with .click() should trigger a submit]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
[toggleEvent.html]
|
||||
[Calling open twice on 'details' fires only one toggle event]
|
||||
expected: FAIL
|
||||
|
||||
[Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
[target_blank_implicit_noopener.tentative.html]
|
||||
[Anchor element with target=_blank with rel=opener+noopener]
|
||||
expected: FAIL
|
||||
|
||||
[Area element with target=_blank with rel=opener+noopener]
|
||||
expected: FAIL
|
||||
|
||||
[Anchor element with target=_blank with rel=opener]
|
||||
expected: FAIL
|
||||
|
||||
[Anchor element with target=_blank with rel=noopener+opener]
|
||||
expected: FAIL
|
||||
|
||||
[Area element with target=_blank with rel=noopener]
|
||||
expected: FAIL
|
||||
|
||||
[Area element with target=_blank with rel=opener]
|
||||
expected: FAIL
|
||||
|
||||
[Anchor element with target=_blank with implicit rel=noopener]
|
||||
expected: FAIL
|
||||
|
||||
[Area element with target=_blank with implicit rel=noopener]
|
||||
expected: FAIL
|
||||
|
||||
[Area element with target=_blank with rel=noopener+opener]
|
||||
expected: FAIL
|
||||
|
||||
[Anchor element with target=_blank with rel=noopener]
|
||||
expected: FAIL
|
||||
|
|
@ -5,3 +5,9 @@
|
|||
[Errors for cross-origin script should be muted even if the script is once loaded as same-origin]
|
||||
expected: FAIL
|
||||
|
||||
[Errors for cross-origin scripts redirected to a same-origin url should be muted]
|
||||
expected: FAIL
|
||||
|
||||
[Errors for same-origin scripts redirected to a cross-origin url and redirected back to same-origin should be muted]
|
||||
expected: FAIL
|
||||
|
||||
|
|
283
tests/wpt/metadata/quirks/unitless-length/quirks.html.ini
Normal file
283
tests/wpt/metadata/quirks/unitless-length/quirks.html.ini
Normal file
|
@ -0,0 +1,283 @@
|
|||
[quirks.html]
|
||||
[top: -\\31 .5]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: -1A]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: -1a]
|
||||
expected: FAIL
|
||||
|
||||
[top: @1]
|
||||
expected: FAIL
|
||||
|
||||
[top: "1a"]
|
||||
expected: FAIL
|
||||
|
||||
[top: @a]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: "1"]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: -/**/1]
|
||||
expected: FAIL
|
||||
|
||||
[top: +/**/1]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: @1a]
|
||||
expected: FAIL
|
||||
|
||||
[top: 1\\31 ]
|
||||
expected: FAIL
|
||||
|
||||
[top: url('1')]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: -\\31 ]
|
||||
expected: FAIL
|
||||
|
||||
[top: calc(1)]
|
||||
expected: FAIL
|
||||
|
||||
[top: \\31 ]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: +1\\31 ]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: 1\\31 .5]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: #0001]
|
||||
expected: FAIL
|
||||
|
||||
[top: calc(2 * 2px)]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: 1a]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: A]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: #01]
|
||||
expected: FAIL
|
||||
|
||||
[top: +\\31 .5]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: #1]
|
||||
expected: FAIL
|
||||
|
||||
[top: -/**/1]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: +\\31 .5]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: \\31 ]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: calc(1)]
|
||||
expected: FAIL
|
||||
|
||||
[top: #001]
|
||||
expected: FAIL
|
||||
|
||||
[top: +\\31 ]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: +\\31 ]
|
||||
expected: FAIL
|
||||
|
||||
[top: +1.5]
|
||||
expected: FAIL
|
||||
|
||||
[top: +1\\31 ]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: @a]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: @1]
|
||||
expected: FAIL
|
||||
|
||||
[top: #1]
|
||||
expected: FAIL
|
||||
|
||||
[top: 1a]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: +1a]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: +1A]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: "a"]
|
||||
expected: FAIL
|
||||
|
||||
[top: #00001]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: -1\\31 .5]
|
||||
expected: FAIL
|
||||
|
||||
[top: "1"]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: 1.5]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: -\\31 .5]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: url('1')]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: -1.5]
|
||||
expected: FAIL
|
||||
|
||||
[top: \\31 .5]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: "1a"]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: calc(2 * 2px)]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: +1\\31 .5]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: 1\\31 ]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: +/**/1]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: #00001]
|
||||
expected: FAIL
|
||||
|
||||
[top: url(1)]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: #001]
|
||||
expected: FAIL
|
||||
|
||||
[top: +1\\31 .5]
|
||||
expected: FAIL
|
||||
|
||||
[top: -1a]
|
||||
expected: FAIL
|
||||
|
||||
[top: -1A]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: url(1)]
|
||||
expected: FAIL
|
||||
|
||||
[top: a]
|
||||
expected: FAIL
|
||||
|
||||
[top: A]
|
||||
expected: FAIL
|
||||
|
||||
[top: #000001]
|
||||
expected: FAIL
|
||||
|
||||
[top: 1]
|
||||
expected: FAIL
|
||||
|
||||
[top: 1\\31 .5]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: a]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: 1]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: +1]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: #000001]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: +a]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: +A]
|
||||
expected: FAIL
|
||||
|
||||
[top: 1.5]
|
||||
expected: FAIL
|
||||
|
||||
[top: +A]
|
||||
expected: FAIL
|
||||
|
||||
[top: +a]
|
||||
expected: FAIL
|
||||
|
||||
[top: +1]
|
||||
expected: FAIL
|
||||
|
||||
[top: -1.5]
|
||||
expected: FAIL
|
||||
|
||||
[top: -1\\31 .5]
|
||||
expected: FAIL
|
||||
|
||||
[top: +1a]
|
||||
expected: FAIL
|
||||
|
||||
[top: +1A]
|
||||
expected: FAIL
|
||||
|
||||
[top: @1a]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: \\31 .5]
|
||||
expected: FAIL
|
||||
|
||||
[top: "a"]
|
||||
expected: FAIL
|
||||
|
||||
[top: #01]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: +1.5]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: -A]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: -a]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: -1\\31 ]
|
||||
expected: FAIL
|
||||
|
||||
[top: #0001]
|
||||
expected: FAIL
|
||||
|
||||
[bottom: -1]
|
||||
expected: FAIL
|
||||
|
||||
[top: -\\31 ]
|
||||
expected: FAIL
|
||||
|
||||
[top: -A]
|
||||
expected: FAIL
|
||||
|
||||
[top: -a]
|
||||
expected: FAIL
|
||||
|
||||
[top: -1]
|
||||
expected: FAIL
|
||||
|
||||
[top: -1\\31 ]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
|
||||
function run_test() {
|
||||
setup({explicit_done: true});
|
||||
|
||||
var subtle = self.crypto.subtle; // Change to test prefixed implementations
|
||||
|
||||
// When are all these tests really done? When all the promises they use have resolved.
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
|
||||
function run_test() {
|
||||
setup({explicit_done: true});
|
||||
|
||||
var subtle = self.crypto.subtle; // Change to test prefixed implementations
|
||||
|
||||
// When are all these tests really done? When all the promises they use have resolved.
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
|
||||
function run_test() {
|
||||
setup({explicit_done: true});
|
||||
|
||||
var subtle = self.crypto.subtle; // Change to test prefixed implementations
|
||||
|
||||
// When are all these tests really done? When all the promises they use have resolved.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[file detection]
|
||||
skip_tests: conformance-checkers docs tools
|
||||
# The vast majority of tests rely on files located within the `resources`
|
||||
# directory. Because of this, modifications to that directory's contents have
|
||||
# the potential to introduce instability in a large number of tests.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
author: W3C http://www.w3.org/
|
||||
help: http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute
|
||||
*/
|
||||
var performanceNamespace = window.performance;
|
||||
var namespace_check = false;
|
||||
function wp_test(func, msg, properties)
|
||||
|
@ -10,7 +14,8 @@ function wp_test(func, msg, properties)
|
|||
if (performanceNamespace === undefined || performanceNamespace == null)
|
||||
{
|
||||
// show a single error that window.performance is undefined
|
||||
test(function() { assert_true(performanceNamespace !== undefined && performanceNamespace != null, "window.performance is defined and not null"); }, "window.performance is defined and not null.", {author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
|
||||
// The window.performance attribute provides a hosting area for performance related attributes.
|
||||
test(function() { assert_true(performanceNamespace !== undefined && performanceNamespace != null, "window.performance is defined and not null"); }, "window.performance is defined and not null.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
||||
<style>
|
||||
body { overflow:scroll; } /* Auto scrollbars may hide bugs. */
|
||||
</style>
|
||||
<p>There should be a green square below, and a smaller hotpink square.</p>
|
||||
<div style="float:left; width:20px; height:20px; margin-top:80px; margin-right:30px; background:hotpink;"></div>
|
||||
<div style="float:left; width:50px; height:50px; background:green;"></div>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-break-3/#transforms">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-height">
|
||||
<link rel="match" href="block-end-aligned-abspos-with-overflow-ref.html">
|
||||
<meta name="assert" content="Check that content that overflows a tall bottom-aligned abspos fragments properly">
|
||||
<style>
|
||||
body { overflow:scroll; } /* Auto scrollbars may hide bugs. */
|
||||
</style>
|
||||
<p>There should be a green square below, and a smaller hotpink square.</p>
|
||||
<div style="columns:2; width:100px; height:100px; column-fill:auto; column-gap:0; background:white;">
|
||||
<div style="position:relative; height:100%;">
|
||||
<div style="position:absolute; width:20px; bottom:20px;">
|
||||
<div style="height:10px; background:white;">
|
||||
<div style="background:hotpink;">
|
||||
<div style="height:10px; background:white;"></div>
|
||||
<div style="break-inside:avoid; width:50px; height:50px; background:green;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-break-3/#transforms">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-height">
|
||||
<style>
|
||||
body { overflow:scroll; } /* Auto scrollbars may hide bugs. */
|
||||
#container { columns:2; height:200px; column-fill:auto; background:white; }
|
||||
#abspos { position:absolute; width:50px; bottom:0; background:blue; }
|
||||
#abspos > div { height:10px; background:white; }
|
||||
</style>
|
||||
<p>There should be two identical blue squares below.</p>
|
||||
<div id="container">
|
||||
<div style="position:relative; height:100%;">
|
||||
<div id="abspos" data-offset-y="80" data-expected-height="120">
|
||||
<div style="margin:50px 0;" data-offset-y="50"></div>
|
||||
<div data-offset-y="110"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
<script>
|
||||
checkLayout("[data-offset-y]");
|
||||
</script>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Shadow Parts - Double forward</title>
|
||||
<meta href="mailto:fergal@chromium.org" rel="author" title="Fergal Daly">
|
||||
<link href="http://www.google.com/" rel="author" title="Google">
|
||||
<link href="https://drafts.csswg.org/css-shadow-parts/" rel="help">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/shadow-helper.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<style>#c-e-outer::part(part-forwarded2) { color: green; }</style>
|
||||
<script>installCustomElement("custom-element-inner", "custom-element-inner-template");</script>
|
||||
<template id="custom-element-inner-template">
|
||||
<style>span { color: red; }</style>
|
||||
<span id="green_part" part="partp">This text</span>
|
||||
</template>
|
||||
<script>installCustomElement("custom-element-middle", "custom-element-middle-template");</script>
|
||||
<template id="custom-element-middle-template"><custom-element-inner id="c-e-inner" exportparts="partp: part-forwarded1"></custom-element-inner></template>
|
||||
<script>installCustomElement("custom-element-outer", "custom-element-outer-template");</script>
|
||||
<template id="custom-element-outer-template"><custom-element-middle id="c-e-middle" exportparts="part-forwarded1: part-forwarded2"></custom-element-middle></template>
|
||||
The following text should be green:
|
||||
<custom-element-outer id="c-e-outer"></custom-element-outer>
|
||||
<script>
|
||||
"use strict";
|
||||
const colorGreen = "rgb(0, 128, 0)";
|
||||
test(function() {
|
||||
const el = getElementByShadowIds(document, ["c-e-outer", "c-e-middle", "c-e-inner", "green_part"]);
|
||||
assert_equals(window.getComputedStyle(el).color, colorGreen);
|
||||
}, "Part in inner host is forwarded through the middle host for styling by document style sheet");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Shadow Parts - Invalidation change exportparts forward</title>
|
||||
<meta href="mailto:fergal@chromium.org" rel="author" title="Fergal Daly">
|
||||
<link href="http://www.google.com/" rel="author" title="Google">
|
||||
<link href="https://drafts.csswg.org/css-shadow-parts/" rel="help">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/shadow-helper.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<style>#c-e-outer::part(part-forwarded) { color: red; }</style>
|
||||
<script>installCustomElement("custom-element-inner", "custom-element-inner-template");</script>
|
||||
<template id="custom-element-inner-template">
|
||||
<style>span { color: green; }</style>
|
||||
<span id="part" part="partp">This text</span>
|
||||
</template>
|
||||
<script>installCustomElement("custom-element-outer", "custom-element-outer-template");</script>
|
||||
<template id="custom-element-outer-template"><custom-element-inner id="c-e-inner" exportparts="partp: part-forwarded"></custom-element-inner></template>
|
||||
The following text should be green:
|
||||
<custom-element-outer id="c-e-outer"></custom-element-outer>
|
||||
<script>
|
||||
"use strict";
|
||||
test(function() {
|
||||
const part = getElementByShadowIds(document, ["c-e-outer", "c-e-inner", "part"]);
|
||||
const before = window.getComputedStyle(part).color;
|
||||
getElementByShadowIds(document, ["c-e-outer", "c-e-inner"]).setAttribute("exportparts", "new-exportparts");
|
||||
const after = window.getComputedStyle(part).color;
|
||||
assert_not_equals(before, after);
|
||||
}, "Part in selected host changed color");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Shadow Parts - Invalidation change part name forward</title>
|
||||
<meta href="mailto:fergal@chromium.org" rel="author" title="Fergal Daly">
|
||||
<link href="http://www.google.com/" rel="author" title="Google">
|
||||
<link href="https://drafts.csswg.org/css-shadow-parts/" rel="help">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/shadow-helper.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<style>#c-e-outer::part(part-forwarded) { color: red; }</style>
|
||||
<script>installCustomElement("custom-element-inner", "custom-element-inner-template");</script>
|
||||
<template id="custom-element-inner-template">
|
||||
<style>span { color: green; }</style>
|
||||
<span id="part" part="partp">This text</span>
|
||||
</template>
|
||||
<script>installCustomElement("custom-element-outer", "custom-element-outer-template");</script>
|
||||
<template id="custom-element-outer-template"><custom-element-inner id="c-e-inner" exportparts="partp: part-forwarded"></custom-element-inner></template>
|
||||
The following text should be green:
|
||||
<custom-element-outer id="c-e-outer"></custom-element-outer>
|
||||
<script>
|
||||
"use strict";
|
||||
test(function() {
|
||||
const part = getElementByShadowIds(document, ["c-e-outer", "c-e-inner", "part"]);
|
||||
const before = window.getComputedStyle(part).color;
|
||||
part.setAttribute("part", "new-partp");
|
||||
const after = window.getComputedStyle(part).color;
|
||||
assert_not_equals(before, after);
|
||||
}, "Part in selected host changed color");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Shadow Parts - Invalidation complex selector forward</title>
|
||||
<meta href="mailto:fergal@chromium.org" rel="author" title="Fergal Daly">
|
||||
<link href="http://www.google.com/" rel="author" title="Google">
|
||||
<link href="https://drafts.csswg.org/css-shadow-parts/" rel="help">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/shadow-helper.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<style>#elem #c-e-outer::part(part-forwarded) { color: red; }</style>
|
||||
<script>installCustomElement("custom-element-inner", "custom-element-inner-template");</script>
|
||||
<template id="custom-element-inner-template">
|
||||
<style>span { color: green; }</style>
|
||||
<span id="part" part="partp">This text</span>
|
||||
</template>
|
||||
<script>installCustomElement("custom-element-outer", "custom-element-outer-template");</script>
|
||||
<template id="custom-element-outer-template"><custom-element-inner id="c-e-inner" exportparts="partp: part-forwarded"></custom-element-inner></template>
|
||||
The following text should be green:
|
||||
<div id="elem"><custom-element-outer id="c-e-outer"></custom-element-outer></div>
|
||||
<script>
|
||||
"use strict";
|
||||
test(function() {
|
||||
const part = getElementByShadowIds(document, ["c-e-outer", "c-e-inner", "part"]);
|
||||
const before = window.getComputedStyle(part).color;
|
||||
document.getElementById("elem").setAttribute("id", "new-elem");
|
||||
const after = window.getComputedStyle(part).color;
|
||||
assert_not_equals(before, after);
|
||||
}, "Part in selected host changed color");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Shadow Parts - Precedence part vs part</title>
|
||||
<meta href="mailto:fergal@chromium.org" rel="author" title="Fergal Daly">
|
||||
<link href="http://www.google.com/" rel="author" title="Google">
|
||||
<link href="https://drafts.csswg.org/css-shadow-parts/" rel="help">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/shadow-helper.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<style>#c-e-outer::part(part-forwarded) { color: green; }</style>
|
||||
<script>installCustomElement("custom-element-inner", "custom-element-inner-template");</script>
|
||||
<template id="custom-element-inner-template">
|
||||
<style>span { color: blue; }</style>
|
||||
<span id="green_part" part="partp">This text</span>
|
||||
</template>
|
||||
<script>installCustomElement("custom-element-outer", "custom-element-outer-template");</script>
|
||||
<template id="custom-element-outer-template">
|
||||
<style>#c-e-inner::part(partp) { color: red; }</style>
|
||||
<custom-element-inner id="c-e-inner" exportparts="partp: part-forwarded"></custom-element-inner>
|
||||
</template>
|
||||
The following text should be green:
|
||||
<custom-element-outer id="c-e-outer"></custom-element-outer>
|
||||
<script>
|
||||
"use strict";
|
||||
const colorGreen = "rgb(0, 128, 0)";
|
||||
test(function() {
|
||||
const el = getElementByShadowIds(document, ["c-e-outer", "c-e-inner", "green_part"]);
|
||||
assert_equals(window.getComputedStyle(el).color, colorGreen);
|
||||
}, "Style from document overrides style from outer CE");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Shadow Parts - Simple forward shorthand</title>
|
||||
<meta href="mailto:fergal@chromium.org" rel="author" title="Fergal Daly">
|
||||
<link href="http://www.google.com/" rel="author" title="Google">
|
||||
<link href="https://drafts.csswg.org/css-shadow-parts/" rel="help">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/shadow-helper.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<style>#c-e-outer::part(partp) { color: green; }</style>
|
||||
<script>installCustomElement("custom-element-inner", "custom-element-inner-template");</script>
|
||||
<template id="custom-element-inner-template">
|
||||
<style>span { color: red; }</style>
|
||||
<span id="green_part" part="partp">This text</span>
|
||||
</template>
|
||||
<script>installCustomElement("custom-element-outer", "custom-element-outer-template");</script>
|
||||
<template id="custom-element-outer-template"><custom-element-inner id="c-e-inner" exportparts="partp"></custom-element-inner></template>
|
||||
The following text should be green:
|
||||
<custom-element-outer id="c-e-outer"></custom-element-outer>
|
||||
<script>
|
||||
"use strict";
|
||||
const colorGreen = "rgb(0, 128, 0)";
|
||||
test(function() {
|
||||
const el = getElementByShadowIds(document, ["c-e-outer", "c-e-inner", "green_part"]);
|
||||
assert_equals(window.getComputedStyle(el).color, colorGreen);
|
||||
}, "Part in inner host is forwarded, under the same name, for styling by document style sheet");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Shadow Parts - Simple forward</title>
|
||||
<meta href="mailto:fergal@chromium.org" rel="author" title="Fergal Daly">
|
||||
<link href="http://www.google.com/" rel="author" title="Google">
|
||||
<link href="https://drafts.csswg.org/css-shadow-parts/" rel="help">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/shadow-helper.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<style>#c-e-outer::part(part-forwarded) { color: green; }</style>
|
||||
<script>installCustomElement("custom-element-inner", "custom-element-inner-template");</script>
|
||||
<template id="custom-element-inner-template">
|
||||
<style>span { color: red; }</style>
|
||||
<span id="green_part" part="partp">This text</span>
|
||||
</template>
|
||||
<script>installCustomElement("custom-element-outer", "custom-element-outer-template");</script>
|
||||
<template id="custom-element-outer-template"><custom-element-inner id="c-e-inner" exportparts="partp: part-forwarded"></custom-element-inner></template>
|
||||
The following text should be green:
|
||||
<custom-element-outer id="c-e-outer"></custom-element-outer>
|
||||
<script>
|
||||
"use strict";
|
||||
const colorGreen = "rgb(0, 128, 0)";
|
||||
test(function() {
|
||||
const el = getElementByShadowIds(document, ["c-e-outer", "c-e-inner", "green_part"]);
|
||||
assert_equals(window.getComputedStyle(el).color, colorGreen);
|
||||
}, "Part in inner host is forwarded for styling by document style sheet");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -15,6 +15,7 @@
|
|||
<div id="test"></div>
|
||||
<script>
|
||||
|
||||
// Transition does not occur when the value is currentColor and color changes
|
||||
test(function() {
|
||||
var div = document.getElementById("test");
|
||||
var cs = getComputedStyle(div, "");
|
||||
|
@ -32,8 +33,7 @@ test(function() {
|
|||
assert_true(quarter_interpolated != quarter_reference &&
|
||||
quarter_interpolated == final_reference);
|
||||
},
|
||||
"currentcolortransition",
|
||||
{ assert: "Transition does not occur when the value is currentColor and color changes" });
|
||||
"currentcolortransition");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -100,10 +100,8 @@
|
|||
|
||||
// create all the tests we need
|
||||
for (var i = 0; i < kANIMATABLE_CSS_PROPERTIES.length; i++) {
|
||||
testsIntermediate.push(async_test(kANIMATABLE_CSS_PROPERTIES[i][0] + " intermediate",
|
||||
{ assert: "property " + kANIMATABLE_CSS_PROPERTIES[i][0] + " is animatable" }));
|
||||
testsEnd.push(async_test(kANIMATABLE_CSS_PROPERTIES[i][0] + " end",
|
||||
{ assert: "property " + kANIMATABLE_CSS_PROPERTIES[i][0] + " has correct value after transition's end" }));
|
||||
testsIntermediate.push(async_test(kANIMATABLE_CSS_PROPERTIES[i][0] + " intermediate"));
|
||||
testsEnd.push(async_test(kANIMATABLE_CSS_PROPERTIES[i][0] + " end"));
|
||||
}
|
||||
|
||||
// getComputedStyle helper
|
||||
|
|
|
@ -32,8 +32,7 @@ function run() {
|
|||
test_elt.style.setProperty(property, value);
|
||||
test_elt.style.removeProperty(property);
|
||||
},
|
||||
description_to_name(description),
|
||||
{ assert: "invalid calc expression: " + description });
|
||||
description_to_name(description));
|
||||
}
|
||||
|
||||
function assert_valid_value(property, value, computes_to, description) {
|
||||
|
@ -46,27 +45,26 @@ function run() {
|
|||
computes_to);
|
||||
test_elt.style.removeProperty(property);
|
||||
},
|
||||
description_to_name(description),
|
||||
{ assert: "valid calc expression: " + description });
|
||||
description_to_name(description));
|
||||
}
|
||||
|
||||
assert_invalid_value("margin-left", "calc(0)",
|
||||
assert_invalid_value("margin-left", "calc(0)", // invalid calc expression
|
||||
"unitless zero in calc() is a numeric type, not length");
|
||||
assert_valid_value("margin-left", "calc(0px)", "0px",
|
||||
"0px in calc()");
|
||||
assert_invalid_value("margin-left", "calc(1px + 2)",
|
||||
assert_invalid_value("margin-left", "calc(1px + 2)", // invalid calc expression
|
||||
"addition of length and number");
|
||||
assert_invalid_value("margin-left", "calc(2 + 1px)",
|
||||
assert_invalid_value("margin-left", "calc(2 + 1px)", // invalid calc expression
|
||||
"addition of number and length");
|
||||
assert_invalid_value("margin-left", "calc(1px - 2)",
|
||||
assert_invalid_value("margin-left", "calc(1px - 2)", // invalid calc expression
|
||||
"subtraction of length and number");
|
||||
assert_invalid_value("margin-left", "calc(2 - 1px)",
|
||||
assert_invalid_value("margin-left", "calc(2 - 1px)", // invalid calc expression
|
||||
"subtraction of number and length");
|
||||
assert_valid_value("margin-left", "calc(2px * 2)", "4px",
|
||||
"multiplication of length and number");
|
||||
assert_valid_value("margin-left", "calc(2 * 2px)", "4px",
|
||||
"multiplication of number and length");
|
||||
assert_invalid_value("margin-left", "calc(2px * 1px)",
|
||||
assert_invalid_value("margin-left", "calc(2px * 1px)", // invalid calc expression
|
||||
"multiplication of length and length");
|
||||
|
||||
}
|
||||
|
|
|
@ -44,8 +44,7 @@ function run() {
|
|||
assert_not_equals(initial_cs, red_cs);
|
||||
assert_equals(initial_cs, test_cs.backgroundColor);
|
||||
},
|
||||
description_to_name(description),
|
||||
{ assert: "Value allowed within variable: " + description });
|
||||
description_to_name(description));
|
||||
}
|
||||
|
||||
function assert_disallowed_balanced_variable_value(value, description) {
|
||||
|
@ -59,8 +58,7 @@ function run() {
|
|||
assert_not_equals(green_cs, red_cs);
|
||||
assert_equals(green_cs, test_cs.backgroundColor);
|
||||
},
|
||||
description_to_name(description),
|
||||
{ assert: "Value not allowed within variable: " + description });
|
||||
description_to_name(description));
|
||||
}
|
||||
|
||||
assert_allowed_variable_value("25%", "percentage");
|
||||
|
|
|
@ -93,6 +93,7 @@ var caption_element_child = document.getElementById('caption-element-child');
|
|||
var table_element_tr = document.getElementById('table-element-tr');
|
||||
var table_element = document.getElementById('table-element');
|
||||
|
||||
// The offsetParent attribute algorithm rule checking passed!
|
||||
test(function() {
|
||||
assert_equals(html.offsetParent,null);
|
||||
assert_equals(body.offsetParent,null);
|
||||
|
@ -104,10 +105,9 @@ test(function() {
|
|||
assert_equals(none_element_child_audio.offsetParent,null);
|
||||
assert_equals(none_element_child_canvas.offsetParent,null);
|
||||
assert_equals(none_element_child_svg.offsetParent,undefined);
|
||||
}, "Valid the algorithm rule of offsetParent check step 1",
|
||||
{ assert: "The offsetParent attribute algorithm rule checking passed!" }
|
||||
);
|
||||
}, "Valid the algorithm rule of offsetParent check step 1");
|
||||
|
||||
// The offsetParent attribute algorithm rule checking passed!
|
||||
test(function() {
|
||||
assert_equals(body_element_child.offsetParent,body);
|
||||
assert_equals(window.getComputedStyle(relative_element).position,'relative');
|
||||
|
@ -122,9 +122,7 @@ test(function() {
|
|||
assert_equals(caption_element_child.offsetParent,table_element);
|
||||
assert_equals(window.getComputedStyle(td_element).position,'static');
|
||||
assert_equals(td_element.offsetParent,table_element);
|
||||
}, "Valid the algorithm rule of offsetParent check step 2",
|
||||
{ assert: "The offsetParent attribute algorithm rule checking passed!" }
|
||||
);
|
||||
}, "Valid the algorithm rule of offsetParent check step 2");
|
||||
|
||||
</script>
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
var inner = document.getElementById("inside");
|
||||
var innerStyle;
|
||||
|
||||
// do not allow modifications to a computed CSSStyleDeclaration
|
||||
test(function() {
|
||||
innerStyle = window.getComputedStyle(inner);
|
||||
assert_throws( "NO_MODIFICATION_ALLOWED_ERR",
|
||||
|
@ -44,27 +45,22 @@
|
|||
assert_throws( "NO_MODIFICATION_ALLOWED_ERR",
|
||||
function() { innerStyle.color = "blue"; },
|
||||
"do not allow setting a property on a readonly CSSStyleDeclaration");
|
||||
}, "read_only", {
|
||||
assert: "do not allow modifications to a computed CSSStyleDeclaration"
|
||||
});
|
||||
}, "read_only");
|
||||
|
||||
// Directly set properties are resolved
|
||||
test(function() {
|
||||
assert_equals(innerStyle.getPropertyValue("height"), "100px");
|
||||
}, "property_values", {
|
||||
assert: "Directly set properties are resolved"
|
||||
});
|
||||
}, "property_values");
|
||||
|
||||
// Inherited properties are resolved
|
||||
test(function() {
|
||||
assert_equals(innerStyle.getPropertyValue("font-size"), "100px");
|
||||
}, "inherited_property_values", {
|
||||
assert: "Inherited properties are resolved"
|
||||
});
|
||||
}, "inherited_property_values");
|
||||
|
||||
// Relative properties are resolved
|
||||
test(function() {
|
||||
assert_equals(innerStyle.getPropertyValue("width"), "100px");
|
||||
}, "relative_property_values", {
|
||||
assert: "Relative properties are resolved"
|
||||
});
|
||||
}, "relative_property_values");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -47,19 +47,17 @@
|
|||
let elem = document.getElementById(id);
|
||||
let elemStyle = window.getComputedStyle(elem);
|
||||
|
||||
// positioned element's auto margins should be resolved to 10px.
|
||||
test(function() {
|
||||
assert_equals(elemStyle.getPropertyValue("margin-left"), "10px");
|
||||
assert_equals(elemStyle.getPropertyValue("margin-right"), "10px");
|
||||
}, id + "_computed_margins", {
|
||||
assert: id + "-positioned element's auto margins should be resolved to 10px."
|
||||
});
|
||||
}, id + "_computed_margins");
|
||||
|
||||
// positioned element should have a left and right of 0px (as authored).
|
||||
test(function() {
|
||||
assert_equals(elemStyle.getPropertyValue("left"), "0px");
|
||||
assert_equals(elemStyle.getPropertyValue("right"), "0px");
|
||||
}, id + "_computed_left_and_right", {
|
||||
assert: id + "-positioned element should have a left and right of 0px (as authored)."
|
||||
});
|
||||
}, id + "_computed_left_and_right");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -14,21 +14,22 @@
|
|||
<div id="log"></div>
|
||||
<div id="test" style="margin-left: 5px;"></div>
|
||||
<script type="text/javascript">
|
||||
// Can access CSSStyleDeclaration through style property
|
||||
test(function() {
|
||||
var test = document.getElementById("test");
|
||||
assert_idl_attribute(test, "style");
|
||||
declaration = test.style;
|
||||
}, "CSSStyleDeclaration_accessible", {
|
||||
assert: "Can access CSSStyleDeclaration through style property"
|
||||
});
|
||||
}, "CSSStyleDeclaration_accessible");
|
||||
|
||||
// initial property values are correct
|
||||
test(function() {
|
||||
assert_equals(declaration.cssText, "margin-left: 5px;");
|
||||
assert_equals(declaration.getPropertyValue("margin-left"), "5px");
|
||||
}, "read", {
|
||||
assert: "initial property values are correct"
|
||||
});
|
||||
}, "read");
|
||||
|
||||
// setting cssText adds new properties
|
||||
// setting cssText removes existing properties
|
||||
// properties set through cssText are reflected in the computed style
|
||||
test(function() {
|
||||
declaration.cssText = "margin-left: 10px; padding-left: 10px;";
|
||||
assert_equals(declaration.cssText, "margin-left: 10px; padding-left: 10px;");
|
||||
|
@ -41,12 +42,10 @@
|
|||
var computedStyle = window.getComputedStyle(document.getElementById("test"));
|
||||
assert_equals(computedStyle.getPropertyValue("margin-left"), "10px");
|
||||
assert_equals(computedStyle.getPropertyValue("padding-left"), "10px");
|
||||
}, "csstext_write", {
|
||||
assert: [ "setting cssText adds new properties",
|
||||
"setting cssText removes existing properties",
|
||||
"properties set through cssText are reflected in the computed style"]
|
||||
});
|
||||
}, "csstext_write");
|
||||
|
||||
// setProperty adds new properties
|
||||
// properties set through setProperty are reflected in the computed style
|
||||
test(function() {
|
||||
while(declaration.length > 0)
|
||||
declaration.removeProperty(declaration.item(0));
|
||||
|
@ -62,11 +61,9 @@
|
|||
var computedStyle = window.getComputedStyle(document.getElementById("test"));
|
||||
assert_equals(computedStyle.getPropertyValue("margin-left"), "15px");
|
||||
assert_equals(computedStyle.getPropertyValue("padding-left"), "15px");
|
||||
}, "property_write", {
|
||||
assert: [ "setProperty adds new properties",
|
||||
"properties set through setProperty are reflected in the computed style"]
|
||||
});
|
||||
}, "property_write");
|
||||
|
||||
// shorthand property is expanded
|
||||
test(function() {
|
||||
while(declaration.length > 0)
|
||||
declaration.removeProperty(declaration.item(0));
|
||||
|
@ -75,9 +72,7 @@
|
|||
assert_equals(declaration.getPropertyValue("margin-right"), "20px");
|
||||
assert_equals(declaration.getPropertyValue("margin-bottom"), "20px");
|
||||
assert_equals(declaration.getPropertyValue("margin-left"), "20px");
|
||||
}, "shorthand_properties", {
|
||||
assert: "shorthand property is expanded"
|
||||
});
|
||||
}, "shorthand_properties");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
<link rel="author" title="Ben Sheldon" href="mailto:ben@codeforamerica.org">
|
||||
<link rel="author" title="Chapman Shoop" href="mailto:chapman.shoop@gmail.com">
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-1/#the-medialist-interface">
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-1/#serializing-media-queries">
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-1/#serialize-a-media-query-list">
|
||||
<meta name="flags" content="dom">
|
||||
<meta name="assert" content="MediaLists are serialized according to the specification">
|
||||
<script src="/resources/testharness.js" type="text/javascript"></script>
|
||||
|
@ -40,36 +42,33 @@
|
|||
mediaList = styleSheet.media;
|
||||
}
|
||||
|
||||
|
||||
// MediaList.mediaText equals the 'media' value of the initial 'style' element.
|
||||
test(function() {
|
||||
setup();
|
||||
|
||||
assert_equals(mediaList.mediaText, "all");
|
||||
|
||||
}, "mediatest_medialist_serialize_element",
|
||||
{ help: ["http://www.w3.org/TR/cssom-1/#the-medialist-interface", "http://www.w3.org/TR/cssom-1/#serializing-media-queries"],
|
||||
assert: ["MediaList.mediaText equals the 'media' value of the initial 'style' element."] });
|
||||
}, "mediatest_medialist_serialize_element");
|
||||
|
||||
// To serialize a comma-separated list concatenate all items of the list in list order while separating them by \",\" (U+002C), followed by a space (U+0020).
|
||||
test(function() {
|
||||
setup();
|
||||
|
||||
mediaList.appendMedium('screen');
|
||||
assert_equals(mediaList.mediaText, "all, screen");
|
||||
|
||||
}, "mediatest_medialist_serialize_comma",
|
||||
{ help: ["http://www.w3.org/TR/cssom-1/#the-medialist-interface", "http://www.w3.org/TR/cssom-1/#serialize-a-media-query-list"],
|
||||
assert: ["To serialize a comma-separated list concatenate all items of the list in list order while separating them by \",\" (U+002C), followed by a space (U+0020)."] });
|
||||
}, "mediatest_medialist_serialize_comma");
|
||||
|
||||
// If the media query list is empty return the empty string.
|
||||
test(function() {
|
||||
setup();
|
||||
|
||||
mediaList.deleteMedium('all');
|
||||
assert_equals(mediaList.mediaText, "");
|
||||
|
||||
}, "mediatest_medialist_serialize_empty",
|
||||
{ help: ["http://www.w3.org/TR/cssom-1/#the-medialist-interface", "http://www.w3.org/TR/cssom-1/#serializing-media-queries"],
|
||||
assert: ["If the media query list is empty return the empty string."] });
|
||||
}, "mediatest_medialist_serialize_empty");
|
||||
|
||||
// Each media query should be sorted in the same order as they appear in the list of media queries.
|
||||
test(function() {
|
||||
setup();
|
||||
|
||||
|
@ -77,9 +76,7 @@
|
|||
mediaList.appendMedium('print');
|
||||
assert_equals(mediaList.mediaText, "all, screen, print");
|
||||
|
||||
}, "mediatest_medialist_serialize_order",
|
||||
{ help: ["http://www.w3.org/TR/cssom-1/#the-medialist-interface", "http://www.w3.org/TR/cssom-1/#serialize-a-media-query-list"],
|
||||
assert: ["Each media query should be sorted in the same order as they appear in the list of media queries."] });
|
||||
}, "mediatest_medialist_serialize_order");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -33,12 +33,13 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
|
||||
// MediaList.deleteMedium called without argument throws error.
|
||||
test(function() {
|
||||
media_list = setup();
|
||||
assert_throws(new TypeError, function() { media_list.deleteMedium(); });
|
||||
}, "deleteMedium_called_without_argument",
|
||||
{ assert: "MediaList.deleteMedium called without argument throws error." });
|
||||
}, "deleteMedium_called_without_argument");
|
||||
|
||||
// MediaList.deleteMedium removes correct medium and updates corresponding properties.
|
||||
test(function() {
|
||||
media_list = setup();
|
||||
|
||||
|
@ -50,9 +51,9 @@
|
|||
assert_equals(media_list.length, 1);
|
||||
assert_equals(media_list.item(0), "all");
|
||||
assert_equals(media_list.mediaText, "all");
|
||||
}, "deleteMedium_removes_correct_medium",
|
||||
{ assert: "MediaList.deleteMedium removes correct medium and updates corresponding properties." });
|
||||
}, "deleteMedium_removes_correct_medium");
|
||||
|
||||
// MediaList.deleteMedium doesn't modify MediaList when medium is not found.
|
||||
test(function() {
|
||||
media_list = setup();
|
||||
|
||||
|
@ -63,8 +64,7 @@
|
|||
assert_equals(media_list.length, 1);
|
||||
assert_equals(media_list.item(0), "all");
|
||||
assert_equals(media_list.mediaText, "all");
|
||||
}, "deleteMedium_no_matching_medium_to_remove",
|
||||
{ assert: "MediaList.deleteMedium doesn't modify MediaList when medium is not found." });
|
||||
}, "deleteMedium_no_matching_medium_to_remove");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -40,22 +40,21 @@
|
|||
mediaList = styleSheet.media;
|
||||
}
|
||||
|
||||
|
||||
// First explicit example input (first column) and output (second column) in specification.
|
||||
test(function() {
|
||||
setupMedia('not screen and (min-WIDTH:5px) AND (max-width:40px )');
|
||||
|
||||
assert_equals(mediaList.mediaText, "not screen and (max-width: 40px) and (min-width: 5px)");
|
||||
|
||||
}, "mediatest_mediaquery_serialize_1",
|
||||
{ assert: ["First explicit example input (first column) and output (second column) in specification."] });
|
||||
}, "mediatest_mediaquery_serialize_1");
|
||||
|
||||
// Second explicit example input (first column) and output (second column) in specification.
|
||||
test(function() {
|
||||
setupMedia('all and (color) and (color) ');
|
||||
|
||||
assert_equals(mediaList.mediaText, "(color)");
|
||||
|
||||
}, "mediatest_mediaquery_serialize_2",
|
||||
{ assert: ["Second explicit example input (first column) and output (second column) in specification."] });
|
||||
}, "mediatest_mediaquery_serialize_2");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
|
||||
// MediaList.appendMedium correctly adds medium to empty MediaList.
|
||||
test(function() {
|
||||
media_list = setup();
|
||||
|
||||
|
@ -40,9 +41,9 @@
|
|||
assert_equals(media_list.length, 1);
|
||||
assert_equals(media_list.item(0), "all");
|
||||
assert_equals(media_list.mediaText, "all");
|
||||
}, "appendMedium_correctly_appends_medium_to_empty_MediaList",
|
||||
{ assert: "MediaList.appendMedium correctly adds medium to empty MediaList." });
|
||||
}, "appendMedium_correctly_appends_medium_to_empty_MediaList");
|
||||
|
||||
// MediaList.appendMedium correctly adds medium to a MediaList that already has a medium.
|
||||
test(function() {
|
||||
media_list = setup();
|
||||
|
||||
|
@ -56,8 +57,7 @@
|
|||
assert_equals(media_list.item(0), "screen");
|
||||
assert_equals(media_list.item(1), "all");
|
||||
assert_equals(media_list.mediaText, "screen, all");
|
||||
}, "appendMedium_correctly_appends_medium_to_nonempty_MediaList",
|
||||
{ assert: "MediaList.appendMedium correctly adds medium to a MediaList that already has a medium." });
|
||||
}, "appendMedium_correctly_appends_medium_to_nonempty_MediaList");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
<head>
|
||||
<title>CSS Test: CSSOM StyleSheet Initial Values</title>
|
||||
<link rel="author" title="Bear Travis" href="mailto:betravis@adobe.com">
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-1/#css-style-sheets">
|
||||
<link rel="help" href="https://www.w3.org/TR/cssom-1/#css-style-sheets">
|
||||
<link rel="help" href="https://www.w3.org/TR/cssom-1/#the-cssimportrule-interface">
|
||||
<link rel="help" href="https://www.w3.org/TR/cssom-1/#the-linkstyle-interface">
|
||||
<meta name="flags" content="dom">
|
||||
<meta name="assert" content="StyleSheet and CSSStyleSheet objects have the properties specified in their interfaces">
|
||||
<script src="/resources/testharness.js" type="text/javascript"></script>
|
||||
|
@ -23,6 +25,9 @@
|
|||
|
||||
var styleSheet;
|
||||
var linkSheet;
|
||||
|
||||
// styleElement.sheet exists and is a CSSStyleSheet
|
||||
// linkElement.sheet exists and is a CSSStyleSheet
|
||||
test(function() {
|
||||
assert_idl_attribute(styleElement, "sheet");
|
||||
assert_readonly(styleElement, "sheet");
|
||||
|
@ -31,11 +36,9 @@
|
|||
assert_idl_attribute(linkElement, "sheet");
|
||||
linkSheet = linkElement.sheet;
|
||||
assert_true(linkSheet instanceof CSSStyleSheet);
|
||||
}, "sheet_property",
|
||||
{ help: "http://www.w3.org/TR/cssom-1/#the-linkstyle-interface",
|
||||
assert: [ "styleElement.sheet exists", "styleElement.sheet is a CSSStyleSheet",
|
||||
"linkElement.sheet exists", "linkElement.sheet is a CSSStyleSheet"] });
|
||||
}, "sheet_property");
|
||||
|
||||
// The sheet property on LinkStyle should always return the current associated style sheet.
|
||||
test(function () {
|
||||
var style = document.createElement("style");
|
||||
document.querySelector("head").appendChild(style);
|
||||
|
@ -43,10 +46,10 @@
|
|||
assert_equals(sheet1.cssRules.length, 0);
|
||||
style.appendChild(document.createTextNode("a { color: green; }"));
|
||||
assert_equals(style.sheet.cssRules.length, 1);
|
||||
}, "sheet_property_updates",
|
||||
{ help: "https://www.w3.org/TR/cssom-1/#the-linkstyle-interface",
|
||||
assert: "The sheet property on LinkStyle should always return the current associated style sheet." });
|
||||
}, "sheet_property_updates");
|
||||
|
||||
// ownerRule, cssRules, insertRule and deleteRule properties exist on CSSStyleSheet
|
||||
// ownerRule, cssRules are read only
|
||||
test(function() {
|
||||
assert_idl_attribute(styleSheet, "ownerRule");
|
||||
assert_idl_attribute(styleSheet, "cssRules");
|
||||
|
@ -55,21 +58,19 @@
|
|||
|
||||
assert_readonly(styleSheet, "ownerRule");
|
||||
assert_readonly(styleSheet, "cssRules");
|
||||
}, "CSSStyleSheet_properties",
|
||||
{ assert: [ "ownerRule, cssRules, insertRule and deleteRule properties exist on CSSStyleSheet",
|
||||
"ownerRule, cssRules are read only"] });
|
||||
}, "CSSStyleSheet_properties");
|
||||
|
||||
var importSheet;
|
||||
// CSSStyleSheet initial property values are correct
|
||||
test(function() {
|
||||
assert_equals(styleSheet.ownerRule, null);
|
||||
assert_true(styleSheet.cssRules.length > 0);
|
||||
assert_true(styleSheet.cssRules.item(0) instanceof CSSImportRule);
|
||||
importSheet = styleSheet.cssRules.item(0).styleSheet;
|
||||
}, "CSSStyleSheet_property_values",
|
||||
{ help: [ "http://www.w3.org/TR/cssom-1/#css-style-sheets",
|
||||
"http://www.w3.org/TR/cssom-1/#cssimportrule" ],
|
||||
assert: "CSSStyleSheet initial property values are correct" });
|
||||
}, "CSSStyleSheet_property_values");
|
||||
|
||||
// type, disabled, ownerNode, parentStyleSheet, href, title, and media properties exist on StyleSheet
|
||||
// type, ownerNode, parentStyleSheet, href, and title properties are read only
|
||||
test(function() {
|
||||
assert_idl_attribute(styleSheet, "type");
|
||||
assert_idl_attribute(styleSheet, "disabled");
|
||||
|
@ -84,10 +85,9 @@
|
|||
assert_readonly(styleSheet, "parentStyleSheet");
|
||||
assert_readonly(styleSheet, "href");
|
||||
assert_readonly(styleSheet, "title");
|
||||
}, "StyleSheet_properties",
|
||||
{ assert: [ "type, disabled, ownerNode, parentStyleSheet, href, title, and media properties exist on StyleSheet",
|
||||
"type, ownerNode, parentStyleSheet, href, and title properties are read only" ] });
|
||||
}, "StyleSheet_properties");
|
||||
|
||||
// StyleSheet initial property values are correct
|
||||
test(function() {
|
||||
assert_equals(styleSheet.type, "text/css");
|
||||
assert_equals(styleSheet.disabled, false);
|
||||
|
@ -106,8 +106,7 @@
|
|||
|
||||
assert_equals(styleSheet.title, "internal style sheet");
|
||||
assert_equals(styleSheet.media.item(0), "all");
|
||||
}, "StyleSheet_property_values",
|
||||
{ assert: "StyleSheet initial property values are correct" });
|
||||
}, "StyleSheet_property_values");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -19,24 +19,22 @@
|
|||
<div id="log"></div>
|
||||
<script type="text/javascript">
|
||||
var sheet = document.getElementById("styleElement").sheet;
|
||||
// Initial rule list is of size 1
|
||||
// Can add a rule at first index
|
||||
test(function() {
|
||||
assert_equals(sheet.cssRules.length, 1);
|
||||
sheet.insertRule("p { color: green; }", 0);
|
||||
assert_equals(sheet.cssRules.length, 2);
|
||||
assert_equals(sheet.cssRules.item(0).cssText, "p { color: green; }");
|
||||
}, "add_rule", {
|
||||
assert: [ "Initial rule list is of size 1",
|
||||
"Can add a rule at first index" ]
|
||||
});
|
||||
}, "add_rule");
|
||||
|
||||
// Can delete rules until rule list is empty
|
||||
test(function() {
|
||||
sheet.deleteRule(0);
|
||||
assert_equals(sheet.cssRules.length, 1);
|
||||
sheet.deleteRule(0);
|
||||
assert_equals(sheet.cssRules.length, 0);
|
||||
}, "delete_rule", {
|
||||
assert: "Can delete rules until rule list is empty"
|
||||
});
|
||||
}, "delete_rule");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -33,13 +33,13 @@ function run() {
|
|||
function should_apply(q) {
|
||||
test(function() {
|
||||
assert_true(query_applies(q));
|
||||
}, "subtest_" + ++testNum, {assert: q + " should apply"});
|
||||
}, "subtest_" + ++testNum);
|
||||
}
|
||||
|
||||
function should_not_apply(q) {
|
||||
test(function() {
|
||||
assert_false(query_applies(q));
|
||||
}, "subtest_" + ++testNum, {assert: q + " should not apply"});
|
||||
}, "subtest_" + ++testNum);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -68,13 +68,13 @@ function run() {
|
|||
function query_should_be_parseable(q) {
|
||||
test(function() {
|
||||
assert_true(query_is_parseable(q))
|
||||
}, "subtest_" + ++testNum, {assert: "query " + q + " should be parseable"});
|
||||
}, "subtest_" + ++testNum);
|
||||
}
|
||||
|
||||
function query_should_not_be_parseable(q) {
|
||||
test(function() {
|
||||
assert_false(query_is_parseable(q))
|
||||
}, "subtest_" + ++testNum, {assert: "query " + q + " should not be parseable"});
|
||||
}, "subtest_" + ++testNum);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -88,13 +88,13 @@ function run() {
|
|||
function expression_should_be_parseable(e) {
|
||||
test(function() {
|
||||
assert_true(expression_is_parseable(e));
|
||||
}, "subtest_" + ++testNum, {assert: "expression " + e + " should be parseable"});
|
||||
}, "subtest_" + ++testNum);
|
||||
}
|
||||
|
||||
function expression_should_not_be_parseable(e) {
|
||||
test(function() {
|
||||
assert_false(expression_is_parseable(e));
|
||||
}, "subtest_" + ++testNum, {assert: "expression " + e + " should not be parseable"});
|
||||
}, "subtest_" + ++testNum);
|
||||
}
|
||||
|
||||
// The no-type syntax doesn't mix with the not and only keywords.
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>Load a no-cors image from a same-origin URL that redirects to a cross-origin URL that redirects to the initial origin</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script>
|
||||
var image = new Image();
|
||||
image.onload = function() {
|
||||
const canvas = document.createElement("canvas");
|
||||
canvas.width = 100;
|
||||
canvas.height = 100;
|
||||
|
||||
const context = canvas.getContext("2d");
|
||||
context.drawImage(image, 0, 0, 100, 100);
|
||||
|
||||
assert_throws("SecurityError", () => {
|
||||
context.getImageData(0, 0, 100, 100);
|
||||
});
|
||||
done();
|
||||
}
|
||||
|
||||
const info = get_host_info();
|
||||
const finalURL = get_host_info().HTTP_ORIGIN + "/images/apng.png";
|
||||
const intermediateURL = get_host_info().HTTP_REMOTE_ORIGIN + "/fetch/api/resources/redirect.py?location=" + finalURL;
|
||||
image.src = "/fetch/api/resources/redirect.py?location=" + encodeURIComponent(intermediateURL);
|
||||
</script>
|
|
@ -1,14 +1,13 @@
|
|||
// The time values returned when calling the now method MUST be monotonically increasing and not subject to system clock adjustments or system clock skew.
|
||||
test(function() {
|
||||
assert_true(self.performance.now() > 0, "self.performance.now() returns positive numbers");
|
||||
}, "self.performance.now() returns a positive number", {assert: "The time values returned when calling the now method MUST be monotonically increasing and not subject to system clock adjustments or system clock skew."});
|
||||
}, "self.performance.now() returns a positive number");
|
||||
|
||||
// The difference between any two chronologically recorded time values returned from the now method MUST never be negative.
|
||||
test(function() {
|
||||
var now1 = self.performance.now();
|
||||
var now2 = self.performance.now();
|
||||
assert_true((now2-now1) >= 0, "self.performance.now() difference is not negative");
|
||||
},
|
||||
"self.performance.now() difference is not negative",
|
||||
{
|
||||
assert: "The difference between any two chronologically recorded time values returned from the now method MUST never be negative."
|
||||
}
|
||||
"self.performance.now() difference is not negative"
|
||||
);
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<title>Ensure images from available images list can be drawn to a canvas</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-list-of-available-images">
|
||||
<meta charset="utf-8">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var i = new Image();
|
||||
i.onerror = t.unreached_func();
|
||||
i.onload = t.step_func(function() {
|
||||
var i2 = new Image();
|
||||
// Potentially start multiple image loading tasks by performing several
|
||||
// relevant mutations. This could lead to an invalid state later in an
|
||||
// erroneous implementation.
|
||||
i2.crossOrigin = true;
|
||||
// Start an image loading task that is expected to short-circuit since
|
||||
// the requested image is present in the list of available images.
|
||||
i2.src = "3.jpg";
|
||||
i2.onerror = t.unreached_func();
|
||||
// Ensure the loaded image is in a state that is usable by a 2d canvas.
|
||||
i2.onload = t.step_func_done(function() {
|
||||
var c = document.createElement('canvas');
|
||||
var ctx = c.getContext('2d');
|
||||
ctx.drawImage(i2, 0, 0);
|
||||
});
|
||||
});
|
||||
// Request an image which should be added to the list of available images.
|
||||
i.src = "3.jpg";
|
||||
});
|
||||
</script>
|
|
@ -146,4 +146,65 @@ test(t => {
|
|||
|
||||
}, "clicking a button inside a disabled fieldset's legend *should* trigger submit");
|
||||
|
||||
async_test(t => {
|
||||
|
||||
const form = document.createElement("form");
|
||||
const button = document.createElement("button");
|
||||
const span = document.createElement("span");
|
||||
button.appendChild(span);
|
||||
form.appendChild(button);
|
||||
document.body.appendChild(form);
|
||||
|
||||
form.addEventListener("submit", t.step_func_done(ev => {
|
||||
ev.preventDefault();
|
||||
assert_equals(ev.target, form);
|
||||
}));
|
||||
|
||||
span.click();
|
||||
|
||||
}, "clicking the child of a button with .click() should trigger a submit");
|
||||
|
||||
async_test(t => {
|
||||
|
||||
const form = document.createElement("form");
|
||||
const button = document.createElement("button");
|
||||
const span = document.createElement("span");
|
||||
button.appendChild(span);
|
||||
form.appendChild(button);
|
||||
document.body.appendChild(form);
|
||||
|
||||
form.addEventListener("submit", t.step_func_done(ev => {
|
||||
ev.preventDefault();
|
||||
assert_equals(ev.target, form);
|
||||
}));
|
||||
|
||||
const e = new MouseEvent("click", { bubbles: true });
|
||||
span.dispatchEvent(e);
|
||||
|
||||
}, "clicking the child of a button by dispatching a bubbling event should trigger a submit");
|
||||
|
||||
async_test(t => {
|
||||
|
||||
const form = document.createElement("form");
|
||||
const button = document.createElement("button");
|
||||
const span = document.createElement("span");
|
||||
button.appendChild(span);
|
||||
form.appendChild(button);
|
||||
document.body.appendChild(form);
|
||||
|
||||
form.addEventListener("submit", t.step_func_done(ev => {
|
||||
ev.preventDefault();
|
||||
assert_unreached("Form should not be submitted");
|
||||
}));
|
||||
|
||||
span.addEventListener("click", t.step_func(ev => {
|
||||
ev.preventDefault();
|
||||
t.step_timeout(() => t.done(), 500);
|
||||
}));
|
||||
|
||||
const e = new MouseEvent("click", { bubbles: false });
|
||||
span.dispatchEvent(e);
|
||||
|
||||
}, "clicking the child of a button by dispatching a non-bubbling event should not trigger submit");
|
||||
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<script>
|
||||
let bc = new BroadcastChannel(window.location.search.substring(1));
|
||||
bc.postMessage({ hasOpener: opener !== null });
|
||||
window.close();
|
||||
</script>
|
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Test behavior of rel="noopener" links</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
</head>
|
||||
<body>
|
||||
<a href="support/target_blank_iplicit_noopener.html?a1" id="a1" rel="noopener" target="_blank">Click me</a>
|
||||
<a href="support/target_blank_iplicit_noopener.html?a2" id="a2" rel="opener" target="_blank">Click me</a>
|
||||
<a href="support/target_blank_iplicit_noopener.html?a3" id="a3" target="_blank">Click me</a>
|
||||
<a href="support/target_blank_iplicit_noopener.html?a4" id="a4" rel="opener noopener" target="_blank">Click me</a>
|
||||
<a href="support/target_blank_iplicit_noopener.html?a5" id="a5" rel="noopener opener" target="_blank">Click me</a>
|
||||
|
||||
<img src="/images/threecolors.png" />
|
||||
<area shape="rect" coords="0,0,99,50" href="support/target_blank_iplicit_noopener.html?area1" id="area1" rel="noopener" target="_blank" />
|
||||
</img>
|
||||
<img src="/images/threecolors.png" />
|
||||
<area shape="rect" coords="0,0,99,50" href="support/target_blank_iplicit_noopener.html?area2" id="area2" rel="opener" target="_blank" />
|
||||
</img>
|
||||
<img src="/images/threecolors.png" />
|
||||
<area shape="rect" coords="0,0,99,50" href="support/target_blank_iplicit_noopener.html?area3" id="area3" target="_blank" />
|
||||
</img>
|
||||
<img src="/images/threecolors.png" />
|
||||
<area shape="rect" coords="0,0,99,50" href="support/target_blank_iplicit_noopener.html?area4" id="area4" rel="opener noopener" target="_blank" />
|
||||
</img>
|
||||
<img src="/images/threecolors.png" />
|
||||
<area shape="rect" coords="0,0,99,50" href="support/target_blank_iplicit_noopener.html?area5" id="area5" rel="noopener opener" target="_blank" />
|
||||
</img>
|
||||
|
||||
<script>
|
||||
|
||||
let tests = [
|
||||
{ id: "a1", hasOpener: false, name: "Anchor element with target=_blank with rel=noopener" },
|
||||
{ id: "a2", hasOpener: true, name: "Anchor element with target=_blank with rel=opener" },
|
||||
{ id: "a3", hasOpener: false, name: "Anchor element with target=_blank with implicit rel=noopener" },
|
||||
{ id: "a4", hasOpener: false, name: "Anchor element with target=_blank with rel=opener+noopener" },
|
||||
{ id: "a5", hasOpener: false, name: "Anchor element with target=_blank with rel=noopener+opener" },
|
||||
{ id: "area1", hasOpener: false, name: "Area element with target=_blank with rel=noopener" },
|
||||
{ id: "area2", hasOpener: true, name: "Area element with target=_blank with rel=opener" },
|
||||
{ id: "area3", hasOpener: false, name: "Area element with target=_blank with implicit rel=noopener" },
|
||||
{ id: "area4", hasOpener: false, name: "Area element with target=_blank with rel=opener+noopener" },
|
||||
{ id: "area5", hasOpener: false, name: "Area element with target=_blank with rel=noopener+opener" },
|
||||
];
|
||||
|
||||
tests.forEach(data => {
|
||||
async_test(
|
||||
test => {
|
||||
let bc = new BroadcastChannel(data.id);
|
||||
bc.addEventListener("message", test.step_func_done(e => {
|
||||
assert_equals(e.data.hasOpener, data.hasOpener);
|
||||
}), {once: true});
|
||||
|
||||
document.getElementById(data.id).click();
|
||||
}, data.name);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -4,7 +4,7 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
// https://html.spec.whatwg.org/#report-the-error
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#report-the-error
|
||||
// If script's muted errors is true, then set message to "Script error.",
|
||||
// urlString to the empty string, line and col to 0, and errorValue to null.
|
||||
setup({allow_uncaught_exception: true});
|
||||
|
@ -43,6 +43,16 @@
|
|||
script.onload = test3.step_func_done(() => check(true));
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
|
||||
var test4 = async_test("Errors for same-origin scripts redirected to a " +
|
||||
"cross-origin url and redirected back to " +
|
||||
"same-origin should be muted");
|
||||
var check4 = test4.step_func_done(() => check(true));
|
||||
|
||||
var test5 = async_test("Errors for cross-origin scripts redirected to a " +
|
||||
"same-origin url should be muted");
|
||||
var check5 = test5.step_func_done(() => check(true));
|
||||
|
||||
function unreachable() { log.push("unexpected"); }
|
||||
</script>
|
||||
<script src="cacheable-script-throw.py" onerror="test1.unreached_func()()" onload="check1()"></script>
|
||||
|
@ -50,3 +60,10 @@
|
|||
onerror="test2.unreached_func()()" onload="check2()"></script>
|
||||
<iframe src="//{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/muted-errors-iframe.html"
|
||||
onerror="test3.unreached_func()()" onload="step3()"></iframe>
|
||||
<script src="/fetch/api/resources/redirect.py?location=
|
||||
//{{domains[www2]}}:{{ports[http][0]}}/fetch/api/resources/redirect.py?location=
|
||||
//{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/cacheable-script-throw.py?same-cross-same"
|
||||
onerror="test4.unreached_func()()" onload="check4()"></script>
|
||||
<script src="//{{domains[www2]}}:{{ports[http][0]}}/fetch/api/resources/redirect.py?location=
|
||||
//{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/cacheable-script-throw.py?cross-same"
|
||||
onerror="test5.unreached_func()()" onload="check5()"></script>
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
[elementPosition.html]
|
||||
expected:
|
||||
if product == "chrome" or product == "safari": ERROR
|
||||
if product == "chrome": ERROR
|
||||
|
||||
[TestDriver actions: element position]
|
||||
expected:
|
||||
if product == "safari": FAIL
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[elementTiming.html]
|
||||
expected:
|
||||
if product == "chrome" or product == "safari": ERROR
|
||||
if product == "chrome": ERROR
|
||||
|
|
|
@ -6,6 +6,9 @@ policies and contribution forms [3].
|
|||
[1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
|
||||
[2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license
|
||||
[3] http://www.w3.org/2004/10/27-testcases
|
||||
|
||||
author: W3C http://www.w3.org/
|
||||
help: http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute
|
||||
*/
|
||||
|
||||
//
|
||||
|
@ -39,12 +42,12 @@ function test_namespace(child_name, skip_root)
|
|||
{
|
||||
if (skip_root === undefined) {
|
||||
var msg = 'window.performance is defined';
|
||||
wp_test(function () { assert_true(performanceNamespace !== undefined, msg); }, msg,{author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
|
||||
wp_test(function () { assert_true(performanceNamespace !== undefined, msg); }, msg);
|
||||
}
|
||||
|
||||
if (child_name !== undefined) {
|
||||
var msg2 = 'window.performance.' + child_name + ' is defined';
|
||||
wp_test(function() { assert_true(performanceNamespace[child_name] !== undefined, msg2); }, msg2,{author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
|
||||
wp_test(function() { assert_true(performanceNamespace[child_name] !== undefined, msg2); }, msg2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<title>window.performance.navigation.redirectCount on a non-redirected navigation</title>
|
||||
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
|
||||
<link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-timing-interface"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/performance-timeline-utils.js"></script>
|
||||
|
@ -23,7 +24,7 @@
|
|||
{
|
||||
test_equals(performanceNamespace.timing.redirectStart, 0, 'timing.redirectStart on an non-redirected navigation');
|
||||
test_equals(performanceNamespace.timing.redirectEnd, 0, 'timing.redirectEnd on an non-redirected navigation');
|
||||
test_equals(performanceNamespace.navigation.redirectCount, 0, 'navigation.redirectCount on an non-redirected navigation',{help:"http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"});
|
||||
test_equals(performanceNamespace.navigation.redirectCount, 0, 'navigation.redirectCount on an non-redirected navigation');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<title>window.performance.timing attributes on an initial navigation</title>
|
||||
<link rel="author" title="Google" href="http://www.google.com/" />
|
||||
<link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-timing-interface"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/performance-timeline-utils.js"></script>
|
||||
|
@ -21,7 +22,7 @@
|
|||
if (performanceNamespace)
|
||||
{
|
||||
test_true(frame.contentWindow.performance.navigation.type == performanceNamespace.navigation.TYPE_NAVIGATE,
|
||||
'timing.navigation.type is TYPE_NAVIGATE',{help:"http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"});
|
||||
'timing.navigation.type is TYPE_NAVIGATE');
|
||||
|
||||
test_equals(frame.contentWindow.performance.timing.unloadEventStart, 0, 'timing.unloadEventStart == 0 on navigation with no previous document');
|
||||
test_equals(frame.contentWindow.performance.timing.unloadEventEnd, 0, 'timing.unloadEventEnd == 0 navigation with no previous document');
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<title>window.performance.timing attribute ordering on a simple navigation</title>
|
||||
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
|
||||
<link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-timing-interface"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/performance-timeline-utils.js"></script>
|
||||
|
@ -43,7 +44,7 @@
|
|||
//
|
||||
test_equals(performanceNamespace.navigation.type,
|
||||
performanceNamespace.navigation.TYPE_NAVIGATE,
|
||||
'window.performance.navigation.type == TYPE_NAVIGATE',{help:"http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"});
|
||||
'window.performance.navigation.type == TYPE_NAVIGATE');
|
||||
|
||||
// navigiation must be non-0
|
||||
test_timing_greater_than('navigationStart', 0);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<title>window.performance.timing.redirect attributes on a client redirect navigation</title>
|
||||
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
|
||||
<link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-timing-interface"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/performance-timeline-utils.js"></script>
|
||||
|
@ -33,9 +34,9 @@
|
|||
{
|
||||
redirect_frame.onload = "";
|
||||
test_true(redirect_frame.contentWindow.performance.navigation.type == performanceNamespace.navigation.TYPE_NAVIGATE,
|
||||
'timing.navigation.type is TYPE_NAVIGATE',{help:"http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"});
|
||||
'timing.navigation.type is TYPE_NAVIGATE');
|
||||
|
||||
test_equals(redirect_frame.contentWindow.performance.navigation.redirectCount, 0, 'navigation.redirectCount == 0 on an client redirected navigation',{help:"http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"});
|
||||
test_equals(redirect_frame.contentWindow.performance.navigation.redirectCount, 0, 'navigation.redirectCount == 0 on an client redirected navigation');
|
||||
test_equals(redirect_frame.contentWindow.performance.timing.redirectStart, 0, 'timing.redirectStart == 0 on an client redirected navigation');
|
||||
test_equals(redirect_frame.contentWindow.performance.timing.redirectEnd, 0, 'timing.redirectEnd == 0 on an client redirected navigation');
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<title>window.performance.timing attributes after a reloaded navigation</title>
|
||||
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
|
||||
<link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-timing-interface"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/performance-timeline-utils.js"></script>
|
||||
|
@ -56,7 +57,7 @@
|
|||
// ensure the frame reloaded
|
||||
test_equals(reload_frame.contentWindow.performance.navigation.type,
|
||||
performanceNamespace.navigation.TYPE_RELOAD,
|
||||
"window.performance.navigation.type == TYPE_RELOAD", {help:"http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"});
|
||||
"window.performance.navigation.type == TYPE_RELOAD");
|
||||
|
||||
// ensure reload timings changed
|
||||
var timing = reload_frame.contentWindow.performance.timing;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<title>window.performance.timing.redirect attributes on a cross-origin server redirected navigation</title>
|
||||
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
|
||||
<link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-timing-interface"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/performance-timeline-utils.js"></script>
|
||||
|
@ -35,8 +36,8 @@
|
|||
performanceNamespace = document.getElementById("frameContext").contentWindow.performance;
|
||||
test_equals(performanceNamespace.navigation.type,
|
||||
performanceNamespace.navigation.TYPE_NAVIGATE,
|
||||
'timing.navigation.type is TYPE_NAVIGATE',{help:"http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"});
|
||||
test_equals(performanceNamespace.navigation.redirectCount, 0, 'navigation.redirectCount == 0 on a cross-origin server redirected navigation', {help:"http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"});
|
||||
'timing.navigation.type is TYPE_NAVIGATE');
|
||||
test_equals(performanceNamespace.navigation.redirectCount, 0, 'navigation.redirectCount == 0 on a cross-origin server redirected navigation');
|
||||
|
||||
test_timing_greater_than('navigationStart', 0);
|
||||
|
||||
|
|
|
@ -4,21 +4,25 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
// The window.requestIdleCallback function is used to request callbacks during browser-defined idle time.
|
||||
test(function() {
|
||||
assert_equals(typeof window.requestIdleCallback, "function");
|
||||
}, "window.requestIdleCallback is defined", {assert: "The window.requestIdleCallback function is used to request callbacks during browser-defined idle time."});
|
||||
}, "window.requestIdleCallback is defined");
|
||||
|
||||
// The window.cancelIdleCallback function is used to cancel callbacks scheduled via requestIdleCallback.
|
||||
test(function() {
|
||||
assert_equals(typeof window.cancelIdleCallback, "function");
|
||||
}, "window.cancelIdleCallback is defined", {assert: "The window.cancelIdleCallback function is used to cancel callbacks scheduled via requestIdleCallback."});
|
||||
}, "window.cancelIdleCallback is defined");
|
||||
|
||||
// The requestIdleCallback method MUST return a long
|
||||
test(function() {
|
||||
assert_equals(typeof window.requestIdleCallback(function() {}), "number");
|
||||
}, "window.requestIdleCallback() returns a number", {assert: "The requestIdleCallback method MUST return a long"});
|
||||
}, "window.requestIdleCallback() returns a number");
|
||||
|
||||
// The cancelIdleCallback method MUST return void
|
||||
test(function() {
|
||||
assert_equals(typeof window.cancelIdleCallback(1), "undefined");
|
||||
}, "window.cancelIdleCallback() returns undefined", {assert: "The cancelIdleCallback method MUST return void"});
|
||||
}, "window.cancelIdleCallback() returns undefined");
|
||||
|
||||
async_test(function() {
|
||||
// Check whether requestIdleCallback schedules a callback which gets executed
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
//
|
||||
/*
|
||||
author: W3C http://www.w3.org/
|
||||
help: http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute
|
||||
*/
|
||||
//
|
||||
// Helper Functions for NavigationTiming W3C tests
|
||||
//
|
||||
|
||||
|
@ -45,7 +49,8 @@ function wp_test(func, msg, properties)
|
|||
if (performanceNamespace === undefined || performanceNamespace == null)
|
||||
{
|
||||
// show a single error that window.performance is undefined
|
||||
test(function() { assert_true(performanceNamespace !== undefined && performanceNamespace != null, "window.performance is defined and not null"); }, "window.performance is defined and not null.", {author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
|
||||
// The window.performance attribute provides a hosting area for performance related attributes.
|
||||
test(function() { assert_true(performanceNamespace !== undefined && performanceNamespace != null, "window.performance is defined and not null"); }, "window.performance is defined and not null.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,12 +61,14 @@ function test_namespace(child_name, skip_root)
|
|||
{
|
||||
if (skip_root === undefined) {
|
||||
var msg = 'window.performance is defined';
|
||||
wp_test(function () { assert_true(performanceNamespace !== undefined, msg); }, msg,{author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
|
||||
// The window.performance attribute provides a hosting area for performance related attributes.
|
||||
wp_test(function () { assert_true(performanceNamespace !== undefined, msg); }, msg);
|
||||
}
|
||||
|
||||
if (child_name !== undefined) {
|
||||
var msg2 = 'window.performance.' + child_name + ' is defined';
|
||||
wp_test(function() { assert_true(performanceNamespace[child_name] !== undefined, msg2); }, msg2,{author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
|
||||
// The window.performance attribute provides a hosting area for performance related attributes.
|
||||
wp_test(function() { assert_true(performanceNamespace[child_name] !== undefined, msg2); }, msg2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>ScrollTimeline current time algorithm - NaN cases</title>
|
||||
<link rel="help" href="https://wicg.github.io/scroll-animations/#current-time-algorithm">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<style>
|
||||
.scroller {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 500px;
|
||||
width: 500px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id='inlineScroller' class='scroller' style='display: inline;'>
|
||||
<div class='content'></div>
|
||||
</div>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
// TODO(smcgruer): In many of the tests below, timeRange is specified when it
|
||||
// should not need to be. This is an artifact of the initial Chrome
|
||||
// implementation which doesn't support timeRange: 'auto'. These should be
|
||||
// removed in the future.
|
||||
|
||||
test(function() {
|
||||
const scroller = document.querySelector('#inlineScroller');
|
||||
const scrollTimeline = new ScrollTimeline(
|
||||
{ scrollSource: scroller, timeRange: 100, orientation: 'block' });
|
||||
|
||||
assert_equals(scrollTimeline.currentTime, null);
|
||||
}, 'currentTime should be null for a display: inline scrollSource');
|
||||
</script>
|
||||
|
||||
<div id='displayNoneScroller' class='scroller' style='display: none;'>
|
||||
<div class='content'></div>
|
||||
</div>
|
||||
<script>
|
||||
test(function() {
|
||||
const scroller = document.querySelector('#displayNoneScroller');
|
||||
const scrollTimeline = new ScrollTimeline(
|
||||
{ scrollSource: scroller, timeRange: 100, orientation: 'block' });
|
||||
|
||||
assert_equals(scrollTimeline.currentTime, null);
|
||||
}, 'currentTime should be null for a display: none scrollSource');
|
||||
</script>
|
||||
|
||||
<script>
|
||||
test(function() {
|
||||
const scroller = document.createElement('div');
|
||||
const content = document.createElement('div');
|
||||
|
||||
scroller.style.overflow = 'auto';
|
||||
scroller.style.height = '100px';
|
||||
scroller.style.width = '100px';
|
||||
content.style.height = '250px';
|
||||
content.style.width = '250px';
|
||||
|
||||
scroller.appendChild(content);
|
||||
|
||||
const scrollTimeline = new ScrollTimeline(
|
||||
{ scrollSource: scroller, timeRange: 100, orientation: 'block' });
|
||||
|
||||
assert_equals(scrollTimeline.currentTime, null);
|
||||
}, 'currentTime should be null for an unattached scrollSource');
|
||||
</script>
|
||||
|
||||
<div id='notAScroller' class='scroller' style='overflow: visible;'>
|
||||
<div class='content'></div>
|
||||
</div>
|
||||
<script>
|
||||
test(function() {
|
||||
const scroller = document.querySelector('#notAScroller');
|
||||
const scrollTimeline = new ScrollTimeline(
|
||||
{ scrollSource: scroller, timeRange: 100, orientation: 'block' });
|
||||
|
||||
assert_equals(scrollTimeline.currentTime, null);
|
||||
}, 'currentTime should be null when the scrollSource is not a scroller');
|
||||
</script>
|
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>ScrollTimeline current time algorithm - root scroller</title>
|
||||
<link rel="help" href="https://wicg.github.io/scroll-animations/#current-time-algorithm">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<style>
|
||||
html {
|
||||
/* Ensure the document is scrollable. */
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
padding-bottom: 100px;
|
||||
padding-right: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
test(function() {
|
||||
const scroller = document.scrollingElement;
|
||||
// Set the timeRange(s) such that currentTime maps directly to the value
|
||||
// scrolled. This makes it easier to assert on the currentTime in the test.
|
||||
const scrollerHeight = scroller.scrollHeight - scroller.clientHeight;
|
||||
const scrollerWidth = scroller.scrollWidth - scroller.clientWidth;
|
||||
|
||||
const blockScrollTimeline = new ScrollTimeline(
|
||||
{ scrollSource: scroller, timeRange: scrollerHeight, orientation: 'block' });
|
||||
const inlineScrollTimeline = new ScrollTimeline(
|
||||
{ scrollSource: scroller, timeRange: scrollerWidth, orientation: 'inline' });
|
||||
|
||||
// Unscrolled, both timelines should read a currentTime of 0.
|
||||
assert_equals(blockScrollTimeline.currentTime, 0);
|
||||
assert_equals(inlineScrollTimeline.currentTime, 0);
|
||||
|
||||
// Now do some scrolling and make sure that the ScrollTimelines update.
|
||||
scroller.scrollTop = 50;
|
||||
scroller.scrollLeft = 75;
|
||||
|
||||
// As noted above, the timeRange(s) are mapped such that currentTime should be
|
||||
// the scroll offset.
|
||||
assert_equals(blockScrollTimeline.currentTime, 50);
|
||||
assert_equals(inlineScrollTimeline.currentTime, 75);
|
||||
}, 'currentTime calculates the correct time for a document.scrollingElement scrollSource');
|
||||
</script>
|
|
@ -0,0 +1,350 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>ScrollTimeline current time algorithm - interaction with writing modes</title>
|
||||
<link rel="help" href="https://wicg.github.io/scroll-animations/#current-time-algorithm">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="./resources/scrolltimeline-utils.js"></script>
|
||||
|
||||
<body></body>
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
test(function() {
|
||||
const scrollerOverrides = new Map([['direction', 'rtl']]);
|
||||
const scroller = setupScrollTimelineTest(scrollerOverrides);
|
||||
|
||||
// Set the timeRange such that currentTime maps directly to the value
|
||||
// scrolled. The contents and scroller are square, so it suffices to compute
|
||||
// one edge and use it for all the timelines.
|
||||
const scrollerSize = scroller.scrollHeight - scroller.clientHeight;
|
||||
|
||||
const blockScrollTimeline = new ScrollTimeline(
|
||||
{scrollSource: scroller, timeRange: scrollerSize, orientation: 'block'});
|
||||
const inlineScrollTimeline = new ScrollTimeline(
|
||||
{scrollSource: scroller, timeRange: scrollerSize, orientation: 'inline'});
|
||||
const horizontalScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'horizontal'
|
||||
});
|
||||
const verticalScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'vertical'
|
||||
});
|
||||
|
||||
// Unscrolled, all timelines should read a current time of 0 even though the
|
||||
// X-axis will have started at the right hand side for rtl.
|
||||
assert_equals(
|
||||
blockScrollTimeline.currentTime, 0, 'Unscrolled block timeline');
|
||||
assert_equals(
|
||||
inlineScrollTimeline.currentTime, 0, 'Unscrolled inline timeline');
|
||||
assert_equals(
|
||||
horizontalScrollTimeline.currentTime, 0,
|
||||
'Unscrolled horizontal timeline');
|
||||
assert_equals(
|
||||
verticalScrollTimeline.currentTime, 0, 'Unscrolled vertical timeline');
|
||||
|
||||
// The offset in the inline/horizontal direction should be inverted. The
|
||||
// block/vertical direction should be unaffected.
|
||||
scroller.scrollTop = 50;
|
||||
scroller.scrollLeft = 75;
|
||||
|
||||
assert_equals(blockScrollTimeline.currentTime, 50, 'Scrolled block timeline');
|
||||
assert_equals(
|
||||
inlineScrollTimeline.currentTime, scrollerSize - 75,
|
||||
'Scrolled inline timeline');
|
||||
assert_equals(
|
||||
horizontalScrollTimeline.currentTime, scrollerSize - 75,
|
||||
'Scrolled horizontal timeline');
|
||||
assert_equals(
|
||||
verticalScrollTimeline.currentTime, 50, 'Scrolled vertical timeline');
|
||||
}, 'currentTime handles direction: rtl correctly');
|
||||
|
||||
test(function() {
|
||||
const scrollerOverrides = new Map([['writing-mode', 'vertical-rl']]);
|
||||
const scroller = setupScrollTimelineTest(scrollerOverrides);
|
||||
|
||||
// Set the timeRange such that currentTime maps directly to the value
|
||||
// scrolled. The contents and scroller are square, so it suffices to compute
|
||||
// one edge and use it for all the timelines.
|
||||
const scrollerSize = scroller.scrollHeight - scroller.clientHeight;
|
||||
|
||||
const blockScrollTimeline = new ScrollTimeline(
|
||||
{scrollSource: scroller, timeRange: scrollerSize, orientation: 'block'});
|
||||
const inlineScrollTimeline = new ScrollTimeline(
|
||||
{scrollSource: scroller, timeRange: scrollerSize, orientation: 'inline'});
|
||||
const horizontalScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'horizontal'
|
||||
});
|
||||
const verticalScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'vertical'
|
||||
});
|
||||
|
||||
// Unscrolled, all timelines should read a current time of 0 even though the
|
||||
// X-axis will have started at the right hand side for vertical-rl.
|
||||
assert_equals(
|
||||
blockScrollTimeline.currentTime, 0, 'Unscrolled block timeline');
|
||||
assert_equals(
|
||||
inlineScrollTimeline.currentTime, 0, 'Unscrolled inline timeline');
|
||||
assert_equals(
|
||||
horizontalScrollTimeline.currentTime, 0,
|
||||
'Unscrolled horizontal timeline');
|
||||
assert_equals(
|
||||
verticalScrollTimeline.currentTime, 0, 'Unscrolled vertical timeline');
|
||||
|
||||
// For vertical-rl, the X-axis starts on the right-hand-side and is the block
|
||||
// axis. The Y-axis is normal but is the inline axis. For the
|
||||
// horizontal/vertical cases, horizontal starts on the right-hand-side and
|
||||
// vertical is normal.
|
||||
scroller.scrollTop = 50;
|
||||
scroller.scrollLeft = 75;
|
||||
|
||||
assert_equals(
|
||||
blockScrollTimeline.currentTime, scrollerSize - 75,
|
||||
'Scrolled block timeline');
|
||||
assert_equals(
|
||||
inlineScrollTimeline.currentTime, 50, 'SCrolled inline timeline');
|
||||
assert_equals(
|
||||
horizontalScrollTimeline.currentTime, scrollerSize - 75,
|
||||
'Scrolled horizontal timeline');
|
||||
assert_equals(
|
||||
verticalScrollTimeline.currentTime, 50, 'Scrolled vertical timeline');
|
||||
}, 'currentTime handles writing-mode: vertical-rl correctly');
|
||||
|
||||
test(function() {
|
||||
const scrollerOverrides = new Map([['writing-mode', 'vertical-lr']]);
|
||||
const scroller = setupScrollTimelineTest(scrollerOverrides);
|
||||
|
||||
// Set the timeRange such that currentTime maps directly to the value
|
||||
// scrolled. The contents and scroller are square, so it suffices to compute
|
||||
// one edge and use it for all the timelines.
|
||||
const scrollerSize = scroller.scrollHeight - scroller.clientHeight;
|
||||
|
||||
const blockScrollTimeline = new ScrollTimeline(
|
||||
{scrollSource: scroller, timeRange: scrollerSize, orientation: 'block'});
|
||||
const inlineScrollTimeline = new ScrollTimeline(
|
||||
{scrollSource: scroller, timeRange: scrollerSize, orientation: 'inline'});
|
||||
const horizontalScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'horizontal'
|
||||
});
|
||||
const verticalScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'vertical'
|
||||
});
|
||||
|
||||
// Unscrolled, all timelines should read a current time of 0.
|
||||
assert_equals(
|
||||
blockScrollTimeline.currentTime, 0, 'Unscrolled block timeline');
|
||||
assert_equals(
|
||||
inlineScrollTimeline.currentTime, 0, 'Unscrolled inline timeline');
|
||||
assert_equals(
|
||||
horizontalScrollTimeline.currentTime, 0,
|
||||
'Unscrolled horizontal timeline');
|
||||
assert_equals(
|
||||
verticalScrollTimeline.currentTime, 0, 'Unscrolled vertical timeline');
|
||||
|
||||
// For vertical-lr, both axes start at their 'normal' positions but the X-axis
|
||||
// is the block direction and the Y-axis is the inline direction. This does
|
||||
// not affect horizontal/vertical.
|
||||
scroller.scrollTop = 50;
|
||||
scroller.scrollLeft = 75;
|
||||
|
||||
assert_equals(blockScrollTimeline.currentTime, 75, 'Scrolled block timeline');
|
||||
assert_equals(
|
||||
inlineScrollTimeline.currentTime, 50, 'Scrolled inline timeline');
|
||||
assert_equals(
|
||||
horizontalScrollTimeline.currentTime, 75, 'Scrolled horizontal timeline');
|
||||
assert_equals(
|
||||
verticalScrollTimeline.currentTime, 50, 'Scrolled vertical timeline');
|
||||
}, 'currentTime handles writing-mode: vertical-lr correctly');
|
||||
|
||||
test(function() {
|
||||
const scrollerOverrides = new Map([['direction', 'rtl']]);
|
||||
const scroller = setupScrollTimelineTest(scrollerOverrides);
|
||||
// Set the timeRange such that currentTime maps directly to the value
|
||||
// scrolled. The contents and scroller are square, so it suffices to compute
|
||||
// one edge and use it for all the timelines.
|
||||
const scrollerSize = scroller.scrollHeight - scroller.clientHeight;
|
||||
|
||||
const lengthScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'horizontal',
|
||||
startScrollOffset: '20px'
|
||||
});
|
||||
const percentageScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'horizontal',
|
||||
startScrollOffset: '20%'
|
||||
});
|
||||
const calcScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'horizontal',
|
||||
startScrollOffset: 'calc(20% - 5px)'
|
||||
});
|
||||
|
||||
// Unscrolled, all timelines should read a current time of unresolved, since
|
||||
// the current offset (0) will be less than the startScrollOffset.
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime, null,
|
||||
'Unscrolled length-based timeline');
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime, null,
|
||||
'Unscrolled percentage-based timeline');
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime, null, 'Unscrolled calc-based timeline');
|
||||
|
||||
// With direction rtl offsets are inverted, such that scrollLeft ==
|
||||
// scrollerSize is the 'zero' point for currentTime. However the
|
||||
// startScrollOffset is an absolute distance along the offset, so doesn't
|
||||
// need adjusting.
|
||||
|
||||
// Check the length-based ScrollTimeline.
|
||||
scroller.scrollLeft = scrollerSize;
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime, null,
|
||||
'Length-based timeline before the startScrollOffset point');
|
||||
scroller.scrollLeft = scrollerSize - 20;
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime, 0,
|
||||
'Length-based timeline at the startScrollOffset point');
|
||||
scroller.scrollLeft = scrollerSize - 50;
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime,
|
||||
calculateCurrentTime(50, 20, scrollerSize, scrollerSize),
|
||||
'Length-based timeline after the startScrollOffset point');
|
||||
|
||||
// Check the percentage-based ScrollTimeline.
|
||||
scroller.scrollLeft = scrollerSize - (0.19 * scrollerSize);
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime, null,
|
||||
'Percentage-based timeline before the startScrollOffset point');
|
||||
scroller.scrollLeft = scrollerSize - (0.20 * scrollerSize);
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime, 0,
|
||||
'Percentage-based timeline at the startScrollOffset point');
|
||||
scroller.scrollLeft = scrollerSize - (0.4 * scrollerSize);
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
0.4 * scrollerSize, 0.2 * scrollerSize, scrollerSize, scrollerSize),
|
||||
'Percentage-based timeline after the startScrollOffset point');
|
||||
|
||||
// Check the calc-based ScrollTimeline.
|
||||
scroller.scrollLeft = scrollerSize - (0.2 * scrollerSize - 10);
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime, null,
|
||||
'Calc-based timeline before the startScrollOffset point');
|
||||
scroller.scrollLeft = scrollerSize - (0.2 * scrollerSize - 5);
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime, 0,
|
||||
'Calc-based timeline at the startScrollOffset point');
|
||||
scroller.scrollLeft = scrollerSize - (0.2 * scrollerSize);
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
0.2 * scrollerSize, 0.2 * scrollerSize - 5, scrollerSize,
|
||||
scrollerSize),
|
||||
'Calc-based timeline after the startScrollOffset point');
|
||||
}, 'currentTime handles startScrollOffset with direction: rtl correctly');
|
||||
|
||||
test(function() {
|
||||
const scrollerOverrides = new Map([['direction', 'rtl']]);
|
||||
const scroller = setupScrollTimelineTest(scrollerOverrides);
|
||||
// Set the timeRange such that currentTime maps directly to the value
|
||||
// scrolled. The contents and scroller are square, so it suffices to compute
|
||||
// one edge and use it for all the timelines.
|
||||
const scrollerSize = scroller.scrollHeight - scroller.clientHeight;
|
||||
|
||||
const lengthScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'horizontal',
|
||||
endScrollOffset: (scrollerSize - 20) + 'px'
|
||||
});
|
||||
const percentageScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'horizontal',
|
||||
endScrollOffset: '80%'
|
||||
});
|
||||
const calcScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'horizontal',
|
||||
endScrollOffset: 'calc(80% + 5px)'
|
||||
});
|
||||
|
||||
// With direction rtl offsets are inverted, such that scrollLeft ==
|
||||
// scrollerSize is the 'zero' point for currentTime. However the
|
||||
// endScrollOffset is an absolute distance along the offset, so doesn't need
|
||||
// adjusting.
|
||||
|
||||
// Check the length-based ScrollTimeline.
|
||||
scroller.scrollLeft = 0;
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime, null,
|
||||
'Length-based timeline after the endScrollOffset point');
|
||||
scroller.scrollLeft = 20;
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
scrollerSize - 20, 0, scrollerSize - 20, scrollerSize),
|
||||
'Length-based timeline at the endScrollOffset point');
|
||||
scroller.scrollLeft = 50;
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
scrollerSize - 50, 0, scrollerSize - 20, scrollerSize),
|
||||
'Length-based timeline before the endScrollOffset point');
|
||||
|
||||
// Check the percentage-based ScrollTimeline.
|
||||
scroller.scrollLeft = 0.19 * scrollerSize;
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime, null,
|
||||
'Percentage-based timeline after the endScrollOffset point');
|
||||
scroller.scrollLeft = 0.20 * scrollerSize;
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
0.8 * scrollerSize, 0, 0.8 * scrollerSize, scrollerSize),
|
||||
'Percentage-based timeline at the endScrollOffset point');
|
||||
scroller.scrollLeft = 0.4 * scrollerSize;
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
0.6 * scrollerSize, 0, 0.8 * scrollerSize, scrollerSize),
|
||||
'Percentage-based timeline before the endScrollOffset point');
|
||||
|
||||
// Check the calc-based ScrollTimeline. 80% + 5px
|
||||
scroller.scrollLeft = 0.2 * scrollerSize - 10;
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime, null,
|
||||
'Calc-based timeline after the endScrollOffset point');
|
||||
scroller.scrollLeft = 0.2 * scrollerSize - 5;
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
0.8 * scrollerSize + 5, 0, 0.8 * scrollerSize + 5, scrollerSize),
|
||||
'Calc-based timeline at the endScrollOffset point');
|
||||
scroller.scrollLeft = 0.2 * scrollerSize;
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
0.8 * scrollerSize, 0, 0.8 * scrollerSize + 5, scrollerSize),
|
||||
'Calc-based timeline before the endScrollOffset point');
|
||||
}, 'currentTime handles endScrollOffset with direction: rtl correctly');
|
||||
</script>
|
|
@ -10,6 +10,8 @@
|
|||
<body></body>
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
test(function() {
|
||||
const scroller = setupScrollTimelineTest();
|
||||
// Set the timeRange such that currentTime maps directly to the value
|
||||
|
|
|
@ -176,7 +176,7 @@ def pr():
|
|||
return pr if pr != "false" else None
|
||||
|
||||
|
||||
def get_changed_files(manifest_path, rev, ignore_changes, skip_tests):
|
||||
def get_changed_files(manifest_path, rev, ignore_changes):
|
||||
if not rev:
|
||||
branch_point = testfiles.branch_point()
|
||||
revish = "%s..HEAD" % branch_point
|
||||
|
@ -189,7 +189,7 @@ def get_changed_files(manifest_path, rev, ignore_changes, skip_tests):
|
|||
logger.info("Ignoring %s changed files:\n%s" %
|
||||
(len(files_ignored), "".join(" * %s\n" % item for item in files_ignored)))
|
||||
|
||||
tests_changed, files_affected = testfiles.affected_testfiles(files_changed, skip_tests,
|
||||
tests_changed, files_affected = testfiles.affected_testfiles(files_changed,
|
||||
manifest_path=manifest_path)
|
||||
|
||||
return tests_changed, files_affected
|
||||
|
@ -217,7 +217,6 @@ def run(venv, wpt_args, **kwargs):
|
|||
with open(kwargs["config_file"], 'r') as config_fp:
|
||||
config = SafeConfigParser()
|
||||
config.readfp(config_fp)
|
||||
skip_tests = config.get("file detection", "skip_tests").split()
|
||||
ignore_changes = set(config.get("file detection", "ignore_changes").split())
|
||||
|
||||
if kwargs["output_bytes"] is not None:
|
||||
|
@ -250,7 +249,7 @@ def run(venv, wpt_args, **kwargs):
|
|||
if not wpt_kwargs["test_list"]:
|
||||
manifest_path = os.path.join(wpt_kwargs["metadata_root"], "MANIFEST.json")
|
||||
tests_changed, files_affected = get_changed_files(manifest_path, kwargs["rev"],
|
||||
ignore_changes, skip_tests)
|
||||
ignore_changes)
|
||||
|
||||
if not (tests_changed or files_affected):
|
||||
logger.info("No tests changed")
|
||||
|
|
|
@ -11,19 +11,6 @@ browser_specific_args = {
|
|||
"firefox": ["--install-browser"]
|
||||
}
|
||||
|
||||
def tests_affected(commit_range):
|
||||
output = subprocess.check_output([
|
||||
"python", "./wpt", "tests-affected", "--null", commit_range
|
||||
], stderr=open(os.devnull, "w"))
|
||||
|
||||
tests = output.split("\0")
|
||||
|
||||
# Account for trailing null byte
|
||||
if tests and not tests[-1]:
|
||||
tests.pop()
|
||||
|
||||
return tests
|
||||
|
||||
|
||||
def find_wptreport(args):
|
||||
parser = argparse.ArgumentParser()
|
||||
|
@ -56,16 +43,10 @@ def main(product, commit_range, wpt_args):
|
|||
|
||||
if commit_range:
|
||||
logger.info(
|
||||
"Identifying tests affected in range '%s'..." % commit_range
|
||||
"Running tests affected in range '%s'..." % commit_range
|
||||
)
|
||||
tests = tests_affected(commit_range)
|
||||
logger.info("Identified %s affected tests" % len(tests))
|
||||
|
||||
if not tests:
|
||||
logger.info("Quitting because no tests were affected.")
|
||||
return
|
||||
wpt_args += ['--affected', commit_range]
|
||||
else:
|
||||
tests = []
|
||||
logger.info("Running all tests")
|
||||
|
||||
wpt_args += [
|
||||
|
@ -79,7 +60,7 @@ def main(product, commit_range, wpt_args):
|
|||
]
|
||||
wpt_args += browser_specific_args.get(product, [])
|
||||
|
||||
command = ["python", "./wpt", "run"] + wpt_args + [product] + tests
|
||||
command = ["python", "./wpt", "run"] + wpt_args + [product]
|
||||
|
||||
logger.info("Executing command: %s" % " ".join(command))
|
||||
|
||||
|
|
|
@ -33,46 +33,53 @@ def should_download(manifest_path, rebuild_time=timedelta(days=5)):
|
|||
return False
|
||||
|
||||
|
||||
def git_commits(repo_root):
|
||||
def merge_pr_tags(repo_root, max_count=50):
|
||||
git = Git.get_func(repo_root)
|
||||
return [item for item in git("log", "--format=%H", "-n50").split("\n") if item]
|
||||
tags = []
|
||||
for line in git("log", "--format=%D", "--max-count=%s" % max_count).split("\n"):
|
||||
for ref in line.split(", "):
|
||||
if ref.startswith("tag: merge_pr_"):
|
||||
tags.append(ref[5:])
|
||||
return tags
|
||||
|
||||
|
||||
def github_url(commits):
|
||||
def github_url(tags):
|
||||
for tag in tags:
|
||||
url = "https://api.github.com/repos/web-platform-tests/wpt/releases/tags/%s" % tag
|
||||
try:
|
||||
resp = urlopen("https://api.github.com/repos/web-platform-tests/wpt/releases")
|
||||
resp = urlopen(url)
|
||||
except Exception:
|
||||
return None
|
||||
logger.warning("Fetching %s failed" % url)
|
||||
continue
|
||||
|
||||
if resp.code != 200:
|
||||
return None
|
||||
logger.warning("Fetching %s failed; got HTTP status %d" % (url, resp.code))
|
||||
continue
|
||||
|
||||
try:
|
||||
releases = json.load(resp.fp)
|
||||
release = json.load(resp.fp)
|
||||
except ValueError:
|
||||
logger.warning("Response was not valid JSON")
|
||||
return None
|
||||
|
||||
fallback = None
|
||||
for release in releases:
|
||||
for commit in commits:
|
||||
for item in release["assets"]:
|
||||
if item["name"] == "MANIFEST-%s.json.gz" % commit:
|
||||
# Accept both ways of naming the manfest asset, even though
|
||||
# there's no longer a reason to include the commit sha.
|
||||
if item["name"].startswith("MANIFEST-") and item["name"].endswith(".json.gz"):
|
||||
return item["browser_download_url"]
|
||||
elif item["name"] == "MANIFEST.json.gz" and not fallback:
|
||||
fallback = item["browser_download_url"]
|
||||
if fallback:
|
||||
logger.info("Can't find a commit-specific manifest so just using the most recent one")
|
||||
return fallback
|
||||
elif item["name"] == "MANIFEST.json.gz":
|
||||
return item["browser_download_url"]
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def download_manifest(manifest_path, commits_func, url_func, force=False):
|
||||
def download_manifest(manifest_path, tags_func, url_func, force=False):
|
||||
if not force and not should_download(manifest_path):
|
||||
return False
|
||||
|
||||
commits = commits_func()
|
||||
tags = tags_func()
|
||||
|
||||
url = url_func(commits)
|
||||
url = url_func(tags)
|
||||
if not url:
|
||||
logger.warning("No generated manifest found")
|
||||
return False
|
||||
|
@ -120,7 +127,7 @@ def create_parser():
|
|||
|
||||
|
||||
def download_from_github(path, tests_root, force=False):
|
||||
return download_manifest(path, lambda: git_commits(tests_root), github_url,
|
||||
return download_manifest(path, lambda: merge_pr_tags(tests_root), github_url,
|
||||
force=force)
|
||||
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ hyper/http20/connection
|
|||
|
||||
Objects that build hyper's connection-level HTTP/2 abstraction.
|
||||
"""
|
||||
from ..h2 import connection as h2Connection
|
||||
from ..h2 import events as h2Events
|
||||
from ..h2 import settings as h2Settings
|
||||
import h2.connection
|
||||
import h2.events
|
||||
import h2.settings
|
||||
|
||||
from ..compat import ssl
|
||||
from ..tls import wrap_socket, H2_NPN_PROTOCOLS, H2C_PROTOCOL
|
||||
|
@ -185,7 +185,7 @@ class HTTP20Connection(object):
|
|||
users should be strongly discouraged from messing about with connection
|
||||
objects themselves.
|
||||
"""
|
||||
self._conn = _LockedObject(h2Connection.H2Connection())
|
||||
self._conn = _LockedObject(h2.connection.H2Connection())
|
||||
|
||||
# Streams are stored in a dictionary keyed off their stream IDs. We
|
||||
# also save the most recent one for easy access without having to walk
|
||||
|
@ -387,7 +387,7 @@ class HTTP20Connection(object):
|
|||
with self._conn as conn:
|
||||
conn.initiate_upgrade_connection()
|
||||
conn.update_settings(
|
||||
{h2Settings.ENABLE_PUSH: int(self._enable_push)}
|
||||
{h2.settings.SettingCodes.ENABLE_PUSH: int(self._enable_push)}
|
||||
)
|
||||
self._send_outstanding_data()
|
||||
|
||||
|
@ -408,7 +408,7 @@ class HTTP20Connection(object):
|
|||
with self._conn as conn:
|
||||
conn.initiate_connection()
|
||||
conn.update_settings(
|
||||
{h2Settings.ENABLE_PUSH: int(self._enable_push)}
|
||||
{h2.settings.SettingCodes.ENABLE_PUSH: int(self._enable_push)}
|
||||
)
|
||||
self._send_outstanding_data()
|
||||
|
||||
|
@ -673,10 +673,10 @@ class HTTP20Connection(object):
|
|||
self.recent_recv_streams |= stream_ids
|
||||
|
||||
for event in events:
|
||||
if isinstance(event, h2Events.DataReceived):
|
||||
if isinstance(event, h2.events.DataReceived):
|
||||
self._adjust_receive_window(event.flow_controlled_length)
|
||||
self.streams[event.stream_id].receive_data(event)
|
||||
elif isinstance(event, h2Events.PushedStreamReceived):
|
||||
elif isinstance(event, h2.events.PushedStreamReceived):
|
||||
if self._enable_push:
|
||||
self._new_stream(event.pushed_stream_id, local_closed=True)
|
||||
self.streams[event.parent_stream_id].receive_push(event)
|
||||
|
@ -686,17 +686,17 @@ class HTTP20Connection(object):
|
|||
# client action undefined when they do it anyway. So we
|
||||
# just refuse the stream and go about our business.
|
||||
self._send_rst_frame(event.pushed_stream_id, 7)
|
||||
elif isinstance(event, h2Events.ResponseReceived):
|
||||
elif isinstance(event, h2.events.ResponseReceived):
|
||||
self.streams[event.stream_id].receive_response(event)
|
||||
elif isinstance(event, h2Events.TrailersReceived):
|
||||
elif isinstance(event, h2.events.TrailersReceived):
|
||||
self.streams[event.stream_id].receive_trailers(event)
|
||||
elif isinstance(event, h2Events.StreamEnded):
|
||||
elif isinstance(event, h2.events.StreamEnded):
|
||||
self.streams[event.stream_id].receive_end_stream(event)
|
||||
elif isinstance(event, h2Events.StreamReset):
|
||||
elif isinstance(event, h2.events.StreamReset):
|
||||
if event.stream_id not in self.reset_streams:
|
||||
self.reset_streams.add(event.stream_id)
|
||||
self.streams[event.stream_id].receive_reset(event)
|
||||
elif isinstance(event, h2Events.ConnectionTerminated):
|
||||
elif isinstance(event, h2.events.ConnectionTerminated):
|
||||
# If we get GoAway with error code zero, we are doing a
|
||||
# graceful shutdown and all is well. Otherwise, throw an
|
||||
# exception.
|
||||
|
|
|
@ -8,7 +8,7 @@ from six.moves import input
|
|||
wpt_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(wpt_root, "tools")))
|
||||
|
||||
from . import browser, install, utils, virtualenv
|
||||
from . import browser, install, testfiles, utils, virtualenv
|
||||
from ..serve import serve
|
||||
|
||||
logger = None
|
||||
|
@ -45,6 +45,8 @@ def create_parser():
|
|||
parser = argparse.ArgumentParser(add_help=False)
|
||||
parser.add_argument("product", action="store",
|
||||
help="Browser to run tests in")
|
||||
parser.add_argument("--affected", action="store", default=None,
|
||||
help="Run affected tests since revish")
|
||||
parser.add_argument("--yes", "-y", dest="prompt", action="store_false", default=True,
|
||||
help="Don't prompt before installing components")
|
||||
parser.add_argument("--install-browser", action="store_true",
|
||||
|
@ -63,9 +65,12 @@ def create_parser():
|
|||
return parser
|
||||
|
||||
|
||||
def exit(msg):
|
||||
def exit(msg=None):
|
||||
if msg:
|
||||
logger.error(msg)
|
||||
sys.exit(1)
|
||||
else:
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def args_general(kwargs):
|
||||
|
@ -489,6 +494,23 @@ def setup_wptrunner(venv, prompt=True, install_browser=False, **kwargs):
|
|||
setup_cls = product_setup[kwargs["product"]](venv, prompt, sub_product)
|
||||
setup_cls.install_requirements()
|
||||
|
||||
affected_revish = kwargs.pop("affected", None)
|
||||
if affected_revish is not None:
|
||||
files_changed, _ = testfiles.files_changed(
|
||||
affected_revish, include_uncommitted=True, include_new=True)
|
||||
# TODO: Perhaps use wptrunner.testloader.ManifestLoader here
|
||||
# and remove the manifest-related code from testfiles.
|
||||
# https://github.com/web-platform-tests/wpt/issues/14421
|
||||
tests_changed, tests_affected = testfiles.affected_testfiles(
|
||||
files_changed, manifest_path=kwargs.get("manifest_path"), manifest_update=kwargs["manifest_update"])
|
||||
test_list = tests_changed | tests_affected
|
||||
logger.info("Identified %s affected tests" % len(test_list))
|
||||
if not test_list and not kwargs["test_list"]:
|
||||
logger.info("Quitting because no tests were affected.")
|
||||
exit()
|
||||
test_list = [os.path.relpath(item, wpt_root) for item in test_list]
|
||||
kwargs["test_list"] += test_list
|
||||
|
||||
if install_browser and not kwargs["channel"]:
|
||||
logger.info("--install-browser is given but --channel is not set, default to nightly channel")
|
||||
kwargs["channel"] = "nightly"
|
||||
|
|
|
@ -162,9 +162,12 @@ def exclude_ignored(files, ignore_rules):
|
|||
|
||||
|
||||
def files_changed(revish, ignore_rules=None, include_uncommitted=False, include_new=False):
|
||||
"""Get and return files changed since current branch diverged from master,
|
||||
excluding those that are located within any path matched by
|
||||
`ignore_rules`."""
|
||||
"""Find files changed in certain revisions.
|
||||
|
||||
The function passes `revish` directly to `git diff`, so `revish` can have a
|
||||
variety of forms; see `git diff --help` for details. Files in the diff that
|
||||
are matched by `ignore_rules` are excluded.
|
||||
"""
|
||||
files = repo_files_changed(revish,
|
||||
include_uncommitted=include_uncommitted,
|
||||
include_new=include_new)
|
||||
|
@ -183,7 +186,7 @@ def _in_repo_root(full_path):
|
|||
def _init_manifest_cache():
|
||||
c = {}
|
||||
|
||||
def load(manifest_path=None):
|
||||
def load(manifest_path=None, manifest_update=True):
|
||||
if manifest_path is None:
|
||||
manifest_path = os.path.join(wpt_root, "MANIFEST.json")
|
||||
if c.get(manifest_path):
|
||||
|
@ -191,7 +194,7 @@ def _init_manifest_cache():
|
|||
# cache at most one path:manifest
|
||||
c.clear()
|
||||
wpt_manifest = manifest.load_and_update(wpt_root, manifest_path, "/",
|
||||
update=True)
|
||||
update=manifest_update)
|
||||
c[manifest_path] = wpt_manifest
|
||||
return c[manifest_path]
|
||||
return load
|
||||
|
@ -200,14 +203,17 @@ def _init_manifest_cache():
|
|||
load_manifest = _init_manifest_cache()
|
||||
|
||||
|
||||
def affected_testfiles(files_changed, skip_tests, manifest_path=None):
|
||||
def affected_testfiles(files_changed, skip_dirs=None,
|
||||
manifest_path=None, manifest_update=True):
|
||||
"""Determine and return list of test files that reference changed files."""
|
||||
if skip_dirs is None:
|
||||
skip_dirs = set(["conformance-checkers", "docs", "tools"])
|
||||
affected_testfiles = set()
|
||||
# Exclude files that are in the repo root, because
|
||||
# they are not part of any test.
|
||||
files_changed = [f for f in files_changed if not _in_repo_root(f)]
|
||||
nontests_changed = set(files_changed)
|
||||
wpt_manifest = load_manifest(manifest_path)
|
||||
wpt_manifest = load_manifest(manifest_path, manifest_update)
|
||||
|
||||
test_types = ["testharness", "reftest", "wdspec"]
|
||||
support_files = {os.path.join(wpt_root, path)
|
||||
|
@ -232,7 +238,7 @@ def affected_testfiles(files_changed, skip_tests, manifest_path=None):
|
|||
rel_path = os.path.relpath(full_path, wpt_root)
|
||||
path_components = rel_path.split(os.sep)
|
||||
top_level_subdir = path_components[0]
|
||||
if top_level_subdir in skip_tests:
|
||||
if top_level_subdir in skip_dirs:
|
||||
continue
|
||||
repo_path = "/" + os.path.relpath(full_path, wpt_root).replace(os.path.sep, "/")
|
||||
if repo_path in rewrites:
|
||||
|
@ -271,7 +277,7 @@ def affected_testfiles(files_changed, skip_tests, manifest_path=None):
|
|||
# Walk top_level_subdir looking for test files containing either the
|
||||
# relative filepath or absolute filepath to the changed files.
|
||||
if root == wpt_root:
|
||||
for dir_name in skip_tests:
|
||||
for dir_name in skip_dirs:
|
||||
dirs.remove(dir_name)
|
||||
for fname in fnames:
|
||||
test_full_path = os.path.join(root, fname)
|
||||
|
|
|
@ -156,7 +156,7 @@ class WebDriverActionSequenceProtocolPart(ActionSequenceProtocolPart):
|
|||
self.webdriver = self.parent.webdriver
|
||||
|
||||
def send_actions(self, actions):
|
||||
self.webdriver.actions.perform(actions)
|
||||
self.webdriver.actions.perform(actions['actions'])
|
||||
|
||||
|
||||
class WebDriverTestDriverProtocolPart(TestDriverProtocolPart):
|
||||
|
|
|
@ -106,7 +106,6 @@ class TestUsingH2Server:
|
|||
self.conn.connect()
|
||||
|
||||
def teardown_method(self, test_method):
|
||||
self.conn.close()
|
||||
self.server.stop()
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ from six import create_bound_method
|
|||
|
||||
wptserve = pytest.importorskip("wptserve")
|
||||
from .base import TestUsingServer, TestUsingH2Server, doc_root
|
||||
from hyper.h2.exceptions import ProtocolError
|
||||
from h2.exceptions import ProtocolError
|
||||
|
||||
def send_body_as_header(self):
|
||||
if self._response.add_required_headers:
|
||||
|
|
|
@ -6,6 +6,9 @@ policies and contribution forms [3].
|
|||
[1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
|
||||
[2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license
|
||||
[3] http://www.w3.org/2004/10/27-testcases
|
||||
|
||||
author: W3C http://www.w3.org/
|
||||
help: http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute
|
||||
*/
|
||||
|
||||
//
|
||||
|
@ -55,12 +58,12 @@ function test_namespace(child_name, skip_root)
|
|||
{
|
||||
if (skip_root === undefined) {
|
||||
var msg = 'window.performance is defined';
|
||||
wp_test(function () { assert_true(performanceNamespace !== undefined, msg); }, msg,{author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
|
||||
wp_test(function () { assert_true(performanceNamespace !== undefined, msg); }, msg);
|
||||
}
|
||||
|
||||
if (child_name !== undefined) {
|
||||
var msg2 = 'window.performance.' + child_name + ' is defined';
|
||||
wp_test(function() { assert_true(performanceNamespace[child_name] !== undefined, msg2); }, msg2,{author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
|
||||
wp_test(function() { assert_true(performanceNamespace[child_name] !== undefined, msg2); }, msg2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
69
tests/wpt/web-platform-tests/webrtc/protocol/msid-parse.html
Normal file
69
tests/wpt/web-platform-tests/webrtc/protocol/msid-parse.html
Normal file
|
@ -0,0 +1,69 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>RTCPeerconnection MSID parsing</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../RTCPeerConnection-helper.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
const preamble = `v=0
|
||||
o=- 0 3 IN IP4 127.0.0.1
|
||||
s=-
|
||||
t=0 0
|
||||
a=fingerprint:sha-256 A7:24:72:CA:6E:02:55:39:BA:66:DF:6E:CC:4C:D8:B0:1A:BF:1A:56:65:7D:F4:03:AD:7E:77:43:2A:29:EC:93
|
||||
a=ice-ufrag:6HHHdzzeIhkE0CKj
|
||||
a=ice-pwd:XYDGVpfvklQIEnZ6YnyLsAew
|
||||
m=video 1 RTP/SAVPF 100
|
||||
a=rtcp-mux
|
||||
a=sendonly
|
||||
a=mid:video
|
||||
a=rtpmap:100 VP8/30
|
||||
`;
|
||||
|
||||
|
||||
promise_test(async t => {
|
||||
const pc = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc.close());
|
||||
const ontrackPromise = addEventListenerPromise(t, pc, 'track');
|
||||
await pc.setRemoteDescription({type: 'offer', sdp: preamble});
|
||||
const trackevent = await ontrackPromise;
|
||||
assert_equals(pc.getReceivers().length, 1);
|
||||
assert_equals(trackevent.streams.length, 1, 'Stream count');
|
||||
}, 'Description with no msid produces a track with a stream');
|
||||
|
||||
promise_test(async t => {
|
||||
const pc = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc.close());
|
||||
const ontrackPromise = addEventListenerPromise(t, pc, 'track');
|
||||
await pc.setRemoteDescription({type: 'offer',
|
||||
sdp: preamble + 'a=msid:- foobar\n'});
|
||||
const trackevent = await ontrackPromise;
|
||||
assert_equals(pc.getReceivers().length, 1);
|
||||
assert_equals(trackevent.streams.length, 0);
|
||||
}, 'Description with msid:- appid produces a track with no stream');
|
||||
|
||||
promise_test(async t => {
|
||||
const pc = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc.close());
|
||||
const ontrackPromise = addEventListenerPromise(t, pc, 'track');
|
||||
await pc.setRemoteDescription({type: 'offer',
|
||||
sdp: preamble + 'a=msid:foo bar\n'});
|
||||
const trackevent = await ontrackPromise;
|
||||
assert_equals(pc.getReceivers().length, 1);
|
||||
assert_equals(trackevent.streams.length, 1);
|
||||
assert_equals(trackevent.streams[0].id, 'foo');
|
||||
}, 'Description with msid:foo bar produces a stream with id foo');
|
||||
|
||||
promise_test(async t => {
|
||||
const pc = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc.close());
|
||||
const ontrackPromise = addEventListenerPromise(t, pc, 'track');
|
||||
await pc.setRemoteDescription({type: 'offer',
|
||||
sdp: preamble + 'a=msid:foo bar\n'
|
||||
+ 'a=msid:baz bar\n'});
|
||||
const trackevent = await ontrackPromise;
|
||||
assert_equals(pc.getReceivers().length, 1);
|
||||
assert_equals(trackevent.streams.length, 2);
|
||||
}, 'Description with two msid produces two streams');
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue