diff --git a/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini b/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini index 3b874fc17488..947e223fb28f 100644 --- a/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini +++ b/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini @@ -34,6 +34,3 @@ [Revoke blob URL after creating Request, will fetch] expected: FAIL - [Revoke blob URL after calling fetch, fetch should succeed] - expected: FAIL - diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index a8f266ecbb8b..ad22286ea9c4 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -76677,6 +76677,18 @@ {} ] ], + "css/CSS2/positioning/abspos-negative-margin-001.html": [ + [ + "css/CSS2/positioning/abspos-negative-margin-001.html", + [ + [ + "/css/CSS2/positioning/abspos-negative-margin-001-ref.html", + "==" + ] + ], + {} + ] + ], "css/CSS2/positioning/abspos-overflow-001.xht": [ [ "css/CSS2/positioning/abspos-overflow-001.xht", @@ -201401,6 +201413,42 @@ {} ] ], + "mathml/presentation-markup/operators/mo-movablelimits-default.html": [ + [ + "mathml/presentation-markup/operators/mo-movablelimits-default.html", + [ + [ + "/mathml/presentation-markup/operators/mo-movablelimits-default-ref.html", + "==" + ] + ], + {} + ] + ], + "mathml/presentation-markup/operators/mo-movablelimits-dynamic.html": [ + [ + "mathml/presentation-markup/operators/mo-movablelimits-dynamic.html", + [ + [ + "/mathml/presentation-markup/operators/mo-movablelimits-dynamic-ref.html", + "==" + ] + ], + {} + ] + ], + "mathml/presentation-markup/operators/mo-movablelimits.html": [ + [ + "mathml/presentation-markup/operators/mo-movablelimits.html", + [ + [ + "/mathml/presentation-markup/operators/mo-movablelimits-ref.html", + "==" + ] + ], + {} + ] + ], "mathml/presentation-markup/operators/mo-paint-lspace-rspace.html": [ [ "mathml/presentation-markup/operators/mo-paint-lspace-rspace.html", @@ -201485,6 +201533,18 @@ {} ] ], + "mathml/relations/css-styling/mathsize-attribute.html": [ + [ + "mathml/relations/css-styling/mathsize-attribute.html", + [ + [ + "/mathml/relations/css-styling/mathsize-attribute-ref.html", + "==" + ] + ], + {} + ] + ], "mathml/relations/css-styling/mathvariant-bold-fraktur.html": [ [ "mathml/relations/css-styling/mathvariant-bold-fraktur.html", @@ -201857,6 +201917,42 @@ {} ] ], + "quirks/body-fills-html-quirk-float.html": [ + [ + "quirks/body-fills-html-quirk-float.html", + [ + [ + "/quirks/body-fills-html-quirk-ref.html", + "==" + ] + ], + {} + ] + ], + "quirks/body-fills-html-quirk-inline.html": [ + [ + "quirks/body-fills-html-quirk-inline.html", + [ + [ + "/quirks/body-fills-html-quirk-ref.html", + "==" + ] + ], + {} + ] + ], + "quirks/body-fills-html-quirk-positioned.html": [ + [ + "quirks/body-fills-html-quirk-positioned.html", + [ + [ + "/quirks/body-fills-html-quirk-ref.html", + "==" + ] + ], + {} + ] + ], "quirks/historical/list-item-bullet-size.html": [ [ "quirks/historical/list-item-bullet-size.html", @@ -201905,6 +202001,18 @@ {} ] ], + "quirks/table-cell-width-calculation-abspos.html": [ + [ + "quirks/table-cell-width-calculation-abspos.html", + [ + [ + "/quirks/reference/table-cell-width-calculation-abspos-ref.html", + "==" + ] + ], + {} + ] + ], "quirks/text-decoration-doesnt-propagate-into-tables/quirks.html": [ [ "quirks/text-decoration-doesnt-propagate-into-tables/quirks.html", @@ -233980,6 +234088,9 @@ "css/CSS2/positioning/abspos-inline-007-ref.xht": [ [] ], + "css/CSS2/positioning/abspos-negative-margin-001-ref.html": [ + [] + ], "css/CSS2/positioning/abspos-overflow-001-ref.xht": [ [] ], @@ -248050,6 +248161,9 @@ "css/css-lists/add-inline-child-after-marker-001-ref.html": [ [] ], + "css/css-lists/change-list-style-type-ref.html": [ + [] + ], "css/css-lists/content-property/marker-text-matches-armenian-ref.html": [ [] ], @@ -270760,6 +270874,15 @@ "mathml/presentation-markup/operators/mo-form-ref.html": [ [] ], + "mathml/presentation-markup/operators/mo-movablelimits-default-ref.html": [ + [] + ], + "mathml/presentation-markup/operators/mo-movablelimits-dynamic-ref.html": [ + [] + ], + "mathml/presentation-markup/operators/mo-movablelimits-ref.html": [ + [] + ], "mathml/presentation-markup/operators/mo-paint-lspace-rspace-ref.html": [ [] ], @@ -270781,6 +270904,9 @@ "mathml/relations/css-styling/lengths-1-ref.html": [ [] ], + "mathml/relations/css-styling/mathsize-attribute-ref.html": [ + [] + ], "mathml/relations/css-styling/mathvariant-bold-fraktur-ref.html": [ [] ], @@ -272485,6 +272611,9 @@ "quirks/META.yml": [ [] ], + "quirks/body-fills-html-quirk-ref.html": [ + [] + ], "quirks/hashless-hex-color/support/common.js": [ [] ], @@ -272500,6 +272629,9 @@ "quirks/reference/green-100px-square-no-red.html": [ [] ], + "quirks/reference/table-cell-width-calculation-abspos-ref.html": [ + [] + ], "quirks/support/test-ref-iframe.js": [ [] ], @@ -312768,6 +312900,12 @@ {} ] ], + "css/css-position/position-absolute-chrome-bug-002.html": [ + [ + "css/css-position/position-absolute-chrome-bug-002.html", + {} + ] + ], "css/css-position/position-absolute-container-dynamic-002.html": [ [ "css/css-position/position-absolute-container-dynamic-002.html", @@ -316812,6 +316950,12 @@ {} ] ], + "css/css-text/white-space/append-whitespace-only-node-crash-001.html": [ + [ + "css/css-text/white-space/append-whitespace-only-node-crash-001.html", + {} + ] + ], "css/css-text/white-space/nowrap-wbr-and-space-crash.html": [ [ "css/css-text/white-space/nowrap-wbr-and-space-crash.html", @@ -320936,6 +321080,12 @@ {} ] ], + "css/cssom-view/elementFromPoint-subpixel.html": [ + [ + "css/cssom-view/elementFromPoint-subpixel.html", + {} + ] + ], "css/cssom-view/elementFromPoint.html": [ [ "css/cssom-view/elementFromPoint.html", @@ -321694,6 +321844,12 @@ {} ] ], + "css/cssom/cssstyledeclaration-setter-form-controls.html": [ + [ + "css/cssom/cssstyledeclaration-setter-form-controls.html", + {} + ] + ], "css/cssom/cssstyledeclaration-setter-logical.html": [ [ "css/cssom/cssstyledeclaration-setter-logical.html", @@ -351264,6 +351420,12 @@ {} ] ], + "html/semantics/scripting-1/the-script-element/module/inactive-context-import.html": [ + [ + "html/semantics/scripting-1/the-script-element/module/inactive-context-import.html", + {} + ] + ], "html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html": [ [ "html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html", @@ -387178,30 +387340,6 @@ {} ] ], - "sms/constructor.tentative.https.any.js": [ - [ - "sms/constructor.tentative.https.any.html", - { - "script_metadata": [ - [ - "title", - "SMS Receiver API: Constructor" - ] - ] - } - ], - [ - "sms/constructor.tentative.https.any.worker.html", - { - "script_metadata": [ - [ - "title", - "SMS Receiver API: Constructor" - ] - ] - } - ] - ], "sms/idlharness.https.any.js": [ [ "sms/idlharness.https.any.html", @@ -429381,6 +429519,12 @@ {} ] ], + "css/css-lists/change-list-style-type.html": [ + [ + "css/css-lists/change-list-style-type.html", + {} + ] + ], "css/css-lists/list-style-type-armenian-002.xht": [ [ "css/css-lists/list-style-type-armenian-002.xht", @@ -502970,6 +503114,14 @@ "9233b4373e5e4dc5beb6713a9af1de861c5cf4d9", "reftest" ], + "css/CSS2/positioning/abspos-negative-margin-001-ref.html": [ + "e6f9bd6f9ad302edca80f34b70ebfcaf1d22e68c", + "support" + ], + "css/CSS2/positioning/abspos-negative-margin-001.html": [ + "6b6246eb195d102e23b8d4c7a9407235b6cc14c1", + "reftest" + ], "css/CSS2/positioning/abspos-overflow-001-ref.xht": [ "ba7e87c6a7c18a9335b51e07052ab47631299c9b", "support" @@ -550914,6 +551066,14 @@ "228604ee357d22027c1691bf2baf27a52729222b", "reftest" ], + "css/css-lists/change-list-style-type-ref.html": [ + "033af1333132a2696d1a80ceacfc91f1ebf67a08", + "support" + ], + "css/css-lists/change-list-style-type.html": [ + "3d68ca4a7eaa0fe9bbc94c94fa290ce6026272c6", + "visual" + ], "css/css-lists/content-property/marker-text-matches-armenian-ref.html": [ "f21dfff69608a6a1201bd586c2a6e1e24d5fd915", "support" @@ -555562,6 +555722,10 @@ "3e8899a94099983b147f0877a6d45a17341a0364", "testharness" ], + "css/css-position/position-absolute-chrome-bug-002.html": [ + "5fef5205f94576cc4834f98a2cb1f2007df94974", + "testharness" + ], "css/css-position/position-absolute-container-dynamic-002.html": [ "91d862835e6d1351deefb26f7e2b71a9539bbd6c", "testharness" @@ -567790,6 +567954,10 @@ "9d6b2c2bc7d0cde02d992f741884bf702c0398a4", "reftest" ], + "css/css-text/white-space/append-whitespace-only-node-crash-001.html": [ + "b32555b18876898beb1b3b7b4559268d64ae9c1c", + "testharness" + ], "css/css-text/white-space/break-spaces-001.html": [ "f3b881afc1074db7511acbc419e5083ebde3413e", "reftest" @@ -587270,6 +587438,10 @@ "899e411bdd302f2995a9d337ac5a3f89bd1c709b", "testharness" ], + "css/cssom-view/elementFromPoint-subpixel.html": [ + "ff67aa2e7f32aa56cc316a11302882caccfe69b6", + "testharness" + ], "css/cssom-view/elementFromPoint.html": [ "466fb5cb0a004e35cd74638a5187b01da9ca0a4d", "testharness" @@ -588010,6 +588182,10 @@ "e66466e7a11b7883f9ad9de84d9cedc27ac3ea61", "testharness" ], + "css/cssom/cssstyledeclaration-setter-form-controls.html": [ + "ae556ed1cbec68c757188518e2cf6cd4ebd5cd05", + "testharness" + ], "css/cssom/cssstyledeclaration-setter-logical.html": [ "13d68e9a70229861dc1109972caa541147adb859", "testharness" @@ -602143,7 +602319,7 @@ "support" ], "docs/writing-tests/index.md": [ - "20292fd33a3db279316355f8b5012070d41bc3b7", + "9680a359b27197f4acc8c08a786ddb1823b90a7a", "support" ], "docs/writing-tests/lint-tool.md": [ @@ -604587,7 +604763,7 @@ "testharness" ], "element-timing/background-image-multiple-elements.html": [ - "24f72a67c34d0cc5323c6d4a0acb2e25085ec87a", + "084bb9ca0205815a1c7ad7764ce1979485e88435", "testharness" ], "element-timing/background-image-stretched.html": [ @@ -604687,7 +604863,7 @@ "testharness" ], "element-timing/observe-text.html": [ - "a9a0e30adf353f342ad8bb6a2300ea90beb5d9fa", + "16382edaa9da45c246f34443ce3e70b7177f9203", "testharness" ], "element-timing/observe-video-poster.html": [ @@ -627102,6 +627278,10 @@ "ca6900744dcf3a07d98ddaa17b4173fd4bed5fb9", "testharness" ], + "html/semantics/scripting-1/the-script-element/module/inactive-context-import.html": [ + "ce88c0a1528613e6586f2188e583d44d5c89fe67", + "testharness" + ], "html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html": [ "db03612e82b42b6bd3294ced7468bb6c8b702520", "testharness" @@ -631867,7 +632047,7 @@ "support" ], "interfaces/webxr.idl": [ - "f9bfdce58425350d1404c4beaac719e04c94a498", + "4af1c96a1847445c7559dabba20cb8a3a1de5c60", "support" ], "interfaces/worklets.idl": [ @@ -632391,7 +632571,7 @@ "testharness" ], "lint.whitelist": [ - "be52aa67c00b9484180e316d6594e31d4918087d", + "9966d7c307b5520ab251d69f231526df762dc4ba", "support" ], "loading/preloader-css-import-no-quote.tentative.html": [ @@ -632423,7 +632603,7 @@ "support" ], "longtask-timing/idlharness.window.js": [ - "96d939f04e7fbba348bf1edccf64c17c7af0535d", + "0ef7e85440ee1fc99c05ef5be0fc1fe61f818118", "testharness" ], "longtask-timing/longtask-attributes.html": [ @@ -632738,6 +632918,30 @@ "7c11c14691162b69c1a2e854734ae6ac37db10e2", "reftest" ], + "mathml/presentation-markup/operators/mo-movablelimits-default-ref.html": [ + "8328637397962e973130c6d8544bda90690cc471", + "support" + ], + "mathml/presentation-markup/operators/mo-movablelimits-default.html": [ + "cd01fe47682ff1be6a09551589875088476f22c4", + "reftest" + ], + "mathml/presentation-markup/operators/mo-movablelimits-dynamic-ref.html": [ + "ee5bce2ca82066424da481e8b6ecebd80c4a2e19", + "support" + ], + "mathml/presentation-markup/operators/mo-movablelimits-dynamic.html": [ + "a92c6c01dc9da3aed4012843eb156b36f877d050", + "reftest" + ], + "mathml/presentation-markup/operators/mo-movablelimits-ref.html": [ + "cb868d2400e8b8e536e3103a06a5d4502b1dbfba", + "support" + ], + "mathml/presentation-markup/operators/mo-movablelimits.html": [ + "0855594100b2b5cac13fb464108bf130288c0e32", + "reftest" + ], "mathml/presentation-markup/operators/mo-paint-lspace-rspace-ref.html": [ "da0b79ff9a67cbe53daeb141aaa2efd4f2eb96ad", "support" @@ -632862,6 +633066,14 @@ "aa38e9729de8569151b98307395ec8a2a5fe4b7f", "testharness" ], + "mathml/relations/css-styling/mathsize-attribute-ref.html": [ + "7a0450e51edf24d52a09b1ea4463483d7704bb75", + "support" + ], + "mathml/relations/css-styling/mathsize-attribute.html": [ + "00d12e4839cb91e5294409af03d3ad3847eb4213", + "reftest" + ], "mathml/relations/css-styling/mathvariant-bold-fraktur-ref.html": [ "b883b12b57dbc99c0049ba98c8d3574524c42505", "support" @@ -646002,6 +646214,22 @@ "608a7c15c7996b5ed3cf534379417c3c077c4e82", "testharness" ], + "quirks/body-fills-html-quirk-float.html": [ + "19438bc1bf35b2c4fe674ccaabb7ef32331c50a1", + "reftest" + ], + "quirks/body-fills-html-quirk-inline.html": [ + "4f15bb97c94219e566ad3c992ad37894f9d40e62", + "reftest" + ], + "quirks/body-fills-html-quirk-positioned.html": [ + "3ce416dd95cbc288318079c70890f5febc59a174", + "reftest" + ], + "quirks/body-fills-html-quirk-ref.html": [ + "180afbb84f8444aa4d83342e5679dfda26754acb", + "support" + ], "quirks/classname-query-after-sibling-adoption.html": [ "0fcad36776d5a7fe160244dc342f227b76083798", "testharness" @@ -646062,6 +646290,10 @@ "159d9a52a01a0b328680a530603cb496ab2d5fcf", "support" ], + "quirks/reference/table-cell-width-calculation-abspos-ref.html": [ + "3d365d25ad669f145a7e2ef5e4e6d0552713546a", + "support" + ], "quirks/support/test-ref-iframe.js": [ "e5df41d4249bc93b7458774524bf90f0a6f36be7", "support" @@ -646074,6 +646306,10 @@ "2ff00b9ee794c07309c05f2500b4be1b326afd7e", "testharness" ], + "quirks/table-cell-width-calculation-abspos.html": [ + "f26d06040775c8e2447ade4230fcf28ec06dee3b", + "reftest" + ], "quirks/table-cell-width-calculation.html": [ "eeb726627b78fdcbf81d3c29b9205f771bd0aca8", "testharness" @@ -661806,20 +662042,16 @@ "43b340dbb79f2585ef4acc4361ee94c6f22003f0", "testharness" ], - "sms/constructor.tentative.https.any.js": [ - "a624934ceeeace186038b15332d1c3c73968fbc7", - "testharness" - ], "sms/idlharness.https.any.js": [ - "c030a5073a0a376a1b337e563c955f78bdad41dc", + "0c31744937c6dbc9b292586ab8ce5f10b268f3ed", "testharness" ], "sms/interceptor.https.html": [ - "417120a12174859110f48a99a11405b7f2c0316e", + "4a6772f4416ab0550e451c710da1b48bbd9303d6", "testharness" ], "sms/resources/iframe.html": [ - "44410e805f7b2857809794f582a97df0d1b0ac14", + "9a00e84c63b9321d9e29c10aeb266ff5c0b1d5e1", "support" ], "sms/sms-top-level-frame-only.https.html": [ @@ -661827,11 +662059,11 @@ "testharness" ], "sms/sms_provider.js": [ - "dd3af9b747a3207d02c596b4fb6434772f3c44e3", + "a4759419a88670ec6e3f1cbd4ac3dcb3500ad57a", "support" ], "sms/sms_receiver.idl": [ - "bc6fb1dc1037fc263a5a2da35d03449fee4db48b", + "b71b6a3e0db2b74b127e4332cd83f218bb39d6aa", "support" ], "speech-api/META.yml": [ @@ -666655,7 +666887,7 @@ "support" ], "tools/ci/website_build.sh": [ - "f91975719be21e7c1461e4f8603c4f34639b840f", + "aadfcbd6a212574fa5462447072b996ae214de6b", "support" ], "tools/conftest.py": [ @@ -675463,7 +675695,7 @@ "manual" ], "web-nfc/NFCReadingEvent_constructor.https.html": [ - "460e92b2508ba438a058d5ce9ab34db0d24349cf", + "da3e4c071d1e48a43be5ee27d775721d2af88e07", "testharness" ], "web-nfc/NFCWriter_push.https.html": [ @@ -678423,7 +678655,7 @@ "testharness" ], "webrtc/RTCPeerConnection-helper.js": [ - "d859ac736ae6bf0187640dbe2148d8e0d64d9345", + "6a4ce854db70573a368ced9889e0623b15311f72", "support" ], "webrtc/RTCPeerConnection-iceConnectionState-disconnected.https.html": [ @@ -678431,7 +678663,7 @@ "testharness" ], "webrtc/RTCPeerConnection-iceConnectionState.https.html": [ - "6d4ab50b0e266c30d6ce329e1f587886f33ae5fb", + "385bb51719e6ee5049f700f783d0faa6753cdff7", "testharness" ], "webrtc/RTCPeerConnection-iceGatheringState.html": [ @@ -678719,7 +678951,7 @@ "support" ], "webrtc/protocol/candidate-exchange.https.html": [ - "2603a02cddf3f026b09b8a233d17ff3f92bd43a1", + "d1bc35819cee8e13485765e6f70836521dc5e7e7", "testharness" ], "webrtc/protocol/dtls-fingerprint-validation.html": [ diff --git a/tests/wpt/metadata/css/CSS2/positioning/abspos-negative-margin-001.html.ini b/tests/wpt/metadata/css/CSS2/positioning/abspos-negative-margin-001.html.ini new file mode 100644 index 000000000000..073aef194668 --- /dev/null +++ b/tests/wpt/metadata/css/CSS2/positioning/abspos-negative-margin-001.html.ini @@ -0,0 +1,2 @@ +[abspos-negative-margin-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini b/tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini index 8850ec200da2..1c8f983cd372 100644 --- a/tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini +++ b/tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini @@ -74,3 +74,6 @@ [opacity end] expected: FAIL + [outline-width end] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-subpixel.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-subpixel.html.ini new file mode 100644 index 000000000000..d9a87a8069c7 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementFromPoint-subpixel.html.ini @@ -0,0 +1,4 @@ +[elementFromPoint-subpixel.html] + [Hit test top left corner of box] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini b/tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini new file mode 100644 index 000000000000..e6e1f29e2743 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini @@ -0,0 +1,2 @@ +[matchMedia-display-none-iframe.html] + expected: ERROR diff --git a/tests/wpt/metadata/encoding/single-byte-decoder.html.ini b/tests/wpt/metadata/encoding/single-byte-decoder.html.ini index 939a36eb9d98..3d135f3bd664 100644 --- a/tests/wpt/metadata/encoding/single-byte-decoder.html.ini +++ b/tests/wpt/metadata/encoding/single-byte-decoder.html.ini @@ -2,6 +2,7 @@ type: testharness [single-byte-decoder.html?document] + expected: TIMEOUT [ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)] expected: FAIL diff --git a/tests/wpt/metadata/fetch/content-type/response.window.js.ini b/tests/wpt/metadata/fetch/content-type/response.window.js.ini index 76d0244413cf..6d97a137e51c 100644 --- a/tests/wpt/metadata/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/response.window.js.ini @@ -309,15 +309,9 @@ [ + + + diff --git a/tests/wpt/web-platform-tests/interfaces/webxr.idl b/tests/wpt/web-platform-tests/interfaces/webxr.idl index f9bfdce58425..4af1c96a1847 100644 --- a/tests/wpt/web-platform-tests/interfaces/webxr.idl +++ b/tests/wpt/web-platform-tests/interfaces/webxr.idl @@ -203,8 +203,6 @@ dictionary XRWebGLLayerInit { optional XRWebGLLayerInit layerInit)] interface XRWebGLLayer { // Attributes - [SameObject] readonly attribute XRWebGLRenderingContext context; - readonly attribute boolean antialias; readonly attribute boolean ignoreDepthValues; diff --git a/tests/wpt/web-platform-tests/lint.whitelist b/tests/wpt/web-platform-tests/lint.whitelist index be52aa67c00b..9966d7c307b5 100644 --- a/tests/wpt/web-platform-tests/lint.whitelist +++ b/tests/wpt/web-platform-tests/lint.whitelist @@ -813,10 +813,6 @@ LAYOUTTESTS APIS: permissions/test-background-fetch-permission.html LAYOUTTESTS APIS: resources/chromium/generic_sensor_mocks.js LAYOUTTESTS APIS: resources/chromium/webxr-test.js -# Gecko additons to remove -CSS-COLLIDING-REF-NAME: css/css-contain/reference/contain-size-fieldset-001-ref.html -CSS-COLLIDING-REF-NAME: css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-size-fieldset-001-ref.html - # Signed Exchange files have hard-coded URLs in the certUrl field WEB-PLATFORM.TEST:signed-exchange/resources/*.sxg WEB-PLATFORM.TEST:signed-exchange/appcache/resources/*.sxg diff --git a/tests/wpt/web-platform-tests/longtask-timing/idlharness.window.js b/tests/wpt/web-platform-tests/longtask-timing/idlharness.window.js index 96d939f04e7f..0ef7e85440ee 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/idlharness.window.js +++ b/tests/wpt/web-platform-tests/longtask-timing/idlharness.window.js @@ -1,51 +1,34 @@ // META: script=/resources/WebIDLParser.js // META: script=/resources/idlharness.js -// https://w3c.github.io/longtask-timing/ +// https://w3c.github.io/longtasks/ 'use strict'; -promise_test(async t => { - const srcs = ['longtasks', 'performance-timeline']; - const [idl, perf] = await Promise.all( - srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text()))); - - const idl_array = new IdlArray(); - idl_array.add_idls(idl); - idl_array.add_dependency_idls(perf); - - const testIdls = new Promise(resolve => { - try { - const observer = new PerformanceObserver(entryList => { - const entries = Array.from(entryList.getEntries()); - const attribution = entries.reduce( - (sum, e) => sum.concat(e.attribution || []), []); - idl_array.add_objects({ - PerformanceLongTaskTiming: entries, - TaskAttributionTiming: attribution, - }); - idl_array.test(); - resolve(); - }); - observer.observe({entryTypes: ['longtask']}); - } catch (e) { - // Will be surfaces in idlharness.js's test_object below. +idl_test( + ['longtasks'], + ['performance-timeline'], + (idl_array, t) => new Promise((resolve, reject) => { + const longTask = () => { + const begin = self.performance.now(); + while (self.performance.now() < begin + 100); } - }); + t.step_timeout(longTask, 0); - const longTask = () => { - var begin = self.performance.now(); - while (self.performance.now() < begin + 100); - } - t.step_timeout(longTask, 0); + const observer = new PerformanceObserver(entryList => { + const entries = Array.from(entryList.getEntries()); + const attribution = entries.reduce( + (sum, e) => sum.concat(e.attribution || []), []); + idl_array.add_objects({ + PerformanceLongTaskTiming: entries, + TaskAttributionTiming: attribution, + }); + resolve(); + }); + observer.observe({entryTypes: ['longtask']}); - const timeout = new Promise( - (_, reject) => t.step_timeout(reject, 1000)); - return Promise.race([testIdls, timeout]) - .then( - t.step_func_done(), - () => { - idl_array.test(); // Rejected, but test what we can. - return Promise.reject('LongTask was not observed'); - }); -}, 'longtasks interfaces'); + t.step_timeout(() => { + reject('longtask entry was not observed'); + }, 1000); + }) +); diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-default-ref.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-default-ref.html new file mode 100644 index 000000000000..832863739796 --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-default-ref.html @@ -0,0 +1,18 @@ + + + + mo movablelimits default value + + + + + + x + + + + x + + + + diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-default.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-default.html new file mode 100644 index 000000000000..cd01fe47682f --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-default.html @@ -0,0 +1,22 @@ + + + + + <mo> movablelimits default value + + + + + + + + + x + + + + x + + + + diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-dynamic-ref.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-dynamic-ref.html new file mode 100644 index 000000000000..ee5bce2ca820 --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-dynamic-ref.html @@ -0,0 +1,15 @@ + + + + + Test dynamically removing movablelimits attribute + + + + + + x + + + + diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-dynamic.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-dynamic.html new file mode 100644 index 000000000000..a92c6c01dc9d --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-dynamic.html @@ -0,0 +1,24 @@ + + + + + Test dynamically removing movablelimits attribute + + + + + + + + + + x + + + + diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-ref.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-ref.html new file mode 100644 index 000000000000..cb868d2400e8 --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-ref.html @@ -0,0 +1,29 @@ + + + + + <mo> movablelimits + + + + + A + B + + + A + B + + + + + A + B + + + A + B + + + + diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits.html new file mode 100644 index 000000000000..0855594100b2 --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits.html @@ -0,0 +1,32 @@ + + + + + <mo> movablelimits + + + + + + + + A + B + + + A + C + + + + + A + B + + + A + B + + + + diff --git a/tests/wpt/web-platform-tests/mathml/relations/css-styling/mathsize-attribute-ref.html b/tests/wpt/web-platform-tests/mathml/relations/css-styling/mathsize-attribute-ref.html new file mode 100644 index 000000000000..7a0450e51edf --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/relations/css-styling/mathsize-attribute-ref.html @@ -0,0 +1,19 @@ + + + + + Verify mathsize attribute + + + + +
+ + x + x + +
+ + + diff --git a/tests/wpt/web-platform-tests/mathml/relations/css-styling/mathsize-attribute.html b/tests/wpt/web-platform-tests/mathml/relations/css-styling/mathsize-attribute.html new file mode 100644 index 000000000000..00d12e4839cb --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/relations/css-styling/mathsize-attribute.html @@ -0,0 +1,21 @@ + + + + + Verify mathsize attribute + + + + + + + +
+ + x + x + +
+ + + diff --git a/tests/wpt/web-platform-tests/quirks/body-fills-html-quirk-float.html b/tests/wpt/web-platform-tests/quirks/body-fills-html-quirk-float.html new file mode 100644 index 000000000000..19438bc1bf35 --- /dev/null +++ b/tests/wpt/web-platform-tests/quirks/body-fills-html-quirk-float.html @@ -0,0 +1,18 @@ + + + + + + + diff --git a/tests/wpt/web-platform-tests/quirks/body-fills-html-quirk-inline.html b/tests/wpt/web-platform-tests/quirks/body-fills-html-quirk-inline.html new file mode 100644 index 000000000000..4f15bb97c942 --- /dev/null +++ b/tests/wpt/web-platform-tests/quirks/body-fills-html-quirk-inline.html @@ -0,0 +1,18 @@ + + + + + + + diff --git a/tests/wpt/web-platform-tests/quirks/body-fills-html-quirk-positioned.html b/tests/wpt/web-platform-tests/quirks/body-fills-html-quirk-positioned.html new file mode 100644 index 000000000000..3ce416dd95cb --- /dev/null +++ b/tests/wpt/web-platform-tests/quirks/body-fills-html-quirk-positioned.html @@ -0,0 +1,18 @@ + + + + + + + diff --git a/tests/wpt/web-platform-tests/quirks/body-fills-html-quirk-ref.html b/tests/wpt/web-platform-tests/quirks/body-fills-html-quirk-ref.html new file mode 100644 index 000000000000..180afbb84f84 --- /dev/null +++ b/tests/wpt/web-platform-tests/quirks/body-fills-html-quirk-ref.html @@ -0,0 +1,2 @@ + +
diff --git a/tests/wpt/web-platform-tests/quirks/reference/table-cell-width-calculation-abspos-ref.html b/tests/wpt/web-platform-tests/quirks/reference/table-cell-width-calculation-abspos-ref.html new file mode 100644 index 000000000000..3d365d25ad66 --- /dev/null +++ b/tests/wpt/web-platform-tests/quirks/reference/table-cell-width-calculation-abspos-ref.html @@ -0,0 +1,17 @@ + + + + + +
1234567
diff --git a/tests/wpt/web-platform-tests/quirks/table-cell-width-calculation-abspos.html b/tests/wpt/web-platform-tests/quirks/table-cell-width-calculation-abspos.html new file mode 100644 index 000000000000..f26d06040775 --- /dev/null +++ b/tests/wpt/web-platform-tests/quirks/table-cell-width-calculation-abspos.html @@ -0,0 +1,20 @@ +An out-of-flow imagef in the table cell width calculation quirk + + + + + + + +
1234567
diff --git a/tests/wpt/web-platform-tests/sms/constructor.tentative.https.any.js b/tests/wpt/web-platform-tests/sms/constructor.tentative.https.any.js deleted file mode 100644 index a624934ceeea..000000000000 --- a/tests/wpt/web-platform-tests/sms/constructor.tentative.https.any.js +++ /dev/null @@ -1,52 +0,0 @@ -// META: title=SMS Receiver API: Constructor - -'use strict'; - -test(function() { - let used = false; - - new SMSReceiver({ - get timeout() { - used = true; - return 60; - } - }); - - assert_true(used, 'constructor options "timeout" member was used'); -}, 'constructor uses timeout property'); - -test(function() { - assert_throws(new TypeError(), function () { - new SMSReceiver({timeout: 0}); - assert_unreached('Timeout 0 should reject'); - }); -}, 'constructor throws with invalid timeout (0)'); - -test(function() { - assert_throws(new TypeError(), function () { - new SMSReceiver({timeout: null}); - assert_unreached('Timeout of null should reject'); - }); -}, 'constructor throws with invalid timeout (null)'); - -test(function() { - assert_throws(new TypeError(), function () { - new SMSReceiver({timeout: -1}); - assert_unreached('Timeout negative numbers should reject'); - }); -}, 'constructor throws with invalid timeout (-1)'); - -test(function() { - assert_throws(new TypeError(), function () { - new SMSReceiver({timeout: NaN}); - assert_unreached('Timeout of NaN should reject'); - }); -}, 'constructor throws with invalid timeout (NaN)'); - -test(function() { - new SMSReceiver(); -}, 'constructor uses a default value for the timeout when none is passed'); - -test(function() { - new SMSReceiver({timeout: undefined}); -}, 'constructor uses a default value for the timeout'); diff --git a/tests/wpt/web-platform-tests/sms/idlharness.https.any.js b/tests/wpt/web-platform-tests/sms/idlharness.https.any.js index c030a5073a0a..0c31744937c6 100644 --- a/tests/wpt/web-platform-tests/sms/idlharness.https.any.js +++ b/tests/wpt/web-platform-tests/sms/idlharness.https.any.js @@ -19,12 +19,12 @@ promise_test(async (t) => { idl_array.add_dependency_idls(dom); idl_array.add_dependency_idls(html); - self.receiver = new SMSReceiver({timeout: 60}); - idl_array.add_objects({ - SmsReceiver: ['receiver'], + SmsReceiver: ['navigator.sms'], }); + idl_array.add_objects({ Navigator: ['navigator'] }) + idl_array.test(); }, 'Test IDL implementation of the SMS Receiver API'); diff --git a/tests/wpt/web-platform-tests/sms/interceptor.https.html b/tests/wpt/web-platform-tests/sms/interceptor.https.html index 417120a12174..4a6772f4416a 100644 --- a/tests/wpt/web-platform-tests/sms/interceptor.https.html +++ b/tests/wpt/web-platform-tests/sms/interceptor.https.html @@ -15,7 +15,7 @@ await expect(getNextMessage).andReturn((timeout) => { // mock behavior }) - 3) Call new SMSReceiver().start(); + 3) Call navigator.sms.receive() 4) Verify results The mocking API is browser agnostic and is designed such that other engines @@ -25,7 +25,7 @@ per engine: - function getNextMessage(): the main/only function that can be mocked. - - function expect(): the main/only function that enables us to mock it. + - function expect(): the main/only function that enables us to mock it - enum State {kSuccess, kTimeout}: allows you to mock success/failures. --> @@ -43,37 +43,140 @@ }); }); - let receiver = new SMSReceiver(); + let sms = await navigator.sms.receive(); - let watcher = new EventWatcher(t, receiver, ["change"]); + assert_equals(sms.content, "hello"); +}, 'Basic usage'); + +promise_test(async t => { + await expect(getNextMessage).andReturn((timeout) => { + return Promise.resolve({ + sms: { + content: "hello1", + status: Status.kSuccess, + } + }); + }); + await expect(getNextMessage).andReturn((timeout) => { + return Promise.resolve({ + sms: { + content: "hello2", + status: Status.kSuccess, + } + }); + }); - await receiver.start(); + let sms1 = navigator.sms.receive(); + let sms2 = navigator.sms.receive(); - // Waits for the first event. - await watcher.wait_for("change"); + let msg2 = await sms2; + let msg1 = await sms1; - assert_equals(receiver.sms.content, "hello"); -}, 'Basic usage'); + assert_equals(msg1.content, "hello1"); + assert_equals(msg2.content, "hello2"); +}, 'Handle multiple requests in different order.'); promise_test(async t => { await expect(getNextMessage).andReturn((timeout) => { return Promise.resolve({ sms: { - content: "", - status: Status.kTimeout, + status: Status.kTimeout + } + }); + }); + await expect(getNextMessage).andReturn((timeout) => { + return Promise.resolve({ + sms: { + content: "success", + status: Status.kSuccess } }); }); - let receiver = new SMSReceiver(); + let timeout_sms = navigator.sms.receive(); + let successful_sms = navigator.sms.receive(); - let watcher = new EventWatcher(t, receiver, ["timeout"]); + let successful_msg = await successful_sms; + assert_equals(successful_msg.content, "success"); - await receiver.start(); + try { + await timeout_sms; + assert_unreached('Expected TimeoutError to be thrown.'); + } catch (error) { + assert_equals(error.name, "TimeoutError"); + assert_equals(error.message, "SMSReceiver timed out."); + } +}, 'Handle multiple requests with success and error.'); - // Waits for the first event. - await watcher.wait_for("timeout"); +promise_test(async t => { + await expect(getNextMessage).andReturn((timeout) => { + return Promise.resolve({ + sms: { + status: Status.kTimeout, + } + }); + }); + + try { + await navigator.sms.receive(); + assert_unreached('Expected TimeoutError to be thrown.'); + } catch (error) { + assert_equals(error.name, "TimeoutError"); + assert_equals(error.message, "SMSReceiver timed out."); + } }, 'Deal with timeouts'); +promise_test(async t => { + try { + await navigator.sms.receive({timeout: 0}); + assert_unreached('Expected NotSupportedError to be thrown.'); + } catch (error) { + assert_equals(error.name, "NotSupportedError"); + assert_equals(error.message, "Invalid timeout."); + } +}, 'Should throw error with invalid timeout (0)'); + +promise_test(async t => { + try { + await navigator.sms.receive({timeout: null}); + assert_unreached('Expected NotSupportedError to be thrown.'); + } catch (error) { + assert_equals(error.name, "NotSupportedError"); + assert_equals(error.message, "Invalid timeout."); + } +}, 'Should throw error with invalid timeout (null)'); + +promise_test(async t => { + try { + await navigator.sms.receive({timeout: -1}); + assert_unreached('Expected NotSupportedError to be thrown.'); + } catch (error) { + assert_equals(error.name, "NotSupportedError"); + assert_equals(error.message, "Invalid timeout."); + } +}, 'Should throw error with invalid timeout (-1)'); + +promise_test(async t => { + try { + await navigator.sms.receive({timeout: NaN}); + assert_unreached('Expected NotSupportedError to be thrown.'); + } catch (error) { + assert_equals(error.name, "NotSupportedError"); + assert_equals(error.message, "Invalid timeout."); + } +}, 'Should throw error with invalid timeout (NaN)'); + +promise_test(async t => { + await expect(getNextMessage).andReturn((timeout) => { + return Promise.resolve({ + sms: { + content: "hello", + status: Status.kSuccess, + } + }); + }); - \ No newline at end of file + let sms = await navigator.sms.receive({timeout: undefined}); + assert_equals(sms.content, "hello"); +}, 'Should use default value for timeout (undefined)'); + diff --git a/tests/wpt/web-platform-tests/sms/resources/iframe.html b/tests/wpt/web-platform-tests/sms/resources/iframe.html index 44410e805f7b..9a00e84c63b9 100644 --- a/tests/wpt/web-platform-tests/sms/resources/iframe.html +++ b/tests/wpt/web-platform-tests/sms/resources/iframe.html @@ -1,7 +1,7 @@ diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js index d859ac736ae6..6a4ce854db70 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js @@ -254,6 +254,9 @@ async function doSignalingHandshake(localPc, remotePc, options={}) { // This should work for RTCSctpTransport, RTCDtlsTransport and RTCIceTransport. function waitForState(transport, state) { return new Promise((resolve, reject) => { + if (transport.state == state) { + resolve(); + } const eventHandler = () => { if (transport.state == state) { transport.removeEventListener('statechange', eventHandler, false); diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html index 6d4ab50b0e26..385bb51719e6 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html @@ -276,5 +276,42 @@ closed The RTCIceTransport has shut down and is no longer responding to STUN requests. - */ + */ + +for (let bundle_policy of ['balanced', 'max-bundle', 'max-compat']) { + + + promise_test(async t => { + const caller = new RTCPeerConnection({bundlePolicy: bundle_policy}); + t.add_cleanup(() => caller.close()); + const stream = await navigator.mediaDevices.getUserMedia( + {audio: true, video:true}); + t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); + const [track1, track2] = stream.getTracks(); + const sender1 = caller.addTrack(track1); + const sender2 = caller.addTrack(track2); + caller.createDataChannel('datachannel'); + const callee = new RTCPeerConnection(); + t.add_cleanup(() => callee.close()); + coupleIceCandidates(caller, callee); + const offer = await caller.createOffer(); + await caller.setLocalDescription(offer); + const [caller_transceiver1, caller_transceiver2] = caller.getTransceivers(); + assert_equals(sender1.transport, caller_transceiver1.sender.transport); + await callee.setRemoteDescription(offer); + const [callee_transceiver1, callee_transceiver2] = callee.getTransceivers(); + const answer = await callee.createAnswer(); + await callee.setLocalDescription(answer); + await caller.setRemoteDescription(answer); + // At this point, we should have a single ICE transport, and it + // should eventually get to the "connected" state. + await waitForState(caller_transceiver1.receiver.transport.iceTransport, + 'connected'); + // The PeerConnection's iceConnectionState should therefore be 'connected' + assert_equals(caller.iceConnectionState, 'connected', + 'PC.iceConnectionState:'); + }, 'iceConnectionState changes at the right time, with bundle policy ' + + bundle_policy); + } + diff --git a/tests/wpt/web-platform-tests/webrtc/protocol/candidate-exchange.https.html b/tests/wpt/web-platform-tests/webrtc/protocol/candidate-exchange.https.html index 2603a02cddf3..d1bc35819cee 100644 --- a/tests/wpt/web-platform-tests/webrtc/protocol/candidate-exchange.https.html +++ b/tests/wpt/web-platform-tests/webrtc/protocol/candidate-exchange.https.html @@ -26,15 +26,36 @@ return waiter; } +class StateLogger { + constructor(source, eventname, field) { + source.addEventListener(eventname, event => { + this.events.push(source[field]); + }); + this.events = [source[field]]; + } +} + +class IceStateLogger extends StateLogger { + constructor(source) { + super(source, 'iceconnectionstatechange', 'iceConnectionState'); + } +} + promise_test(async t => { const pc1 = new RTCPeerConnection(); const pc2 = new RTCPeerConnection(); t.add_cleanup(() => pc1.close()); t.add_cleanup(() => pc2.close()); pc1.createDataChannel('datachannel'); + pc1IceStates = new IceStateLogger(pc1); + pc2IceStates = new IceStateLogger(pc1); coupleIceCandidates(pc1, pc2); await doSignalingHandshake(pc1, pc2); - await waitForIceStateChange(pc1, ['connected', 'completed']); + // Note - it's been claimed that this state sometimes jumps straight + // to "completed". If so, this test should be flaky. + await waitForIceStateChange(pc1, ['connected']); + assert_array_equals(pc1IceStates.events, ['new', 'checking', 'connected']); + assert_array_equals(pc2IceStates.events, ['new', 'checking', 'connected']); }, 'Two way ICE exchange works'); promise_test(async t => { @@ -42,6 +63,8 @@ const pc2 = new RTCPeerConnection(); t.add_cleanup(() => pc1.close()); t.add_cleanup(() => pc2.close()); + pc1IceStates = new IceStateLogger(pc1); + pc2IceStates = new IceStateLogger(pc1); let candidates = []; pc1.createDataChannel('datachannel'); pc1.onicecandidate = e => { @@ -62,6 +85,8 @@ const candidate_pair = pc1.sctp.transport.iceTransport.getSelectedCandidatePair(); assert_equals(candidate_pair.local.type, 'host'); assert_equals(candidate_pair.remote.type, 'prflx'); + assert_array_equals(pc1IceStates.events, ['new', 'checking', 'connected']); + assert_array_equals(pc2IceStates.events, ['new', 'checking', 'connected']); }, 'Adding only caller -> callee candidates gives a connection'); promise_test(async t => { @@ -69,6 +94,8 @@ const pc2 = new RTCPeerConnection(); t.add_cleanup(() => pc1.close()); t.add_cleanup(() => pc2.close()); + pc1IceStates = new IceStateLogger(pc1); + pc2IceStates = new IceStateLogger(pc1); let candidates = []; pc1.createDataChannel('datachannel'); pc2.onicecandidate = e => { @@ -89,8 +116,92 @@ const candidate_pair = pc2.sctp.transport.iceTransport.getSelectedCandidatePair(); assert_equals(candidate_pair.local.type, 'host'); assert_equals(candidate_pair.remote.type, 'prflx'); + assert_array_equals(pc1IceStates.events, ['new', 'checking', 'connected']); + assert_array_equals(pc2IceStates.events, ['new', 'checking', 'connected']); }, 'Adding only callee -> caller candidates gives a connection'); +promise_test(async t => { + const pc1 = new RTCPeerConnection(); + const pc2 = new RTCPeerConnection(); + t.add_cleanup(() => pc1.close()); + t.add_cleanup(() => pc2.close()); + pc1IceStates = new IceStateLogger(pc1); + pc2IceStates = new IceStateLogger(pc1); + let pc2ToPc1Candidates = []; + pc1.createDataChannel('datachannel'); + pc2.onicecandidate = e => { + pc2ToPc1Candidates.push(e.candidate); + // This particular test verifies that candidates work + // properly if added from the pc2 onicecandidate event. + if (!e.candidate) { + for (const candidate of pc2ToPc1Candidates) { + if (candidate) { + pc1.addIceCandidate(candidate); + } + } + } + } + // Candidates from |pc1| are not delivered to |pc2|. |pc2| will use + // peer-reflexive candidates. + await doSignalingHandshake(pc1, pc2); + await Promise.all([waitForIceStateChange(pc1, ['connected', 'completed']), + waitForIceStateChange(pc2, ['connected', 'completed'])]); + const candidate_pair = pc2.sctp.transport.iceTransport.getSelectedCandidatePair(); + assert_equals(candidate_pair.local.type, 'host'); + assert_equals(candidate_pair.remote.type, 'prflx'); + assert_array_equals(pc1IceStates.events, ['new', 'checking', 'connected']); + assert_array_equals(pc2IceStates.events, ['new', 'checking', 'connected']); +}, 'Adding callee -> caller candidates from end-of-candidates gives a connection'); + +promise_test(async t => { + const pc1 = new RTCPeerConnection(); + const pc2 = new RTCPeerConnection(); + t.add_cleanup(() => pc1.close()); + t.add_cleanup(() => pc2.close()); + pc1IceStates = new IceStateLogger(pc1); + pc2IceStates = new IceStateLogger(pc1); + let pc1ToPc2Candidates = []; + let pc2ToPc1Candidates = []; + pc1.createDataChannel('datachannel'); + pc1.onicecandidate = e => { + pc1ToPc2Candidates.push(e.candidate); + } + pc2.onicecandidate = e => { + pc2ToPc1Candidates.push(e.candidate); + } + const offer = await pc1.createOffer(); + await Promise.all([pc1.setLocalDescription(offer), + pc2.setRemoteDescription(offer)]); + const answer = await pc2.createAnswer(); + await iceGatheringCompleteWaiter(pc1); + await pc2.setLocalDescription(answer).then(() => { + for (const candidate of pc1ToPc2Candidates) { + if (candidate) { + pc2.addIceCandidate(candidate); + } + } + }); + await iceGatheringCompleteWaiter(pc2); + pc1.setRemoteDescription(answer).then(async () => { + for (const candidate of pc2ToPc1Candidates) { + if (candidate) { + await pc1.addIceCandidate(candidate); + } + } + }); + await Promise.all([waitForIceStateChange(pc1, ['connected', 'completed']), + waitForIceStateChange(pc2, ['connected', 'completed'])]); + const candidate_pair = + pc1.sctp.transport.iceTransport.getSelectedCandidatePair(); + assert_equals(candidate_pair.local.type, 'host'); + // When we supply remote candidates, we expect a jump to the 'host' candidate, + // but it might also remain as 'prflx'. + assert_true(candidate_pair.remote.type == 'host' || + candidate_pair.remote.type == 'prflx'); + assert_array_equals(pc1IceStates.events, ['new', 'checking', 'connected']); + assert_array_equals(pc2IceStates.events, ['new', 'checking', 'connected']); +}, 'Explicit offer/answer exchange gives a connection'); +