Auto merge of #25874 - servo-wpt-sync:wpt_update_29-02-2020, r=servo-wpt-sync
Sync WPT with upstream (29-02-2020) Automated downstream sync of changes from upstream as of 29-02-2020. [no-wpt-sync] r? @servo-wpt-sync
|
@ -138884,6 +138884,32 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"test-synthetic-italic-2.html": [
|
||||
"6e8910e22c86c309de1403060f9a5061dbbf571c",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/css-fonts/test-synthetic-italic-2-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"test-synthetic-italic-3.html": [
|
||||
"f3c1a371562a299f110315b3aefb19fe5f20edbd",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/css-fonts/test-synthetic-italic-3-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"variations": {
|
||||
"font-descriptor-range-reversed.html": [
|
||||
"14d426245d3bdb56e67007edde5e9a49473e5694",
|
||||
|
@ -158892,7 +158918,7 @@
|
|||
]
|
||||
],
|
||||
"shape-image-024.html": [
|
||||
"d6197e1f5210bb657541d30d18ef54abd3acd191",
|
||||
"3ca0ba912b146a7aad4a51ad25d358b6ffb59367",
|
||||
[
|
||||
null,
|
||||
[
|
||||
|
@ -231187,7 +231213,7 @@
|
|||
],
|
||||
"reftests": {
|
||||
"marker-path-001.svg": [
|
||||
"6eeac7fc8f431bd7949bc998af68b36fdc2e1347",
|
||||
"7fb4adf4277321eb69e50fecb9018c1950aef4ca",
|
||||
[
|
||||
null,
|
||||
[
|
||||
|
@ -279735,6 +279761,12 @@
|
|||
[]
|
||||
]
|
||||
},
|
||||
"construct-stylesheets": {
|
||||
"META.yml": [
|
||||
"9ffc2c606c637331fc9f57e4c1905da9004dd35b",
|
||||
[]
|
||||
]
|
||||
},
|
||||
"css-align": {
|
||||
"META.yml": [
|
||||
"bd26585d9e639e3133a650c26d3f3cb93579e4ae",
|
||||
|
@ -290166,6 +290198,14 @@
|
|||
[]
|
||||
]
|
||||
},
|
||||
"test-synthetic-italic-2-ref.html": [
|
||||
"d3165b681c86dbe8b0aff6d91df56a9369d2127b",
|
||||
[]
|
||||
],
|
||||
"test-synthetic-italic-3-ref.html": [
|
||||
"a0721426016c949369ae0114211136f45ce51b27",
|
||||
[]
|
||||
],
|
||||
"variations": {
|
||||
"META.yml": [
|
||||
"53487a6d85ecaafdc33738292312120ffed4bb6a",
|
||||
|
@ -315367,6 +315407,14 @@
|
|||
"6604450991a122e3e241e40b1b9e0516c525389d",
|
||||
[]
|
||||
],
|
||||
"dedicated-worker.js": [
|
||||
"5d46edcde24c1854c19069d967038c493d7e24f0",
|
||||
[]
|
||||
],
|
||||
"iframe.html": [
|
||||
"a6b74ad924aa108e15603544f7b0a80a3e18940b",
|
||||
[]
|
||||
],
|
||||
"navigate-none.sub.html": [
|
||||
"1008f70ff123ae5e507a95ac4f16d32bbb74c983",
|
||||
[]
|
||||
|
@ -324767,6 +324815,10 @@
|
|||
"3cd3c06b54b022c61857a6a29e8e97bf4fa9b47b",
|
||||
[]
|
||||
],
|
||||
"construct-stylesheets.idl": [
|
||||
"fca2a3e2887a192f737b4ce05edc52810b2cd7a9",
|
||||
[]
|
||||
],
|
||||
"cookie-store.idl": [
|
||||
"88719369760e4b0da19ae18c4016d2ea5b3ffbe4",
|
||||
[]
|
||||
|
@ -325108,7 +325160,7 @@
|
|||
[]
|
||||
],
|
||||
"resize-observer.idl": [
|
||||
"448c949df9e38d90b96171a15ec0a4705e486395",
|
||||
"60d55a19bae8b156a99b1ad8a88089297ad409e4",
|
||||
[]
|
||||
],
|
||||
"resource-timing.idl": [
|
||||
|
@ -341638,7 +341690,7 @@
|
|||
],
|
||||
"reftests": {
|
||||
"marker-path-001-ref.svg": [
|
||||
"8f766668e6de36479666f3f27fa8eed317e5dfe8",
|
||||
"202ac3420dc080f85c4a2cac5e13ccbea6d0235e",
|
||||
[]
|
||||
],
|
||||
"marker-path-002-ref.svg": [
|
||||
|
@ -341666,11 +341718,11 @@
|
|||
[]
|
||||
],
|
||||
"marker-path-022-ref.svg": [
|
||||
"2b808f02f0988ab49a8bd6a45af9127910d198cf",
|
||||
"8abf33f0880849010f7687452a48a0648aad40d2",
|
||||
[]
|
||||
],
|
||||
"marker-path-023-ref.svg": [
|
||||
"a8e764442bb7dee2ce259082cf7cc0c8d1e143e0",
|
||||
"4bd1c67776206fb730abd16a8a69db4ad0922ff9",
|
||||
[]
|
||||
],
|
||||
"markers-orient-001-ref.svg": [
|
||||
|
@ -341979,7 +342031,7 @@
|
|||
},
|
||||
"styling": {
|
||||
"presentation-attributes.js": [
|
||||
"c9dc14ad49072cc42bfb09362f421a2f99d437f9",
|
||||
"552041496f187e97b4e17bfa445826d8cd278b99",
|
||||
[]
|
||||
],
|
||||
"render": {
|
||||
|
@ -347907,7 +347959,7 @@
|
|||
[]
|
||||
],
|
||||
"base.py": [
|
||||
"cb7323ece0ae4a9af7213a0134e976ef325e3e13",
|
||||
"ab36c95c11339951c9c5ccd5da4c19551ba8f8de",
|
||||
[]
|
||||
],
|
||||
"executorchrome.py": [
|
||||
|
@ -347927,7 +347979,7 @@
|
|||
[]
|
||||
],
|
||||
"executormarionette.py": [
|
||||
"4739d09b572d5007c2a03128cb8e2e04856cf966",
|
||||
"3f0b92f23b3e7797918cf171566f3b4b8acbbcb0",
|
||||
[]
|
||||
],
|
||||
"executoropera.py": [
|
||||
|
@ -347939,7 +347991,7 @@
|
|||
[]
|
||||
],
|
||||
"executorselenium.py": [
|
||||
"39d723a788662dd55c2707eb8d670dba6237cd3c",
|
||||
"5524d70bc718f859c6d20e06c7f86029a7b141ac",
|
||||
[]
|
||||
],
|
||||
"executorservo.py": [
|
||||
|
@ -347947,11 +347999,11 @@
|
|||
[]
|
||||
],
|
||||
"executorservodriver.py": [
|
||||
"02ecc756647656e6b20e06371d28767fa0eb00f1",
|
||||
"f6701da34058b43da63f9f82044833da0cfb9faf",
|
||||
[]
|
||||
],
|
||||
"executorwebdriver.py": [
|
||||
"eccba8c4a127f7895baa85948dc21006d5910aa5",
|
||||
"96488f462e7c89b0526a0d58ddb8ddb2cdb03a44",
|
||||
[]
|
||||
],
|
||||
"executorwebkit.py": [
|
||||
|
@ -348050,7 +348102,7 @@
|
|||
[]
|
||||
],
|
||||
"metadata.py": [
|
||||
"73b6de9ad0fd69ef1d6fce10c1e8568b9bdce9c7",
|
||||
"69373c3387f18d9b0e97e8448dcc5679135b08cd",
|
||||
[]
|
||||
],
|
||||
"process.py": [
|
||||
|
@ -348094,7 +348146,7 @@
|
|||
[]
|
||||
],
|
||||
"testrunner.py": [
|
||||
"51e75442ce714cf3ba13751ad376b5d5307ead4c",
|
||||
"f0d830787a46ad143f1e33c7783f5ff6dd1ff830",
|
||||
[]
|
||||
],
|
||||
"tests": {
|
||||
|
@ -350212,7 +350264,7 @@
|
|||
[]
|
||||
],
|
||||
"helpers.js": [
|
||||
"bf28e69cccf9b9fe2ba6becbda30910bb50a140e",
|
||||
"0fc64c8b522cfd7fce2ec585e2ec1d6bd839b855",
|
||||
[]
|
||||
],
|
||||
"resources": {
|
||||
|
@ -382955,6 +383007,15 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"construct-stylesheets": {
|
||||
"idlharness.html": [
|
||||
"85de760d6c7e3d10cbd72d35a4cbd900f37abc6c",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"css-align": {
|
||||
"animation": {
|
||||
"column-gap-composition.html": [
|
||||
|
@ -383871,7 +383932,7 @@
|
|||
]
|
||||
],
|
||||
"Document-getAnimations.tentative.html": [
|
||||
"4a9768a8b610e5327cc3497a1ec6f301642468a7",
|
||||
"b3108759d86f3f23741070388abe5d11bece7d4a",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -383966,7 +384027,7 @@
|
|||
]
|
||||
],
|
||||
"event-order.tentative.html": [
|
||||
"f4f9e29a3c859daaa9727fe3009f837a7ddeb1be",
|
||||
"58f0bb67cafdd6bc81b17a8845280ded94b73b63",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -392267,6 +392328,29 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"css-page": {
|
||||
"page-rule-declarations-000.html": [
|
||||
"227b9148a3870617ffccff141e1f763a631024b6",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"page-rule-declarations-001.html": [
|
||||
"e57424029ba827862e7be5bd1c7e949b74c58331",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"page-rule-declarations-002.html": [
|
||||
"183072dec676d6e913c3ed35935d5e06f3fd4963",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"css-paint-api": {
|
||||
"idlharness.html": [
|
||||
"aad04a17cc4c660084fa196cb85da5d88b8560d4",
|
||||
|
@ -399077,7 +399161,7 @@
|
|||
]
|
||||
],
|
||||
"Document-getAnimations.tentative.html": [
|
||||
"cecddfaa401f90ff0226d39f1c7eae9be9b7b10c",
|
||||
"cd97acfd5ec76c7585d5356c86b3832bb0b7bd37",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -399275,7 +399359,14 @@
|
|||
]
|
||||
],
|
||||
"non-rendered-element-002.html": [
|
||||
"f26a04895781b389d7bad5aee80122b1e1d878a9",
|
||||
"accf1410376ec9efadd4c8b66aca7405f5c84ddb",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"non-rendered-element-004.tentative.html": [
|
||||
"1fe2af1253d13f5719774a4ebae1203790bcfd6a",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -405930,7 +406021,14 @@
|
|||
{}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"style-attribute-selector.html": [
|
||||
"83e8102c015dcdda1933678f0bbf5bd1f2f67bf0",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"child-indexed-pseudo-class.html": [
|
||||
"2e496d854184796be55d66566af8739fd4a7f776",
|
||||
|
@ -407753,6 +407851,15 @@
|
|||
]
|
||||
],
|
||||
"scrolling": {
|
||||
"input-text-scroll-event-when-using-arrow-keys.html": [
|
||||
"f84e4465275b7a3401c8cde88677465d3cc5a18c",
|
||||
[
|
||||
null,
|
||||
{
|
||||
"testdriver": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"overscroll-deltas.html": [
|
||||
"091cfd0631b454babaeb8c32dd289468b6d509d3",
|
||||
[
|
||||
|
@ -430903,6 +431010,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"dedicated-worker-cache-storage.https.html": [
|
||||
"2559de839a304dce0c2700dc4f8ee0002de04332",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"javascript.https.html": [
|
||||
"9fe85db76f54507b1c80b9f7077a916b8795f0f9",
|
||||
[
|
||||
|
@ -537166,7 +537280,7 @@
|
|||
]
|
||||
],
|
||||
"presentation-attributes-special-cases.html": [
|
||||
"c544c9c7a64d8b17178c860f2f8c9ee14c0ab998",
|
||||
"8fa045984d9ad55097768e6608146bbe2b37e8bf",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -549482,8 +549596,15 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"k-rate-connections.html": [
|
||||
"730f03e5619577abf98c30b5566cddeeccf31551",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"k-rate-constant-source.html": [
|
||||
"4db3548dacb990b39a5dd2bc53610c8d7a4c4a9d",
|
||||
"0bea5c91f8538e6b0e9d587af1b5c8e4b018ab62",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -550554,7 +550675,7 @@
|
|||
]
|
||||
],
|
||||
"createcredential-timeout.https.html": [
|
||||
"09af4520ae87f3540772d3d257d385dfc3647058",
|
||||
"fc35a6e72f0a76a4ff410df71b346109cc215681",
|
||||
[
|
||||
null,
|
||||
{
|
||||
|
@ -550604,7 +550725,7 @@
|
|||
]
|
||||
],
|
||||
"getcredential-timeout.https.html": [
|
||||
"228ef50978971c2b17882c5f33ad4e68da61b44f",
|
||||
"c4d8aed38c63afa9fc1b720e244a918ebb1e8e0d",
|
||||
[
|
||||
null,
|
||||
{
|
||||
|
@ -550655,7 +550776,7 @@
|
|||
]
|
||||
],
|
||||
"webauthn-testdriver-basic.https.html": [
|
||||
"7790f5d0d3fd7567df24a3aeebc4d7541c118e1a",
|
||||
"4b8b08d975ebb5ef56c3aa27f2a24e630a500314",
|
||||
[
|
||||
null,
|
||||
{
|
||||
|
@ -560766,7 +560887,7 @@
|
|||
]
|
||||
],
|
||||
"shared-worker-import-failure.html": [
|
||||
"5e8f547daf69efe77a2631e78f894e0e76ac23d2",
|
||||
"14579ba762ff469d8e964ba8cfe1f584c5dd5f03",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-004.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-005.html]
|
||||
[Miss clipped float]
|
||||
expected: FAIL
|
||||
|
|
@ -44,3 +44,6 @@
|
|||
[Order of CSS Animations - within an element unaffected by start time]
|
||||
expected: FAIL
|
||||
|
||||
[CSS Animations targetting (pseudo-)elements should have correct order after sorting (::marker)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -26,3 +26,6 @@
|
|||
[Iteration and end events are ordered by time]
|
||||
expected: FAIL
|
||||
|
||||
[Same events on pseudo-elements follow the prescribed order (::marker)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[test-synthetic-italic-2.html]
|
||||
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
|||
[test-synthetic-italic-3.html]
|
||||
expected: FAIL
|
|
@ -2,3 +2,6 @@
|
|||
[Hit test intersecting scaled box]
|
||||
expected: FAIL
|
||||
|
||||
[Hit test within unscaled box]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,3 +11,6 @@
|
|||
[Transitions are not returned after they have finished]
|
||||
expected: FAIL
|
||||
|
||||
[CSS Transitions targetting (pseudo-)elements should have correct order after sorting (::marker)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[non-rendered-element-004.tentative.html]
|
||||
[Transitions on ::marker pseudo-elements are canceled when the parent display type is no longer list-item]
|
||||
expected: FAIL
|
||||
|
|
@ -2,6 +2,3 @@
|
|||
[listeners are called when <iframe> is resized]
|
||||
expected: FAIL
|
||||
|
||||
[listeners are called correct number of times]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -21,3 +21,6 @@
|
|||
[test the top of layer]
|
||||
expected: FAIL
|
||||
|
||||
[test some point of the element: top left corner]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -2,3 +2,6 @@
|
|||
[elementsFromPoint on the root document for points in iframe elements]
|
||||
expected: FAIL
|
||||
|
||||
[elementsFromPoint on inner documents]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[elementsFromPoint-invalid-cases.html]
|
||||
[The root element is the last element returned for otherwise empty queries within the viewport]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
[style-attribute-selector.html]
|
||||
[Match style attribute with no value]
|
||||
expected: FAIL
|
||||
|
||||
[Dynamically remove style with Element.style]
|
||||
expected: FAIL
|
||||
|
||||
[Match style attribute with empty value]
|
||||
expected: FAIL
|
||||
|
||||
[Dynamically change style with Element.style]
|
||||
expected: FAIL
|
||||
|
||||
[Dynamically change style with Element.style.property]
|
||||
expected: FAIL
|
||||
|
||||
[Match style attribute with background value]
|
||||
expected: FAIL
|
||||
|
||||
[Initially no style attribute to match]
|
||||
expected: FAIL
|
||||
|
||||
[Dynamically remove style with Element.style.removeProperty]
|
||||
expected: FAIL
|
||||
|
||||
[Dynamically change style with Element.setAttribute]
|
||||
expected: FAIL
|
||||
|
||||
[Dynamically remove style with Element.style.property]
|
||||
expected: FAIL
|
||||
|
||||
[Dynamically remove style with Element.removeAttribute]
|
||||
expected: FAIL
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[HTMLMediaElement.html]
|
||||
expected: TIMEOUT
|
|
@ -312,24 +312,18 @@
|
|||
[fetch(): separate response Content-Type: text/plain ]
|
||||
expected: NOTRUN
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
[<iframe>: combined response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
|
||||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -56,6 +56,6 @@
|
|||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript;charset=windows-1252 error text/javascript]
|
||||
[separate text/javascript;charset=windows-1252 text/javascript]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_5.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -20,3 +20,6 @@
|
|||
[X Rendered audio for channel 5 does not equal [0,0.0626220703125,0.125030517578125,0.18695068359375,0.24810791015625,0.308319091796875,0.3673095703125,0.42486572265625,0.480743408203125,0.53472900390625,0.58660888671875,0.636199951171875,0.68328857421875,0.727691650390625,0.76922607421875,0.8077392578125...\] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.6732959747314453e-1\t6.2622070312500000e-2\t3.0470752716064453e-1\t4.8658168859649127e+0\t3.0517578125000000e-5\n\t[2\]\t6.8329977989196777e-1\t1.2503051757812500e-1\t5.5826926231384277e-1\t4.4650639949963384e+0\t3.0517578125000000e-5\n\t[3\]\t9.0373212099075317e-1\t1.8695068359375000e-1\t7.1678143739700317e-1\t3.8340669508039502e+0\t3.0517578125000000e-5\n\t[4\]\t9.9780619144439697e-1\t2.4810791015625000e-1\t7.4969828128814697e-1\t3.0216621502152523e+0\t3.0517578125000000e-5\n\t[5\]\t9.5236867666244507e-1\t3.0831909179687500e-1\t6.4404958486557007e-1\t2.0889059484187866e+0\t3.0517578125000000e-5\n\t...and 44036 more errors.\n\tMax AbsError of 1.9962286949157715e+0 at index of 32177.\n\t[32177\]\t9.9879217147827148e-1\t-9.9743652343750000e-1\t1.9962286949157715e+0\t2.0013591321441684e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 21168.\n\t[21168\]\t9.5105654001235962e-1\t0.0000000000000000e+0\t9.5105654001235962e-1\tInfinity\t3.0517578125000000e-5\n]
|
||||
expected: FAIL
|
||||
|
||||
[X Rendered audio for channel 5 does not equal [0,0.0626220703125,0.125030517578125,0.18695068359375,0.24810791015625,0.308319091796875,0.3673095703125,0.42486572265625,0.480743408203125,0.53472900390625,0.58660888671875,0.636199951171875,0.68328857421875,0.727691650390625,0.76922607421875,0.8077392578125...\] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.6732959747314453e-1\t6.2622070312500000e-2\t3.0470752716064453e-1\t4.8658168859649127e+0\t3.0517578125000000e-5\n\t[2\]\t6.8329977989196777e-1\t1.2503051757812500e-1\t5.5826926231384277e-1\t4.4650639949963384e+0\t3.0517578125000000e-5\n\t[3\]\t9.0373212099075317e-1\t1.8695068359375000e-1\t7.1678143739700317e-1\t3.8340669508039502e+0\t3.0517578125000000e-5\n\t[4\]\t9.9780619144439697e-1\t2.4810791015625000e-1\t7.4969828128814697e-1\t3.0216621502152523e+0\t3.0517578125000000e-5\n\t[5\]\t9.5236867666244507e-1\t3.0831909179687500e-1\t6.4404958486557007e-1\t2.0889059484187866e+0\t3.0517578125000000e-5\n\t...and 44048 more errors.\n\tMax AbsError of 1.9986916780471802e+0 at index of 29020.\n\t[29020\]\t9.9994289875030518e-1\t-9.9874877929687500e-1\t1.9986916780471802e+0\t2.0011956154322119e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 10584.\n\t[10584\]\t-5.8778524398803711e-1\t0.0000000000000000e+0\t5.8778524398803711e-1\tInfinity\t3.0517578125000000e-5\n]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -146,3 +146,9 @@
|
|||
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[19030\]\t1.0053343057791861e+29\t-7.3546999692916870e-1\t1.0053343057791861e+29\t1.3669276924643975e+29\t3.8985999999999999e-3\n\t[19031\]\t-3.6017334461212158e-1\t-6.9157749414443970e-1\t3.3140414953231812e-1\t4.7920030992665957e-1\t3.8985999999999999e-3\n\t[38059\]\t1.9958413252754581e+29\t-9.8956179618835449e-1\t1.9958413252754581e+29\t2.0168940767147069e+29\t3.8985999999999999e-3\n\t[38060\]\t-8.8409073650836945e-2\t-9.9664616584777832e-1\t9.0823709219694138e-1\t9.1129341918891205e-1\t3.8985999999999999e-3\n\tMax AbsError of 1.9958413252754581e+29 at index of 38059.\n\tMax RelError of 2.0168940767147069e+29 at index of 38059.\n]
|
||||
expected: FAIL
|
||||
|
||||
[X SNR (39.52349713035221 dB) is not greater than or equal to 65.737. Got 39.52349713035221.]
|
||||
expected: FAIL
|
||||
|
||||
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[19030\]\t-6.4853054482227890e-8\t-7.3546999692916870e-1\t7.3546993207611422e-1\t9.9999991182093795e-1\t3.8985999999999999e-3\n\t[19031\]\t-3.6017334461212158e-1\t-6.9157749414443970e-1\t3.3140414953231812e-1\t4.7920030992665957e-1\t3.8985999999999999e-3\n\t[38059\]\t-1.5015864107681409e-7\t-9.8956179618835449e-1\t9.8956164602971342e-1\t9.9999984825743915e-1\t3.8985999999999999e-3\n\t[38060\]\t-8.8409073650836945e-2\t-9.9664616584777832e-1\t9.0823709219694138e-1\t9.1129341918891205e-1\t3.8985999999999999e-3\n\tMax AbsError of 9.8956164602971342e-1 at index of 38059.\n\tMax RelError of 9.9999991182093795e-1 at index of 19030.\n]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
[k-rate-connections.html]
|
||||
[X pan[256:384\]: Expected 0.5987244248390198 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t0.6529694199562073\n\t[1\]\t0.6529694199562073\n\t[2\]\t0.6529694199562073\n\t[3\]\t0.6529694199562073\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X pan[768:896\]: Expected 0.6674262881278992 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t0.6533852815628052\n\t[1\]\t0.6533852815628052\n\t[2\]\t0.6533852815628052\n\t[3\]\t0.6533852815628052\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X pan[896:1024\]: Expected 0.598724365234375 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t0.5880131721496582\n\t[1\]\t0.5880131721496582\n\t[2\]\t0.5880131721496582\n\t[3\]\t0.5880131721496582\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X pan[384:512\]: Expected 0.6674262881278992 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t0.6933872699737549\n\t[1\]\t0.6933872699737549\n\t[2\]\t0.6933872699737549\n\t[3\]\t0.6933872699737549\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X pan[512:640\]: Expected 0.7026606798171997 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t0.7071065902709961\n\t[1\]\t0.7071065902709961\n\t[2\]\t0.7071065902709961\n\t[3\]\t0.7071065902709961\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[< [StereoPanner\] 7 out of 8 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X pan[640:768\]: Expected 0.7026606202125549 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t0.6935992240905762\n\t[1\]\t0.6935992240905762\n\t[2\]\t0.6935992240905762\n\t[3\]\t0.6935992240905762\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X pan[128:256\]: Expected 0.5 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t0.5874094367027283\n\t[1\]\t0.5874094367027283\n\t[2\]\t0.5874094367027283\n\t[3\]\t0.5874094367027283\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 2 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
[k-rate-constant-source.html]
|
||||
[< [ConstantSourceNode.offset k-rate automation\] 7 out of 8 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X k-rate ConstantSource.offset: output[640:768\]: Expected 639.6246337890625 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t585.1428833007812\n\t[1\]\t585.1428833007812\n\t[2\]\t585.1428833007812\n\t[3\]\t585.1428833007812\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X k-rate ConstantSource.offset: output[896:1024\]: Expected 895.8748779296875 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t877.7142944335938\n\t[1\]\t877.7142944335938\n\t[2\]\t877.7142944335938\n\t[3\]\t877.7142944335938\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X k-rate ConstantSource.offset: output[512:640\]: Expected 511.49951171875 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t438.8571472167969\n\t[1\]\t438.8571472167969\n\t[2\]\t438.8571472167969\n\t[3\]\t438.8571472167969\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X k-rate ConstantSource.offset: output[128:256\]: Expected 127.1241455078125 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t0\n\t[1\]\t0\n\t[2\]\t0\n\t[3\]\t0\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X k-rate ConstantSource.offset: output[256:384\]: Expected 255.249267578125 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t146.2857208251953\n\t[1\]\t146.2857208251953\n\t[2\]\t146.2857208251953\n\t[3\]\t146.2857208251953\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X k-rate ConstantSource.offset: output[384:512\]: Expected 383.3743896484375 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t292.5714416503906\n\t[1\]\t292.5714416503906\n\t[2\]\t292.5714416503906\n\t[3\]\t292.5714416503906\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 3 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X k-rate ConstantSource.offset: output[768:896\]: Expected 767.749755859375 for all values but found 128 unexpected values: \n\tIndex\tActual\n\t[0\]\t731.4285888671875\n\t[1\]\t731.4285888671875\n\t[2\]\t731.4285888671875\n\t[3\]\t731.4285888671875\n\t...and 124 more errors.]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[018.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, javascript:]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
spec: https://wicg.github.io/construct-stylesheets/
|
||||
suggested_reviewers:
|
||||
- ericwilligers
|
||||
- rakina
|
||||
- tabatkins
|
|
@ -0,0 +1,25 @@
|
|||
<!doctype html>
|
||||
<title>Constructable Stylesheet Objects IDL tests</title>
|
||||
<link rel="help" href="https://wicg.github.io/construct-stylesheets/">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/WebIDLParser.js"></script>
|
||||
<script src="/resources/idlharness.js"></script>
|
||||
<div id="shadowHost"></div>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
idl_test(
|
||||
['construct-stylesheets'],
|
||||
['cssom', 'dom'],
|
||||
idl_array => {
|
||||
idl_array.add_objects({
|
||||
CSSStyleSheet: ['new CSSStyleSheet()'],
|
||||
Document: ['document'],
|
||||
ShadowRoot: ['shadowRoot'],
|
||||
});
|
||||
const shadowHost = document.getElementById('shadowHost');
|
||||
self.shadowRoot = shadowHost.attachShadow({mode: 'open'});
|
||||
}
|
||||
);
|
||||
</script>
|
|
@ -262,83 +262,88 @@ test(t => {
|
|||
'returned');
|
||||
}, 'CSS Animations canceled and restarted via the API are returned');
|
||||
|
||||
test(t => {
|
||||
// Create two divs with the following arrangement:
|
||||
//
|
||||
// parent
|
||||
// (::marker,)
|
||||
// ::before,
|
||||
// ::after
|
||||
// |
|
||||
// child
|
||||
function pseudoTest(description, testMarkerPseudos) {
|
||||
test(t => {
|
||||
// Create two divs with the following arrangement:
|
||||
//
|
||||
// parent
|
||||
// (::marker,) // Optionally
|
||||
// ::before,
|
||||
// ::after
|
||||
// |
|
||||
// child
|
||||
|
||||
addStyle(t, {
|
||||
'#parent::after': "content: ''; animation: animLeft 100s;",
|
||||
'#parent::before': "content: ''; animation: animRight 100s;",
|
||||
});
|
||||
|
||||
const supportsMarkerPseudos = CSS.supports('selector(::marker)');
|
||||
if (supportsMarkerPseudos) {
|
||||
addStyle(t, {
|
||||
'#parent': 'display: list-item;',
|
||||
'#parent::marker': "content: ''; animation: animLeft 100s;",
|
||||
'#parent::after': "content: ''; animation: animLeft 100s;",
|
||||
'#parent::before': "content: ''; animation: animRight 100s;",
|
||||
});
|
||||
}
|
||||
|
||||
const parent = addDiv(t, { id: 'parent' });
|
||||
const child = addDiv(t);
|
||||
parent.appendChild(child);
|
||||
for (const div of [parent, child]) {
|
||||
div.setAttribute('style', 'animation: animBottom 100s');
|
||||
}
|
||||
|
||||
const expectedAnimations = [
|
||||
[parent, undefined],
|
||||
[parent, '::marker'],
|
||||
[parent, '::before'],
|
||||
[parent, '::after'],
|
||||
[child, undefined],
|
||||
];
|
||||
if (!supportsMarkerPseudos) {
|
||||
expectedAnimations.splice(1, 1);
|
||||
}
|
||||
|
||||
const animations = document.getAnimations();
|
||||
assert_equals(
|
||||
animations.length,
|
||||
expectedAnimations.length,
|
||||
'CSS animations on both pseudo-elements and elements are returned'
|
||||
);
|
||||
|
||||
for (const [index, expected] of expectedAnimations.entries()) {
|
||||
const [element, pseudo] = expected;
|
||||
const actual = animations[index];
|
||||
|
||||
if (pseudo) {
|
||||
assert_equals(
|
||||
actual.effect.target,
|
||||
element,
|
||||
`Animation #${index + 1} has expected target`
|
||||
);
|
||||
assert_equals(
|
||||
actual.effect.pseudoElement,
|
||||
pseudo,
|
||||
`Animation #${index + 1} has expected pseudo type`
|
||||
);
|
||||
} else {
|
||||
assert_equals(
|
||||
actual.effect.target,
|
||||
element,
|
||||
`Animation #${index + 1} has expected target`
|
||||
);
|
||||
assert_equals(
|
||||
actual.effect.pseudoElement,
|
||||
null,
|
||||
`Animation #${index + 1} has null pseudo type`
|
||||
);
|
||||
if (testMarkerPseudos) {
|
||||
addStyle(t, {
|
||||
'#parent': 'display: list-item;',
|
||||
'#parent::marker': "content: ''; animation: animLeft 100s;",
|
||||
});
|
||||
}
|
||||
}
|
||||
}, 'CSS Animations targetting (pseudo-)elements should have correct order '
|
||||
+ 'after sorting');
|
||||
|
||||
const parent = addDiv(t, { id: 'parent' });
|
||||
const child = addDiv(t);
|
||||
parent.appendChild(child);
|
||||
for (const div of [parent, child]) {
|
||||
div.setAttribute('style', 'animation: animBottom 100s');
|
||||
}
|
||||
|
||||
const expectedAnimations = [
|
||||
[parent, undefined],
|
||||
[parent, '::marker'],
|
||||
[parent, '::before'],
|
||||
[parent, '::after'],
|
||||
[child, undefined],
|
||||
];
|
||||
if (!testMarkerPseudos) {
|
||||
expectedAnimations.splice(1, 1);
|
||||
}
|
||||
|
||||
const animations = document.getAnimations();
|
||||
assert_equals(
|
||||
animations.length,
|
||||
expectedAnimations.length,
|
||||
'CSS animations on both pseudo-elements and elements are returned'
|
||||
);
|
||||
|
||||
for (const [index, expected] of expectedAnimations.entries()) {
|
||||
const [element, pseudo] = expected;
|
||||
const actual = animations[index];
|
||||
|
||||
if (pseudo) {
|
||||
assert_equals(
|
||||
actual.effect.target,
|
||||
element,
|
||||
`Animation #${index + 1} has expected target`
|
||||
);
|
||||
assert_equals(
|
||||
actual.effect.pseudoElement,
|
||||
pseudo,
|
||||
`Animation #${index + 1} has expected pseudo type`
|
||||
);
|
||||
} else {
|
||||
assert_equals(
|
||||
actual.effect.target,
|
||||
element,
|
||||
`Animation #${index + 1} has expected target`
|
||||
);
|
||||
assert_equals(
|
||||
actual.effect.pseudoElement,
|
||||
null,
|
||||
`Animation #${index + 1} has null pseudo type`
|
||||
);
|
||||
}
|
||||
}
|
||||
}, description);
|
||||
}
|
||||
|
||||
pseudoTest('CSS Animations targetting (pseudo-)elements should have correct '
|
||||
+ 'order after sorting', false);
|
||||
pseudoTest('CSS Animations targetting (pseudo-)elements should have correct '
|
||||
+ 'order after sorting (::marker)', true);
|
||||
|
||||
</script>
|
||||
|
|
|
@ -129,62 +129,68 @@ promise_test(async t => {
|
|||
['animationend', div2, 200]);
|
||||
}, 'Same events are ordered by elements');
|
||||
|
||||
promise_test(async t => {
|
||||
// Setup a hierarchy as follows:
|
||||
//
|
||||
// parent
|
||||
// |
|
||||
// (::marker, ::before, ::after)
|
||||
// |
|
||||
// child
|
||||
const parentDiv = addDiv(t, { style: 'animation: anim 100s' });
|
||||
function pseudoTest(description, testMarkerPseudos) {
|
||||
promise_test(async t => {
|
||||
// Setup a hierarchy as follows:
|
||||
//
|
||||
// parent
|
||||
// |
|
||||
// (::marker, ::before, ::after) // ::marker optional
|
||||
// |
|
||||
// child
|
||||
const parentDiv = addDiv(t, { style: 'animation: anim 100s' });
|
||||
|
||||
parentDiv.id = 'parent-div';
|
||||
addStyle(t, {
|
||||
'#parent-div::after': "content: ''; animation: anim 100s",
|
||||
'#parent-div::before': "content: ''; animation: anim 100s",
|
||||
});
|
||||
|
||||
if (CSS.supports('selector(::marker)')) {
|
||||
parentDiv.style.display = 'list-item';
|
||||
parentDiv.id = 'parent-div';
|
||||
addStyle(t, {
|
||||
'#parent-div::marker': "content: ''; animation: color-anim 100s",
|
||||
'#parent-div::after': "content: ''; animation: anim 100s",
|
||||
'#parent-div::before': "content: ''; animation: anim 100s",
|
||||
});
|
||||
}
|
||||
|
||||
const childDiv = addDiv(t, { style: 'animation: anim 100s' });
|
||||
parentDiv.append(childDiv);
|
||||
|
||||
// Setup event handlers
|
||||
let events = [];
|
||||
for (const name of ['start', 'iteration', 'end', 'cancel']) {
|
||||
parentDiv['onanimation' + name] = evt => {
|
||||
events.push({
|
||||
type: evt.type,
|
||||
target: evt.target,
|
||||
pseudoElement: evt.pseudoElement,
|
||||
elapsedTime: evt.elapsedTime,
|
||||
if (testMarkerPseudos) {
|
||||
parentDiv.style.display = 'list-item';
|
||||
addStyle(t, {
|
||||
'#parent-div::marker': "content: ''; animation: color-anim 100s",
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Wait a couple of frames for the events to be dispatched
|
||||
await waitForFrame();
|
||||
await waitForFrame();
|
||||
const childDiv = addDiv(t, { style: 'animation: anim 100s' });
|
||||
parentDiv.append(childDiv);
|
||||
|
||||
const expectedEvents = [
|
||||
['animationstart', parentDiv, 0],
|
||||
['animationstart', parentDiv, '::marker', 0],
|
||||
['animationstart', parentDiv, '::before', 0],
|
||||
['animationstart', parentDiv, '::after', 0],
|
||||
['animationstart', childDiv, 0],
|
||||
];
|
||||
if (!CSS.supports('selector(::marker)')) {
|
||||
expectedEvents.splice(1, 1);
|
||||
}
|
||||
// Setup event handlers
|
||||
let events = [];
|
||||
for (const name of ['start', 'iteration', 'end', 'cancel']) {
|
||||
parentDiv['onanimation' + name] = evt => {
|
||||
events.push({
|
||||
type: evt.type,
|
||||
target: evt.target,
|
||||
pseudoElement: evt.pseudoElement,
|
||||
elapsedTime: evt.elapsedTime,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
checkEvents(events, ...expectedEvents);
|
||||
}, 'Same events on pseudo-elements follow the prescribed order');
|
||||
// Wait a couple of frames for the events to be dispatched
|
||||
await waitForFrame();
|
||||
await waitForFrame();
|
||||
|
||||
const expectedEvents = [
|
||||
['animationstart', parentDiv, 0],
|
||||
['animationstart', parentDiv, '::marker', 0],
|
||||
['animationstart', parentDiv, '::before', 0],
|
||||
['animationstart', parentDiv, '::after', 0],
|
||||
['animationstart', childDiv, 0],
|
||||
];
|
||||
if (!testMarkerPseudos) {
|
||||
expectedEvents.splice(1, 1);
|
||||
}
|
||||
|
||||
checkEvents(events, ...expectedEvents);
|
||||
}, description);
|
||||
}
|
||||
|
||||
pseudoTest('Same events on pseudo-elements follow the prescribed order', false);
|
||||
pseudoTest('Same events on pseudo-elements follow the prescribed order ' +
|
||||
'(::marker)', true);
|
||||
|
||||
promise_test(async t => {
|
||||
let events = [];
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Reference file</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style type="text/css">
|
||||
div {
|
||||
/* use Ahem font which has no italic/oblique face, so that the oblique
|
||||
will be synthesized with the given angle */
|
||||
font: 50px/1 Ahem;
|
||||
position: absolute;
|
||||
}
|
||||
/* test elements will use Ahem with various values of obliqueness */
|
||||
.test {
|
||||
writing-mode: vertical-rl;
|
||||
-webkit-text-orientation: upright;
|
||||
text-orientation: upright;
|
||||
color: green;
|
||||
}
|
||||
#test1 {
|
||||
font-style: oblique 14deg;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
}
|
||||
#test2 {
|
||||
font-style: oblique -45deg;
|
||||
top: 100px;
|
||||
left: 200px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if no red shows, just two sheared green blocks:</p>
|
||||
<div id=test1 class=test>ABC</div>
|
||||
<div id=test2 class=test>ABC</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,68 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Test: Test for synthetic italics in vertical upright mode</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com" />
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<link rel="match" href="test-synthetic-italic-2-ref.html">
|
||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/2869#issuecomment-402034497"/>
|
||||
<meta name="assert" content="Synthetic italics in vertical upright mode should skew vertically" />
|
||||
<style type="text/css">
|
||||
div {
|
||||
/* use Ahem font which has no italic/oblique face, so that the oblique
|
||||
will be synthesized with the given angle */
|
||||
font: 50px/1 Ahem;
|
||||
position: absolute;
|
||||
}
|
||||
/* test elements will use Ahem with various values of obliqueness */
|
||||
.test {
|
||||
writing-mode: vertical-rl;
|
||||
-webkit-text-orientation: upright;
|
||||
text-orientation: upright;
|
||||
color: green;
|
||||
}
|
||||
#test1 {
|
||||
font-style: oblique 14deg;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
}
|
||||
#test2 {
|
||||
font-style: oblique -45deg;
|
||||
top: 100px;
|
||||
left: 200px;
|
||||
}
|
||||
/* create a set of background shapes that should be entirely covered by the
|
||||
appropriately sheared Ahem glyphs in the test elements */
|
||||
.bg {
|
||||
width: 50px;
|
||||
height: 150px;
|
||||
}
|
||||
.inner {
|
||||
/* we shrink the inner red shape slightly to try and avoid pixels
|
||||
"bleeding through" around antialiased glyph edges */
|
||||
margin: 2px;
|
||||
width: calc(100% - 4px);
|
||||
height: calc(100% - 4px);
|
||||
background-color: red;
|
||||
}
|
||||
#bg1 {
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
transform: skewY(14deg);
|
||||
}
|
||||
#bg2 {
|
||||
top: 100px;
|
||||
left: 200px;
|
||||
transform: skewY(-45deg);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if no red shows, just two sheared green blocks:</p>
|
||||
<div id=bg1 class=bg><div class=inner></div></div>
|
||||
<div id=bg2 class=bg><div class=inner></div></div>
|
||||
<div id=test1 class=test>ABC</div>
|
||||
<div id=test2 class=test>ABC</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Reference file</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style type="text/css">
|
||||
div {
|
||||
/* use Ahem font which has no italic/oblique face, so that the oblique
|
||||
will be synthesized with the given angle */
|
||||
font: 50px/1 Ahem;
|
||||
position: absolute;
|
||||
}
|
||||
/* test elements will use Ahem with various values of obliqueness */
|
||||
.test {
|
||||
writing-mode: vertical-rl;
|
||||
-webkit-text-orientation: upright;
|
||||
text-orientation: upright;
|
||||
color: green;
|
||||
}
|
||||
/* check that the sheared glyphs are still correct when transforms are
|
||||
also in effect */
|
||||
#test3 {
|
||||
font-style: oblique 25deg;
|
||||
top: 150px;
|
||||
left: 100px;
|
||||
transform: scale(1.5) rotate(45deg) skew(30deg);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if no red shows, just a sheared green block:</p>
|
||||
<div id=test3 class=test>ABC</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Test: Test for synthetic italics in vertical upright mode</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com" />
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<link rel="match" href="test-synthetic-italic-3-ref.html">
|
||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/2869#issuecomment-402034497"/>
|
||||
<meta name="assert" content="Synthetic italics in vertical upright mode should skew vertically" />
|
||||
<style type="text/css">
|
||||
div {
|
||||
/* use Ahem font which has no italic/oblique face, so that the oblique
|
||||
will be synthesized with the given angle */
|
||||
font: 50px/1 Ahem;
|
||||
position: absolute;
|
||||
}
|
||||
/* test elements will use Ahem with various values of obliqueness */
|
||||
.test {
|
||||
writing-mode: vertical-rl;
|
||||
-webkit-text-orientation: upright;
|
||||
text-orientation: upright;
|
||||
color: green;
|
||||
}
|
||||
/* check that the sheared glyphs are still correct when transforms are
|
||||
also in effect */
|
||||
#test3 {
|
||||
font-style: oblique 25deg;
|
||||
top: 150px;
|
||||
left: 100px;
|
||||
transform: scale(1.5) rotate(45deg) skew(30deg);
|
||||
}
|
||||
/* create a set of background shapes that should be entirely covered by the
|
||||
appropriately sheared Ahem glyphs in the test elements */
|
||||
.bg {
|
||||
width: 50px;
|
||||
height: 150px;
|
||||
}
|
||||
.inner {
|
||||
/* we shrink the inner red shape slightly to try and avoid pixels
|
||||
"bleeding through" around antialiased glyph edges */
|
||||
margin: 2px;
|
||||
width: calc(100% - 4px);
|
||||
height: calc(100% - 4px);
|
||||
background-color: red;
|
||||
}
|
||||
#bg3 {
|
||||
top: 150px;
|
||||
left: 100px;
|
||||
/* same transform as the test element, plus skewY for the oblique */
|
||||
transform: scale(1.5) rotate(45deg) skew(30deg) skewY(25deg);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if no red shows, just a sheared green block:</p>
|
||||
<div id=bg3 class=bg><div class=inner></div></div>
|
||||
<div id=test3 class=test>ABC</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,120 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Paged Media: parsing @page declarations</title>
|
||||
<link rel="author" title="Felipe Erias Morandeira" href="mailto:felipeerias@gmail.com"/>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-page/#at-page-rule"/>
|
||||
<meta name="assert" content="Test that @page declarations are parsed correctly.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
@page :visited { /* :visited is invalid for @page */
|
||||
color: red;
|
||||
}
|
||||
@page a_page_name:visited { /* :visited is invalid for @page */
|
||||
background-color: red;
|
||||
}
|
||||
@page {
|
||||
margin-top:5cm;
|
||||
margin-bottom:10cm;
|
||||
}
|
||||
@page :left {
|
||||
margin-right:3cm;
|
||||
}
|
||||
@page :right {
|
||||
margin-left:3cm;
|
||||
}
|
||||
@page :first {
|
||||
border-width:1px;
|
||||
}
|
||||
@page hello {
|
||||
color:green;
|
||||
}
|
||||
@page world:right {
|
||||
background-color:green;
|
||||
}
|
||||
@page auto_page {
|
||||
size: auto;
|
||||
}
|
||||
@page square_page {
|
||||
size: 4in;
|
||||
}
|
||||
@page letter_page {
|
||||
size: letter;
|
||||
}
|
||||
@page page_width_height {
|
||||
size: 10cm 15cm;
|
||||
}
|
||||
@page page_size_orientation {
|
||||
size: ledger landscape;
|
||||
}
|
||||
@page page_orientation_size {
|
||||
size: portrait a4;
|
||||
}
|
||||
@page page_jis_size_orientation {
|
||||
size: jis-b5 portrait;
|
||||
}
|
||||
@page page_orientation_jis_size {
|
||||
size: landscape jis-b4;
|
||||
}
|
||||
@page err_empty_size {
|
||||
size:;
|
||||
}
|
||||
@page err_unknow_page_size {
|
||||
size: yotsugiri;
|
||||
}
|
||||
@page err_length_and_page_size {
|
||||
size: 10cm letter;
|
||||
}
|
||||
@page err_length_and_orientation {
|
||||
size: 10cm landscape;
|
||||
}
|
||||
@page err_orientations {
|
||||
size: portrait landscape;
|
||||
}
|
||||
@page err_too_many_params {
|
||||
size: a5 landscape auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
test(function(){
|
||||
let expectedForSelector = {
|
||||
"" : "margin-top: 5cm; margin-bottom: 10cm;",
|
||||
":left" : "margin-right: 3cm;",
|
||||
":right" : "margin-left: 3cm;",
|
||||
":first" : "border-width: 1px;",
|
||||
"hello" : "color: green;",
|
||||
"world:right" : "background-color: green;",
|
||||
"auto_page" : "size: auto;",
|
||||
"square_page" : "size: 4in;",
|
||||
"letter_page" : "size: letter;",
|
||||
"page_width_height" : "size: 10cm 15cm;",
|
||||
"page_size_orientation" : "size: ledger landscape;",
|
||||
"page_orientation_size" : "size: a4 portrait;",
|
||||
"page_jis_size_orientation" : "size: jis-b5 portrait;",
|
||||
"page_orientation_jis_size" : "size: jis-b4 landscape;",
|
||||
"err_empty_size" : "",
|
||||
"err_unknow_page_size" : "",
|
||||
"err_length_and_page_size" : "",
|
||||
"err_length_and_orientation" : "",
|
||||
"err_orientations" : "",
|
||||
"err_too_many_params" : ""
|
||||
};
|
||||
let styleSheets = document.styleSheets;
|
||||
for (let i = 0; i < styleSheets.length; i++) {
|
||||
let rules = styleSheets[i].cssRules;
|
||||
for (let rule of rules) {
|
||||
if (rule.type == CSSRule.PAGE_RULE) {
|
||||
let expected = expectedForSelector[rule.selectorText];
|
||||
assert_equals(rule.style.cssText, expected, "unexpected @page contents");
|
||||
delete expectedForSelector[rule.selectorText];
|
||||
}
|
||||
}
|
||||
}
|
||||
assert_equals(Object.keys(expectedForSelector).length, 0, "missing @page selectors");
|
||||
}, "test CSS @page declarations");
|
||||
|
||||
</script>
|
|
@ -0,0 +1,55 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Paged Media: parsing @page declarations inside @media</title>
|
||||
<link rel="author" title="Felipe Erias Morandeira" href="mailto:felipeerias@gmail.com"/>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-page/#at-page-rule"/>
|
||||
<meta name="assert" content="Test that @page declarations inside @media are parsed correctly.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
margin: 3cm;
|
||||
}
|
||||
@page :first {
|
||||
margin-top: 6cm;
|
||||
}
|
||||
@page :left {
|
||||
color: red;
|
||||
}
|
||||
@page :right {
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
test(function(){
|
||||
let expectedForSelector = {
|
||||
"" : "margin: 3cm;",
|
||||
":first" : "margin-top: 6cm;",
|
||||
":left" : "color: red;",
|
||||
":right" : "color: blue;"
|
||||
};
|
||||
let styleSheets = document.styleSheets;
|
||||
for (let i = 0; i < styleSheets.length; i++) {
|
||||
let rules = styleSheets[i].cssRules;
|
||||
for (let rule of rules) {
|
||||
if (rule.type == CSSRule.MEDIA_RULE && rule.conditionText == 'print') {
|
||||
for (let mediaRule of rule.cssRules) {
|
||||
if (mediaRule.type == CSSRule.PAGE_RULE) {
|
||||
let expected = expectedForSelector[mediaRule.selectorText];
|
||||
assert_equals(mediaRule.style.cssText, expected, "unexpected @page contents");
|
||||
delete expectedForSelector[mediaRule.selectorText];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
assert_equals(Object.keys(expectedForSelector).length, 0, "missing @page selectors in @media");
|
||||
}, "test @page inside a @media print rule");
|
||||
|
||||
</script>
|
|
@ -0,0 +1,36 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Paged Media: parsing page properties inside HTML elements</title>
|
||||
<link rel="author" title="Felipe Erias Morandeira" href="mailto:felipeerias@gmail.com"/>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-page/#using-named-pages"/>
|
||||
<meta name="assert" content="Test that page properties of HTML elements are parsed correctly.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
@page {
|
||||
size: a4;
|
||||
}
|
||||
@page small_page {
|
||||
size: a5 portrait;
|
||||
}
|
||||
@page large_page {
|
||||
size: a3 landscape;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
test(function(){
|
||||
test_valid_value("page", "auto");
|
||||
test_valid_value("page", "small_page");
|
||||
test_valid_value("page", "large_page");
|
||||
test_invalid_value("page", "auto small_page");
|
||||
test_invalid_value("page", "large_page auto");
|
||||
test_invalid_value("page", "small_page large_page");
|
||||
test_invalid_value("page", "1cm");
|
||||
}, "test page properties in HTML elements");
|
||||
|
||||
</script>
|
|
@ -20,7 +20,7 @@
|
|||
font: 100px/1 Ahem;
|
||||
}
|
||||
#test {
|
||||
width: 200px;
|
||||
width: 211px;
|
||||
color: rgb(0,100,0);
|
||||
}
|
||||
#image {
|
||||
|
|
|
@ -35,94 +35,99 @@ test(t => {
|
|||
'getAnimations returns no running CSS Transitions');
|
||||
}, 'getAnimations for CSS Transitions');
|
||||
|
||||
test(t => {
|
||||
// Create two divs with the following arrangement:
|
||||
//
|
||||
// parent
|
||||
// (::marker,)
|
||||
// ::before,
|
||||
// ::after
|
||||
// |
|
||||
// child
|
||||
function pseudoTest(description, testMarkerPseudos) {
|
||||
test(t => {
|
||||
// Create two divs with the following arrangement:
|
||||
//
|
||||
// parent
|
||||
// (::marker,) // Optionally
|
||||
// ::before,
|
||||
// ::after
|
||||
// |
|
||||
// child
|
||||
|
||||
addStyle(t, {
|
||||
'.init::after': 'content: ""; width: 0px; transition: all 100s;',
|
||||
'.init::before': 'content: ""; width: 0px; transition: all 100s;',
|
||||
'.change::after': 'width: 100px;',
|
||||
'.change::before': 'width: 100px;',
|
||||
});
|
||||
|
||||
const supportsMarkerPseudos = CSS.supports('selector(::marker)');
|
||||
if (supportsMarkerPseudos) {
|
||||
addStyle(t, {
|
||||
'.init::marker': 'content: ""; color: red; transition: all 100s;',
|
||||
'.change::marker': 'color: green;',
|
||||
'.init::after': 'content: ""; width: 0px; transition: all 100s;',
|
||||
'.init::before': 'content: ""; width: 0px; transition: all 100s;',
|
||||
'.change::after': 'width: 100px;',
|
||||
'.change::before': 'width: 100px;',
|
||||
});
|
||||
}
|
||||
|
||||
const parent = addDiv(t, { 'style': 'display: list-item' });
|
||||
const child = addDiv(t);
|
||||
parent.appendChild(child);
|
||||
|
||||
parent.style.left = '0px';
|
||||
parent.style.transition = 'left 100s';
|
||||
parent.classList.add('init');
|
||||
child.style.left = '0px';
|
||||
child.style.transition = 'left 100s';
|
||||
getComputedStyle(parent).left;
|
||||
|
||||
parent.style.left = '100px';
|
||||
parent.classList.add('change');
|
||||
child.style.left = '100px';
|
||||
|
||||
const expectedTransitions = [
|
||||
[parent, undefined],
|
||||
[parent, '::marker'],
|
||||
[parent, '::before'],
|
||||
[parent, '::after'],
|
||||
[child, undefined],
|
||||
];
|
||||
if (!supportsMarkerPseudos) {
|
||||
expectedTransitions.splice(1, 1);
|
||||
}
|
||||
|
||||
const transitions = document.getAnimations();
|
||||
assert_equals(
|
||||
transitions.length,
|
||||
expectedTransitions.length,
|
||||
'CSS transition on both pseudo-elements and elements are returned'
|
||||
);
|
||||
|
||||
for (const [index, expected] of expectedTransitions.entries()) {
|
||||
const [element, pseudo] = expected;
|
||||
const actual = transitions[index];
|
||||
|
||||
if (pseudo) {
|
||||
assert_equals(
|
||||
actual.effect.target,
|
||||
element,
|
||||
`Transition #${index + 1} has expected target`
|
||||
);
|
||||
assert_equals(
|
||||
actual.effect.pseudoElement,
|
||||
pseudo,
|
||||
`Transition #${index + 1} has expected pseudo type`
|
||||
);
|
||||
} else {
|
||||
assert_equals(
|
||||
actual.effect.target,
|
||||
element,
|
||||
`Transition #${index + 1} has expected target`
|
||||
);
|
||||
assert_equals(
|
||||
actual.effect.pseudoElement,
|
||||
null,
|
||||
`Transition #${index + 1} has null pseudo type`
|
||||
);
|
||||
if (testMarkerPseudos) {
|
||||
addStyle(t, {
|
||||
'.init::marker': 'content: ""; color: red; transition: all 100s;',
|
||||
'.change::marker': 'color: green;',
|
||||
});
|
||||
}
|
||||
}
|
||||
}, 'CSS Transitions targetting (pseudo-)elements should have correct order '
|
||||
+ 'after sorting');
|
||||
|
||||
const parent = addDiv(t, { 'style': 'display: list-item' });
|
||||
const child = addDiv(t);
|
||||
parent.appendChild(child);
|
||||
|
||||
parent.style.left = '0px';
|
||||
parent.style.transition = 'left 100s';
|
||||
parent.classList.add('init');
|
||||
child.style.left = '0px';
|
||||
child.style.transition = 'left 100s';
|
||||
getComputedStyle(parent).left;
|
||||
|
||||
parent.style.left = '100px';
|
||||
parent.classList.add('change');
|
||||
child.style.left = '100px';
|
||||
|
||||
const expectedTransitions = [
|
||||
[parent, undefined],
|
||||
[parent, '::marker'],
|
||||
[parent, '::before'],
|
||||
[parent, '::after'],
|
||||
[child, undefined],
|
||||
];
|
||||
if (!testMarkerPseudos) {
|
||||
expectedTransitions.splice(1, 1);
|
||||
}
|
||||
|
||||
const transitions = document.getAnimations();
|
||||
assert_equals(
|
||||
transitions.length,
|
||||
expectedTransitions.length,
|
||||
'CSS transition on both pseudo-elements and elements are returned'
|
||||
);
|
||||
|
||||
for (const [index, expected] of expectedTransitions.entries()) {
|
||||
const [element, pseudo] = expected;
|
||||
const actual = transitions[index];
|
||||
|
||||
if (pseudo) {
|
||||
assert_equals(
|
||||
actual.effect.target,
|
||||
element,
|
||||
`Transition #${index + 1} has expected target`
|
||||
);
|
||||
assert_equals(
|
||||
actual.effect.pseudoElement,
|
||||
pseudo,
|
||||
`Transition #${index + 1} has expected pseudo type`
|
||||
);
|
||||
} else {
|
||||
assert_equals(
|
||||
actual.effect.target,
|
||||
element,
|
||||
`Transition #${index + 1} has expected target`
|
||||
);
|
||||
assert_equals(
|
||||
actual.effect.pseudoElement,
|
||||
null,
|
||||
`Transition #${index + 1} has null pseudo type`
|
||||
);
|
||||
}
|
||||
}
|
||||
}, description);
|
||||
}
|
||||
|
||||
pseudoTest('CSS Transitions targetting (pseudo-)elements should have correct '
|
||||
+ 'order after sorting', false)
|
||||
pseudoTest('CSS Transitions targetting (pseudo-)elements should have correct '
|
||||
+ 'order after sorting (::marker)', true)
|
||||
|
||||
promise_test(async t => {
|
||||
const div = addDiv(t, { style: 'left: 0px; transition: all 50ms' });
|
||||
|
|
|
@ -51,39 +51,6 @@ promise_test(async t => {
|
|||
}, 'Transitions on ::before/::after pseudo-elements are canceled when the'
|
||||
+ ' content property is cleared');
|
||||
|
||||
promise_test(async t => {
|
||||
if (!CSS.supports('selector(::marker)')) {
|
||||
return;
|
||||
}
|
||||
|
||||
addStyle(t, {
|
||||
'.init::marker': 'content: ""; color: red; transition: color 100s;',
|
||||
'.change::marker': 'color: green',
|
||||
});
|
||||
|
||||
// Create element (and pseudo-element) and attach event listeners
|
||||
const div = addDiv(t, { 'style': 'display: list-item' });
|
||||
div.classList.add('init');
|
||||
|
||||
const eventWatcher = new EventWatcher(t, div, [
|
||||
'transitionrun',
|
||||
'transitioncancel',
|
||||
]);
|
||||
|
||||
// Trigger transition
|
||||
getComputedStyle(div).color;
|
||||
div.classList.add('change');
|
||||
getComputedStyle(div).color;
|
||||
|
||||
await eventWatcher.wait_for('transitionrun');
|
||||
|
||||
// Make the parent element no longer display: list-item so that the pseudo
|
||||
// element no longer renders
|
||||
div.style.display = 'block';
|
||||
|
||||
await eventWatcher.wait_for('transitioncancel');
|
||||
}, 'Transitions on ::marker pseudo-elements are canceled when the'
|
||||
+ ' parent display type is no longer list-item');
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Transitions Test: Transitions do not run for a ::marker-element that is not being rendered</title>
|
||||
<link rel="help" title="Starting transitions"
|
||||
href="https://drafts.csswg.org/css-transitions/#starting">
|
||||
|
||||
<script src="/resources/testharness.js" type="text/javascript"></script>
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
|
||||
<script src="./support/helper.js" type="text/javascript"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
|
||||
promise_test(async t => {
|
||||
addStyle(t, {
|
||||
'.init::marker': 'content: ""; color: red; transition: color 100s;',
|
||||
'.change::marker': 'color: green',
|
||||
});
|
||||
|
||||
// Create element (and pseudo-element) and attach event listeners
|
||||
const div = addDiv(t, { 'style': 'display: list-item' });
|
||||
div.classList.add('init');
|
||||
|
||||
const eventWatcher = new EventWatcher(t, div, [
|
||||
'transitionrun',
|
||||
'transitioncancel',
|
||||
]);
|
||||
|
||||
// Trigger transition
|
||||
getComputedStyle(div).color;
|
||||
div.classList.add('change');
|
||||
getComputedStyle(div).color;
|
||||
|
||||
await eventWatcher.wait_for('transitionrun');
|
||||
|
||||
// Make the parent element no longer display: list-item so that the pseudo
|
||||
// element no longer renders
|
||||
div.style.display = 'block';
|
||||
|
||||
await eventWatcher.wait_for('transitioncancel');
|
||||
}, 'Transitions on ::marker pseudo-elements are canceled when the'
|
||||
+ ' parent display type is no longer list-item');
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,130 @@
|
|||
<!doctype html>
|
||||
<title>CSS Selectors Test: Tests the style attribute used in an attribute selector</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/selectors/#attribute-selectors">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
#container { font-size: 16px; color: black; }
|
||||
.test[style] { color: green }
|
||||
.test[style=""] { font-size: 100px }
|
||||
.test[style*="text-decoration"] { background-color: lime }
|
||||
.test[style] + #sibling { color: green; }
|
||||
.test[style*="text-decoration"] + #sibling { background-color: lime; }
|
||||
</style>
|
||||
<div id="container">
|
||||
<div id="t1" class="test" style></div>
|
||||
<div id="t2" class="test" style=""></div>
|
||||
<div id="t3" class="test" style="text-decoration:underline"></div>
|
||||
<div id="t4" class="test"></div>
|
||||
<div id="sibling"></div>
|
||||
</div>
|
||||
<script>
|
||||
const no_match_bgcolor = "rgba(0, 0, 0, 0)";
|
||||
const no_match_color = "rgb(0, 0, 0)";
|
||||
const no_match_font_size = "16px";
|
||||
const match_bgcolor = "rgb(0, 255, 0)";
|
||||
const match_color = "rgb(0, 128, 0)";
|
||||
const match_font_size = "100px";
|
||||
|
||||
test(() => {
|
||||
assert_equals(getComputedStyle(t1).backgroundColor, no_match_bgcolor);
|
||||
assert_equals(getComputedStyle(t1).color, match_color);
|
||||
assert_equals(getComputedStyle(t1).fontSize, match_font_size);
|
||||
}, "Match style attribute with no value");
|
||||
|
||||
test(() => {
|
||||
assert_equals(getComputedStyle(t2).backgroundColor, no_match_bgcolor);
|
||||
assert_equals(getComputedStyle(t2).color, match_color);
|
||||
assert_equals(getComputedStyle(t2).fontSize, match_font_size);
|
||||
}, "Match style attribute with empty value");
|
||||
|
||||
test(() => {
|
||||
assert_equals(getComputedStyle(t3).backgroundColor, match_bgcolor);
|
||||
assert_equals(getComputedStyle(t3).color, match_color);
|
||||
assert_equals(getComputedStyle(t3).fontSize, no_match_font_size);
|
||||
}, "Match style attribute with background value");
|
||||
|
||||
test(() => {
|
||||
assert_equals(getComputedStyle(t4).backgroundColor, no_match_bgcolor);
|
||||
assert_equals(getComputedStyle(t4).color, no_match_color);
|
||||
assert_equals(getComputedStyle(t4).fontSize, no_match_font_size);
|
||||
assert_equals(getComputedStyle(sibling).color, no_match_color);
|
||||
}, "Initially no style attribute to match");
|
||||
|
||||
function reset_style(element) {
|
||||
element.removeAttribute("style");
|
||||
element.offsetTop;
|
||||
}
|
||||
|
||||
function set_style(element) {
|
||||
element.setAttribute("style", "text-decoration: underline");
|
||||
element.offsetTop;
|
||||
}
|
||||
|
||||
test(() => {
|
||||
reset_style(t4);
|
||||
t4.setAttribute("style", "text-decoration: underline");
|
||||
assert_equals(getComputedStyle(t4).backgroundColor, match_bgcolor);
|
||||
assert_equals(getComputedStyle(t4).color, match_color);
|
||||
assert_equals(getComputedStyle(t4).fontSize, no_match_font_size);
|
||||
assert_equals(getComputedStyle(sibling).color, match_color);
|
||||
}, "Dynamically change style with Element.setAttribute");
|
||||
|
||||
test(() => {
|
||||
reset_style(t4);
|
||||
t4.style = "text-decoration: underline";
|
||||
assert_equals(getComputedStyle(t4).backgroundColor, match_bgcolor);
|
||||
assert_equals(getComputedStyle(t4).color, match_color);
|
||||
assert_equals(getComputedStyle(t4).fontSize, no_match_font_size);
|
||||
assert_equals(getComputedStyle(sibling).color, match_color);
|
||||
}, "Dynamically change style with Element.style");
|
||||
|
||||
test(() => {
|
||||
reset_style(t4);
|
||||
t4.style.textDecoration = "underline";
|
||||
assert_equals(getComputedStyle(t4).backgroundColor, match_bgcolor);
|
||||
assert_equals(getComputedStyle(t4).color, match_color);
|
||||
assert_equals(getComputedStyle(t4).fontSize, no_match_font_size);
|
||||
assert_equals(getComputedStyle(sibling).color, match_color);
|
||||
}, "Dynamically change style with Element.style.property");
|
||||
|
||||
test(() => {
|
||||
set_style(t4);
|
||||
t4.removeAttribute("style");
|
||||
assert_equals(getComputedStyle(t4).backgroundColor, no_match_bgcolor);
|
||||
assert_equals(getComputedStyle(t4).color, no_match_color);
|
||||
assert_equals(getComputedStyle(t4).fontSize, no_match_font_size);
|
||||
assert_equals(getComputedStyle(sibling).color, no_match_color);
|
||||
assert_equals(getComputedStyle(sibling).backgroundColor, no_match_bgcolor);
|
||||
}, "Dynamically remove style with Element.removeAttribute");
|
||||
|
||||
test(() => {
|
||||
set_style(t4);
|
||||
t4.style = "";
|
||||
assert_equals(getComputedStyle(t4).backgroundColor, no_match_bgcolor);
|
||||
assert_equals(getComputedStyle(t4).color, match_color);
|
||||
assert_equals(getComputedStyle(t4).fontSize, match_font_size);
|
||||
assert_equals(getComputedStyle(sibling).color, match_color);
|
||||
assert_equals(getComputedStyle(sibling).backgroundColor, no_match_bgcolor);
|
||||
}, "Dynamically remove style with Element.style");
|
||||
|
||||
test(() => {
|
||||
set_style(t4);
|
||||
t4.style.textDecoration = "";
|
||||
assert_equals(getComputedStyle(t4).backgroundColor, no_match_bgcolor);
|
||||
assert_equals(getComputedStyle(t4).color, match_color);
|
||||
assert_equals(getComputedStyle(t4).fontSize, match_font_size);
|
||||
assert_equals(getComputedStyle(sibling).color, match_color);
|
||||
assert_equals(getComputedStyle(sibling).backgroundColor, no_match_bgcolor);
|
||||
}, "Dynamically remove style with Element.style.property");
|
||||
|
||||
test(() => {
|
||||
set_style(t4);
|
||||
t4.style.removeProperty("text-decoration");
|
||||
assert_equals(getComputedStyle(t4).backgroundColor, no_match_bgcolor);
|
||||
assert_equals(getComputedStyle(t4).color, match_color);
|
||||
assert_equals(getComputedStyle(t4).fontSize, match_font_size);
|
||||
assert_equals(getComputedStyle(sibling).color, match_color);
|
||||
assert_equals(getComputedStyle(sibling).backgroundColor, no_match_bgcolor);
|
||||
}, "Dynamically remove style with Element.style.removeProperty");
|
||||
</script>
|
|
@ -0,0 +1,71 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-actions.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
|
||||
</head>
|
||||
<body onload=runTest()>
|
||||
<p>Moving the cursor using the arrow keys into an
|
||||
input element fires scroll events when text has to scroll into view.
|
||||
Uses arrow keys to move forward and backwards in the input
|
||||
element.</p>
|
||||
<input type="text" style='width: 50px'
|
||||
value="Fooooooooooooooooooooooooooooooooooooooooooooooooo"/>
|
||||
<textarea rows="4" cols="4">
|
||||
Fooooooooooooooooooooooooooooooooooooooooooooooooo
|
||||
</textarea>
|
||||
|
||||
<script>
|
||||
async function moveCursorRightInsideElement(element, value){
|
||||
var arrowRight = '\uE014';
|
||||
for(var i=0;i<value;i++){
|
||||
await test_driver.send_keys(element, arrowRight);
|
||||
}
|
||||
}
|
||||
|
||||
function runTest(){
|
||||
promise_test(async(t) => { return new Promise(async (resolve, reject) => {
|
||||
var input = document.getElementsByTagName('input')[0];
|
||||
function handleScroll(){
|
||||
resolve("Scroll Event successfully fired!");
|
||||
}
|
||||
input.addEventListener('scroll', handleScroll, false);
|
||||
// move cursor to the right until the text scrolls
|
||||
while(input.scrollLeft === 0){
|
||||
await moveCursorRightInsideElement(input, 1);
|
||||
}
|
||||
// if there is no scroll event fired then test will fail by timeout
|
||||
})},
|
||||
/*
|
||||
Moving the cursor using the arrow keys into an input element
|
||||
fires scroll events when text has to scroll into view.
|
||||
Uses arrow keys to move right in the input element.
|
||||
*/
|
||||
"Scroll event fired for <input> element.");
|
||||
|
||||
promise_test(async(t) => { return new Promise(async (resolve, reject) => {
|
||||
var textarea = document.getElementsByTagName('textarea')[0];
|
||||
function handleScroll(){
|
||||
resolve("Scroll Event successfully fired!");
|
||||
}
|
||||
textarea.addEventListener('scroll', handleScroll, false);
|
||||
// move cursor to the right until the text scrolls
|
||||
while(textarea.scrollLeft === 0){
|
||||
await moveCursorRightInsideElement(textarea, 1);
|
||||
}
|
||||
// if there is no scroll event fired then test will fail by timeout
|
||||
})},
|
||||
/*
|
||||
Moving the cursor using the arrow keys into a textarea element
|
||||
fires scroll events when text has to scroll into view.
|
||||
Uses arrow keys to move right in the textarea element.
|
||||
*/
|
||||
"Scroll event fired for <textarea> element.");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,127 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<title> Check enforcement of COEP in a DedicatedWorker using CacheStorage. </title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script>
|
||||
|
||||
function remote(path) {
|
||||
const REMOTE_ORIGIN = get_host_info().HTTPS_REMOTE_ORIGIN;
|
||||
return new URL(path, REMOTE_ORIGIN);
|
||||
}
|
||||
|
||||
const iframe_path = "./resources/iframe.html?pipe=";
|
||||
const dedicated_worker_path = "./dedicated-worker.js?pipe=";
|
||||
const ressource_path = "/images/blue.png?pipe=";
|
||||
|
||||
const coep_header= {
|
||||
"coep-none" : "|header(Cross-Origin-Embedder-Policy,none)",
|
||||
"coep-require-corp" : "|header(Cross-Origin-Embedder-Policy,require-corp)",
|
||||
}
|
||||
|
||||
const corp_header = {
|
||||
"corp-undefined": "",
|
||||
"corp-cross-origin": "|header(Cross-Origin-Resource-Policy,cross-origin)",
|
||||
}
|
||||
|
||||
// Check enforcement of COEP in a DedicatedWorker using CacheStorage.
|
||||
//
|
||||
// 1) Fetch a response from a document with COEP:none. Store it in the
|
||||
// CacheStorage. The response is cross-origin without any CORS header.
|
||||
// 2) From an iframe, start a DedicatedWorker and try to retrieve the response
|
||||
// from the CacheStorage.
|
||||
//
|
||||
// Test parameters:
|
||||
// - |iframe_coep| the COEP header of the iframe's document response
|
||||
// - |worker_coep| the COEP header of the DedicatedWorker's script response.
|
||||
// - |response_corp| the CORP header of the response.
|
||||
//
|
||||
// Test expectations:
|
||||
// |loaded| is true whenever the worker is able to fetch the response from
|
||||
// the CacheStorage. According to the specification:
|
||||
// https://mikewest.github.io/corpp/#initialize-embedder-policy-for-global
|
||||
// it must be false when:
|
||||
// - |iframe_coep| is 'coep-require-corp' and
|
||||
// - |response-corp| is 'corp-undefined'.
|
||||
//
|
||||
// |worker_coep| must be ignored.
|
||||
function check(
|
||||
// Test parameters:
|
||||
iframe_coep,
|
||||
worker_coep,
|
||||
response_corp,
|
||||
|
||||
// Test expectations:
|
||||
loaded) {
|
||||
|
||||
promise_test(async (t) => {
|
||||
// 1) Fetch a response from a document with COEP:none. Store it in the
|
||||
// CacheStorage. The response is cross-origin without any CORS header.
|
||||
const resource_path = ressource_path + corp_header[response_corp];
|
||||
const resource_url = remote(resource_path);
|
||||
const fetch_request = new Request(resource_url, {mode: 'no-cors'});
|
||||
const cache = await caches.open('v1');
|
||||
const fetch_response = await fetch(fetch_request);
|
||||
await cache.put(fetch_request, fetch_response);
|
||||
|
||||
// 2) From an iframe, start a DedicatedWorker and try to retrieve the
|
||||
// response from the CacheStorage.
|
||||
const worker_url = dedicated_worker_path + coep_header[worker_coep];
|
||||
const worker_eval = `
|
||||
(async function() {
|
||||
const cache = await caches.open('v1');
|
||||
const request = new Request('${resource_url}', {
|
||||
mode: 'no-cors'
|
||||
});
|
||||
try {
|
||||
const response = await cache.match(request);
|
||||
postMessage('success');
|
||||
} catch(error) {
|
||||
postMessage('error');
|
||||
}
|
||||
})()
|
||||
`;
|
||||
|
||||
const iframe_url = iframe_path + coep_header[iframe_coep];
|
||||
const iframe_eval = `
|
||||
(async function() {
|
||||
const w = new Worker('${worker_url}');
|
||||
const worker_response = new Promise(resolve => w.onmessage = resolve);
|
||||
w.postMessage(\`${worker_eval}\`);
|
||||
const response = await worker_response;
|
||||
parent.postMessage(response.data);
|
||||
})();
|
||||
`;
|
||||
|
||||
const iframe = document.createElement("iframe");
|
||||
t.add_cleanup(() => iframe.remove());
|
||||
iframe.src = iframe_url;
|
||||
const iframe_loaded = new Promise(resolve => iframe.onload = resolve);
|
||||
document.body.appendChild(iframe);
|
||||
await iframe_loaded;
|
||||
|
||||
const iframe_response = new Promise(resolve => {
|
||||
window.addEventListener("message", resolve);
|
||||
})
|
||||
iframe.contentWindow.postMessage(iframe_eval);
|
||||
|
||||
const {data} = await iframe_response;
|
||||
assert_equals(data == "success", loaded);
|
||||
}, `${iframe_coep} ${worker_coep} ${response_corp}`)
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// iframe_coep , worker_coep , response_corp , loaded
|
||||
// -----------------------------------------------------------------------------
|
||||
check("coep-none" , "coep-none" , "corp-cross-origin" , true);
|
||||
check("coep-none" , "coep-none" , "corp-undefined" , true);
|
||||
check("coep-none" , "coep-require-corp" , "corp-cross-origin" , true);
|
||||
check("coep-none" , "coep-require-corp" , "corp-undefined" , true);
|
||||
check("coep-require-corp" , "coep-none" , "corp-cross-origin" , true);
|
||||
check("coep-require-corp" , "coep-none" , "corp-undefined" , false);
|
||||
check("coep-require-corp" , "coep-require-corp" , "corp-cross-origin" , true);
|
||||
check("coep-require-corp" , "coep-require-corp" , "corp-undefined" , false);
|
||||
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1 @@
|
|||
onmessage = message => eval(message.data);
|
|
@ -0,0 +1,3 @@
|
|||
<script>
|
||||
window.addEventListener("message", message => eval(message.data));
|
||||
</script>
|
|
@ -0,0 +1,21 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content was automatically extracted by Reffy into reffy-reports
|
||||
// (https://github.com/tidoust/reffy-reports)
|
||||
// Source: Constructable Stylesheet Objects (https://wicg.github.io/construct-stylesheets/)
|
||||
|
||||
partial interface CSSStyleSheet {
|
||||
constructor(optional CSSStyleSheetInit options = {});
|
||||
Promise<CSSStyleSheet> replace(USVString text);
|
||||
void replaceSync(USVString text);
|
||||
};
|
||||
|
||||
dictionary CSSStyleSheetInit {
|
||||
(MediaList or DOMString) media = "";
|
||||
DOMString title = "";
|
||||
boolean alternate = false;
|
||||
boolean disabled = false;
|
||||
};
|
||||
|
||||
partial interface DocumentOrShadowRoot {
|
||||
attribute FrozenArray<CSSStyleSheet> adoptedStyleSheets;
|
||||
};
|
|
@ -25,9 +25,9 @@ callback ResizeObserverCallback = void (sequence<ResizeObserverEntry> entries, R
|
|||
interface ResizeObserverEntry {
|
||||
readonly attribute Element target;
|
||||
readonly attribute DOMRectReadOnly contentRect;
|
||||
readonly attribute sequence<ResizeObserverSize> borderBoxSize;
|
||||
readonly attribute sequence<ResizeObserverSize> contentBoxSize;
|
||||
readonly attribute sequence<ResizeObserverSize> devicePixelContentBoxSize;
|
||||
readonly attribute FrozenArray<ResizeObserverSize> borderBoxSize;
|
||||
readonly attribute FrozenArray<ResizeObserverSize> contentBoxSize;
|
||||
readonly attribute FrozenArray<ResizeObserverSize> devicePixelContentBoxSize;
|
||||
};
|
||||
|
||||
interface ResizeObserverSize {
|
||||
|
|
|
@ -14,27 +14,30 @@
|
|||
<marker id="Start"
|
||||
viewBox="0 0 10 10" refX="0" refY="5"
|
||||
markerUnits="strokeWidth"
|
||||
markerWidth="12"
|
||||
markerHeight="9"
|
||||
markerWidth="10"
|
||||
markerHeight="10"
|
||||
orient="auto"
|
||||
overflow="visible"
|
||||
fill="green">
|
||||
<path d="M 0 0 L 10 5 L 0 10 z"/>
|
||||
</marker>
|
||||
<marker id="Mid"
|
||||
viewBox="0 0 10 10" refX="0" refY="5"
|
||||
markerUnits="strokeWidth"
|
||||
markerWidth="12"
|
||||
markerHeight="9"
|
||||
markerWidth="10"
|
||||
markerHeight="10"
|
||||
orient="auto"
|
||||
overflow="visible"
|
||||
fill="orange">
|
||||
<path d="M 0 0 L 10 5 L 0 10 z"/>
|
||||
</marker>
|
||||
<marker id="End"
|
||||
viewBox="0 0 10 10" refX="0" refY="5"
|
||||
markerUnits="strokeWidth"
|
||||
markerWidth="12"
|
||||
markerHeight="9"
|
||||
markerWidth="10"
|
||||
markerHeight="10"
|
||||
orient="auto"
|
||||
overflow="visible"
|
||||
fill="blue">
|
||||
<path d="M 0 0 L 10 5 L 0 10 z"/>
|
||||
</marker>
|
||||
|
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -17,27 +17,30 @@
|
|||
<marker id="Start"
|
||||
viewBox="0 0 10 10" refX="0" refY="5"
|
||||
markerUnits="strokeWidth"
|
||||
markerWidth="12"
|
||||
markerHeight="9"
|
||||
markerWidth="10"
|
||||
markerHeight="10"
|
||||
orient="auto"
|
||||
overflow="visible"
|
||||
fill="green">
|
||||
<path d="M 0 0 L 10 5 L 0 10 z"/>
|
||||
</marker>
|
||||
<marker id="Mid"
|
||||
viewBox="0 0 10 10" refX="0" refY="5"
|
||||
markerUnits="strokeWidth"
|
||||
markerWidth="12"
|
||||
markerHeight="9"
|
||||
markerWidth="10"
|
||||
markerHeight="10"
|
||||
orient="auto"
|
||||
overflow="visible"
|
||||
fill="orange">
|
||||
<path d="M 0 0 L 10 5 L 0 10 z"/>
|
||||
</marker>
|
||||
<marker id="End"
|
||||
viewBox="0 0 10 10" refX="0" refY="5"
|
||||
markerUnits="strokeWidth"
|
||||
markerWidth="12"
|
||||
markerHeight="9"
|
||||
markerWidth="10"
|
||||
markerHeight="10"
|
||||
orient="auto"
|
||||
overflow="visible"
|
||||
fill="blue">
|
||||
<path d="M 0 0 L 10 5 L 0 10 z"/>
|
||||
</marker>
|
||||
|
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -41,13 +41,13 @@
|
|||
</defs>
|
||||
|
||||
<g id="test-body-reference" style="fill:none;stroke:black;stroke-width:2">
|
||||
<path d="m 120,100 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z" style="marker-start:url(#Start)"/>
|
||||
<path d="m 240,100 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z" style="marker-mid:url(#Mid)"/>
|
||||
<path d="m 360,100 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z" style="marker-end:url(#End)"/>
|
||||
<path d="m 120,100 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z"/>
|
||||
<path d="m 240,100 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z"/>
|
||||
<path d="m 360,100 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z"/>
|
||||
|
||||
<path d="m 60,200 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z m 60,60 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z" style="marker-start:url(#Start)"/>
|
||||
<path d="m 200,200 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z m 60,60 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z" style="marker-mid:url(#Mid)"/>
|
||||
<path d="m 340,200 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z m 60,60 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z" style="marker-end:url(#End)"/>
|
||||
<path d="m 60,200 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z m 60,60 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z"/>
|
||||
<path d="m 200,200 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z m 60,60 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z"/>
|
||||
<path d="m 340,200 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z m 60,60 c -40,0 -40,0 -40,40 c 0,40 0,40 40,40 c 40,0 40,0 40,-40 c 0,-40 0,-40 -40,-40 z"/>
|
||||
|
||||
<!-- Arrows -->
|
||||
<path d="m 120,100 -40, 0" style="stroke:none;marker-start:url(#Start)"/>
|
||||
|
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.4 KiB |
|
@ -41,13 +41,13 @@
|
|||
</defs>
|
||||
|
||||
<g id="test-body-reference" style="fill:none;stroke:black;stroke-width:2">
|
||||
<path d="m 120,100 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z" style="marker-start:url(#Start)"/>
|
||||
<path d="m 240,100 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z" style="marker-mid:url(#Mid)"/>
|
||||
<path d="m 360,100 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z" style="marker-end:url(#End)"/>
|
||||
<path d="m 120,100 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z"/>
|
||||
<path d="m 240,100 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z"/>
|
||||
<path d="m 360,100 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z"/>
|
||||
|
||||
<path d="m 60,200 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z m 60,60 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z" style="marker-start:url(#Start)"/>
|
||||
<path d="m 200,200 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z m 60,60 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z" style="marker-mid:url(#Mid)"/>
|
||||
<path d="m 340,200 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z m 60,60 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z" style="marker-end:url(#End)"/>
|
||||
<path d="m 60,200 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z m 60,60 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z"/>
|
||||
<path d="m 200,200 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z m 60,60 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z"/>
|
||||
<path d="m 340,200 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z m 60,60 a 40,40 0 0 0 -40,40 a 40,40 0 0 0 40,40 a 40,40 0 0 0 40,-40 a 40,40 0 0 0 -40,-40 z"/>
|
||||
|
||||
<!-- Arrows -->
|
||||
<path d="m 120,100 -40, 0" style="stroke:none;marker-start:url(#Start)"/>
|
||||
|
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.4 KiB |
|
@ -89,7 +89,7 @@ if (propertiesAreSupported(["rx", "ry"])) {
|
|||
|
||||
if (CSS.supports("d", "initial")) {
|
||||
test(function() {
|
||||
assertPresentationAttributeIsSupported("g", "d", "M0,0 L1,1", "d");
|
||||
assertPresentationAttributeIsNotSupported("g", "d", "M0,0 L1,1", "d");
|
||||
}, `d presentation attribute not supported on other elements`);
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ const PROPERTIES = {
|
|||
"d": {
|
||||
value: "M0,0 L1,1",
|
||||
relevantElement: "path",
|
||||
irrelevantElement: "image",
|
||||
irrelevantElement: null,
|
||||
},
|
||||
"dominant-baseline": {
|
||||
value: "middle",
|
||||
|
@ -142,7 +142,7 @@ const PROPERTIES = {
|
|||
"height": {
|
||||
value: "1",
|
||||
relevantElement: "rect",
|
||||
irrelevantElement: "path",
|
||||
irrelevantElement: null,
|
||||
},
|
||||
"image-rendering": {
|
||||
value: "optimizeSpeed",
|
||||
|
@ -207,17 +207,17 @@ const PROPERTIES = {
|
|||
"r": {
|
||||
value: "1",
|
||||
relevantElement: "circle",
|
||||
irrelevantElement: "rect",
|
||||
irrelevantElement: null,
|
||||
},
|
||||
"rx": {
|
||||
value: "1",
|
||||
relevantElement: "rect",
|
||||
irrelevantElement: "path",
|
||||
irrelevantElement: null,
|
||||
},
|
||||
"ry": {
|
||||
value: "1",
|
||||
relevantElement: "rect",
|
||||
irrelevantElement: "path",
|
||||
irrelevantElement: null,
|
||||
},
|
||||
"shape-rendering": {
|
||||
value: "geometricPrecision",
|
||||
|
@ -302,7 +302,7 @@ const PROPERTIES = {
|
|||
"transform": {
|
||||
value: "scale(2)",
|
||||
relevantElement: "g",
|
||||
irrelevantElement: "linearGradient",
|
||||
irrelevantElement: null,
|
||||
},
|
||||
"unicode-bidi": {
|
||||
value: "embed",
|
||||
|
@ -327,7 +327,7 @@ const PROPERTIES = {
|
|||
"width": {
|
||||
value: "1",
|
||||
relevantElement: "rect",
|
||||
irrelevantElement: "path",
|
||||
irrelevantElement: null,
|
||||
},
|
||||
"word-spacing": {
|
||||
value: "1",
|
||||
|
@ -342,12 +342,12 @@ const PROPERTIES = {
|
|||
"x": {
|
||||
value: "1",
|
||||
relevantElement: "rect",
|
||||
irrelevantElement: "path",
|
||||
irrelevantElement: null,
|
||||
},
|
||||
"y": {
|
||||
value: "1",
|
||||
relevantElement: "rect",
|
||||
irrelevantElement: "path",
|
||||
irrelevantElement: null,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -260,8 +260,9 @@ class TestExecutor(object):
|
|||
try:
|
||||
result = self.do_test(test)
|
||||
except Exception as e:
|
||||
self.logger.warning(traceback.format_exc(e))
|
||||
result = self.result_from_exception(test, e)
|
||||
exception_string = traceback.format_exc()
|
||||
self.logger.warning(exception_string)
|
||||
result = self.result_from_exception(test, e, exception_string)
|
||||
|
||||
if result is Stop:
|
||||
return result
|
||||
|
@ -294,7 +295,7 @@ class TestExecutor(object):
|
|||
def on_environment_change(self, new_environment):
|
||||
pass
|
||||
|
||||
def result_from_exception(self, test, e):
|
||||
def result_from_exception(self, test, e, exception_string):
|
||||
if hasattr(e, "status") and e.status in test.result_cls.statuses:
|
||||
status = e.status
|
||||
else:
|
||||
|
@ -302,7 +303,7 @@ class TestExecutor(object):
|
|||
message = text_type(getattr(e, "message", ""))
|
||||
if message:
|
||||
message += "\n"
|
||||
message += traceback.format_exc(e)
|
||||
message += exception_string
|
||||
return test.result_cls(status, message), []
|
||||
|
||||
def wait(self):
|
||||
|
@ -579,7 +580,7 @@ class WdspecRun(object):
|
|||
message = getattr(e, "message")
|
||||
if message:
|
||||
message += "\n"
|
||||
message += traceback.format_exc(e)
|
||||
message += traceback.format_exc()
|
||||
self.result = False, ("INTERNAL-ERROR", message)
|
||||
finally:
|
||||
self.result_flag.set()
|
||||
|
|
|
@ -115,8 +115,8 @@ class MarionetteBaseProtocolPart(BaseProtocolPart):
|
|||
except IOError:
|
||||
self.logger.debug("Socket closed")
|
||||
break
|
||||
except Exception as e:
|
||||
self.logger.warning(traceback.format_exc(e))
|
||||
except Exception:
|
||||
self.logger.warning(traceback.format_exc())
|
||||
break
|
||||
|
||||
|
||||
|
@ -138,12 +138,12 @@ class MarionetteTestharnessProtocolPart(TestharnessProtocolPart):
|
|||
self.logger.debug("Loading %s" % url)
|
||||
try:
|
||||
self.dismiss_alert(lambda: self.marionette.navigate(url))
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
self.logger.critical(
|
||||
"Loading initial page %s failed. Ensure that the "
|
||||
"there are no other programs bound to this port and "
|
||||
"that your firewall rules or network setup does not "
|
||||
r"prevent access.\e%s" % (url, traceback.format_exc(e)))
|
||||
r"prevent access.\e%s" % (url, traceback.format_exc()))
|
||||
raise
|
||||
self.runner_handle = self.marionette.current_window_handle
|
||||
format_map = {"title": threading.current_thread().name.replace("'", '"')}
|
||||
|
@ -659,7 +659,7 @@ class ExecuteAsyncScriptRun(TimedRunner):
|
|||
message = getattr(e, "message", "")
|
||||
if message:
|
||||
message += "\n"
|
||||
message += traceback.format_exc(e)
|
||||
message += traceback.format_exc()
|
||||
self.logger.warning(traceback.format_exc())
|
||||
self.result = False, ("INTERNAL-ERROR", message)
|
||||
finally:
|
||||
|
@ -809,10 +809,10 @@ class MarionetteRefTestExecutor(RefTestExecutor):
|
|||
if handles:
|
||||
self.protocol.marionette.switch_to_window(handles[0])
|
||||
super(self.__class__, self).teardown()
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
# Ignore errors during teardown
|
||||
self.logger.warning("Exception during reftest teardown:\n%s" %
|
||||
traceback.format_exc(e))
|
||||
traceback.format_exc())
|
||||
|
||||
def reset(self):
|
||||
self.implementation.reset(**self.implementation_kwargs)
|
||||
|
@ -935,9 +935,9 @@ class InternalRefTestImplementation(RefTestImplementation):
|
|||
handles = self.executor.protocol.marionette.window_handles
|
||||
if handles:
|
||||
self.executor.protocol.marionette.switch_to_window(handles[0])
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
# Ignore errors during teardown
|
||||
self.logger.warning(traceback.format_exc(e))
|
||||
self.logger.warning(traceback.format_exc())
|
||||
|
||||
|
||||
class GeckoDriverProtocol(WebDriverProtocol):
|
||||
|
|
|
@ -73,8 +73,8 @@ class SeleniumBaseProtocolPart(BaseProtocolPart):
|
|||
except (socket.timeout, exceptions.NoSuchWindowException,
|
||||
exceptions.ErrorInResponseException, IOError):
|
||||
break
|
||||
except Exception as e:
|
||||
self.logger.error(traceback.format_exc(e))
|
||||
except Exception:
|
||||
self.logger.error(traceback.format_exc())
|
||||
break
|
||||
|
||||
|
||||
|
@ -262,7 +262,7 @@ class SeleniumRun(TimedRunner):
|
|||
message = str(getattr(e, "message", ""))
|
||||
if message:
|
||||
message += "\n"
|
||||
message += traceback.format_exc(e)
|
||||
message += traceback.format_exc()
|
||||
self.result = False, ("INTERNAL-ERROR", message)
|
||||
finally:
|
||||
self.result_flag.set()
|
||||
|
|
|
@ -126,8 +126,8 @@ class ServoWebDriverProtocol(Protocol):
|
|||
pass
|
||||
except (socket.timeout, IOError):
|
||||
break
|
||||
except Exception as e:
|
||||
self.logger.error(traceback.format_exc(e))
|
||||
except Exception:
|
||||
self.logger.error(traceback.format_exc())
|
||||
break
|
||||
|
||||
|
||||
|
@ -146,7 +146,7 @@ class ServoWebDriverRun(TimedRunner):
|
|||
message = getattr(e, "message", "")
|
||||
if message:
|
||||
message += "\n"
|
||||
message += traceback.format_exc(e)
|
||||
message += traceback.format_exc()
|
||||
self.result = False, ("INTERNAL-ERROR", e)
|
||||
finally:
|
||||
self.result_flag.set()
|
||||
|
@ -256,7 +256,7 @@ class ServoWebDriverRefTestExecutor(RefTestExecutor):
|
|||
message = getattr(e, "message", "")
|
||||
if message:
|
||||
message += "\n"
|
||||
message += traceback.format_exc(e)
|
||||
message += traceback.format_exc()
|
||||
return test.result_cls("INTERNAL-ERROR", message), []
|
||||
|
||||
def screenshot(self, test, viewport_size, dpi):
|
||||
|
|
|
@ -79,8 +79,8 @@ class WebDriverBaseProtocolPart(BaseProtocolPart):
|
|||
client.UnknownErrorException,
|
||||
IOError):
|
||||
break
|
||||
except Exception as e:
|
||||
self.logger.error(traceback.format_exc(e))
|
||||
except Exception:
|
||||
self.logger.error(traceback.format_exc())
|
||||
break
|
||||
|
||||
|
||||
|
@ -296,7 +296,7 @@ class WebDriverProtocol(Protocol):
|
|||
message = str(getattr(e, "message", ""))
|
||||
if message:
|
||||
message += "\n"
|
||||
message += traceback.format_exc(e)
|
||||
message += traceback.format_exc()
|
||||
self.logger.debug(message)
|
||||
self.webdriver = None
|
||||
|
||||
|
@ -345,7 +345,7 @@ class WebDriverRun(TimedRunner):
|
|||
message = str(getattr(e, "message", ""))
|
||||
if message:
|
||||
message += "\n"
|
||||
message += traceback.format_exc(e)
|
||||
message += traceback.format_exc()
|
||||
self.result = False, ("INTERNAL-ERROR", message)
|
||||
finally:
|
||||
self.result_flag.set()
|
||||
|
|
|
@ -497,6 +497,9 @@ class ExpectedUpdater(object):
|
|||
return dir_id, self.id_test_map[dir_id]
|
||||
|
||||
def lsan_leak(self, data):
|
||||
if data["scope"] == "/":
|
||||
logger.warning("Not updating lsan annotations for root scope")
|
||||
return
|
||||
dir_id, test_data = self.test_for_scope(data)
|
||||
test_data.set(dir_id, None, "lsan",
|
||||
self.run_info, (data["frames"], data.get("allowed_match")))
|
||||
|
@ -504,6 +507,9 @@ class ExpectedUpdater(object):
|
|||
test_data.set_requires_update()
|
||||
|
||||
def mozleak_object(self, data):
|
||||
if data["scope"] == "/":
|
||||
logger.warning("Not updating mozleak annotations for root scope")
|
||||
return
|
||||
dir_id, test_data = self.test_for_scope(data)
|
||||
test_data.set(dir_id, None, "leak-object",
|
||||
self.run_info, ("%s:%s", (data["process"], data["name"]),
|
||||
|
@ -512,6 +518,9 @@ class ExpectedUpdater(object):
|
|||
test_data.set_requires_update()
|
||||
|
||||
def mozleak_total(self, data):
|
||||
if data["scope"] == "/":
|
||||
logger.warning("Not updating mozleak annotations for root scope")
|
||||
return
|
||||
if data["bytes"]:
|
||||
dir_id, test_data = self.test_for_scope(data)
|
||||
test_data.set(dir_id, None, "leak-threshold",
|
||||
|
|
|
@ -393,8 +393,8 @@ class TestRunnerManager(threading.Thread):
|
|||
return
|
||||
self.state = new_state
|
||||
self.logger.debug("new state: %s" % self.state.__class__.__name__)
|
||||
except Exception as e:
|
||||
self.logger.error(traceback.format_exc(e))
|
||||
except Exception:
|
||||
self.logger.error(traceback.format_exc())
|
||||
raise
|
||||
finally:
|
||||
self.logger.debug("TestRunnerManager main loop terminating, starting cleanup")
|
||||
|
|
|
@ -0,0 +1,139 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>k-rate AudioParams with Inputs</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/webaudio/resources/audit-util.js"></script>
|
||||
<script src="/webaudio/resources/audit.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
let audit = Audit.createTaskRunner();
|
||||
|
||||
// Must be power of two to eliminate round-off
|
||||
const sampleRate = 8192;
|
||||
|
||||
// Arbitrary duration that doesn't need to be too long to verify k-rate
|
||||
// automations. Probably should be at least a few render quanta.
|
||||
const testDuration = 8 * RENDER_QUANTUM_FRAMES / sampleRate;
|
||||
|
||||
// Test k-rate GainNode.gain is k-rate
|
||||
audit.define(
|
||||
{label: 'Gain', description: 'k-rate GainNode.gain'},
|
||||
(task, should) => {
|
||||
let context = new OfflineAudioContext({
|
||||
numberOfChannels: 2,
|
||||
sampleRate: sampleRate,
|
||||
length: testDuration * sampleRate
|
||||
});
|
||||
|
||||
let merger = new ChannelMergerNode(
|
||||
context, {numberOfInputs: context.destination.channelCount});
|
||||
merger.connect(context.destination);
|
||||
|
||||
let src = new ConstantSourceNode(context);
|
||||
|
||||
createTestSubGraph(context, src, merger, 'GainNode', 'gain');
|
||||
|
||||
src.start();
|
||||
context.startRendering()
|
||||
.then(buffer => {
|
||||
let actual = buffer.getChannelData(0);
|
||||
let expected = buffer.getChannelData(1);
|
||||
|
||||
for (let k = 0; k < actual.length;
|
||||
k += RENDER_QUANTUM_FRAMES) {
|
||||
should(
|
||||
actual.slice(k, k + RENDER_QUANTUM_FRAMES),
|
||||
`gain[${k}:${k + RENDER_QUANTUM_FRAMES}]`)
|
||||
.beConstantValueOf(expected[k]);
|
||||
}
|
||||
})
|
||||
.then(() => task.done());
|
||||
});
|
||||
|
||||
// Test k-rate StereoPannerNode.pan is k-rate
|
||||
audit.define(
|
||||
{label: 'StereoPanner', description: 'k-rate StereoPannerNode.pan'},
|
||||
(task, should) => {
|
||||
let context = new OfflineAudioContext({
|
||||
numberOfChannels: 2,
|
||||
sampleRate: sampleRate,
|
||||
length: testDuration * sampleRate
|
||||
});
|
||||
let merger = new ChannelMergerNode(
|
||||
context, {numberOfInputs: context.destination.channelCount});
|
||||
merger.connect(context.destination);
|
||||
|
||||
let src = new ConstantSourceNode(context);
|
||||
|
||||
createTestSubGraph(
|
||||
context, src, merger, 'StereoPannerNode', 'pan', {
|
||||
testModSetup: node => {
|
||||
node.offset.setValueAtTime(-1, 0);
|
||||
node.offset.linearRampToValueAtTime(1, testDuration);
|
||||
}
|
||||
});
|
||||
|
||||
src.start();
|
||||
context.startRendering()
|
||||
.then(buffer => {
|
||||
let actual = buffer.getChannelData(0);
|
||||
let expected = buffer.getChannelData(1);
|
||||
|
||||
for (let k = 0; k < actual.length; k += 128) {
|
||||
should(actual.slice(k, k + 128), `pan[${k}:${k + 128}]`)
|
||||
.beConstantValueOf(expected[k]);
|
||||
}
|
||||
})
|
||||
.then(() => task.done());
|
||||
});
|
||||
|
||||
audit.run();
|
||||
|
||||
function createTestSubGraph(
|
||||
context, src, merger, nodeName, paramName, options) {
|
||||
// The test node which has its AudioParam set up for k-rate autmoations.
|
||||
let tstNode = new window[nodeName](context);
|
||||
|
||||
if (options && options.setups) {
|
||||
options.setups(tstNode);
|
||||
}
|
||||
tstNode[paramName].automationRate = 'k-rate';
|
||||
|
||||
// Modulating signal for the test node. Just a linear ramp. This is
|
||||
// connected to the AudioParam of the tstNode.
|
||||
let tstMod = new ConstantSourceNode(context);
|
||||
if (options && options.testModSetup) {
|
||||
options.testModSetup(tstMod);
|
||||
} else {
|
||||
tstMod.offset.linearRampToValueAtTime(context.length, testDuration);
|
||||
}
|
||||
|
||||
tstMod.connect(tstNode[paramName]);
|
||||
src.connect(tstNode).connect(merger, 0, 0);
|
||||
|
||||
// The ref node is the same type of node as the test node, but uses
|
||||
// a-rate automation. However, the modulating signal is k-rate. This
|
||||
// causes the input to the audio param to be constant over a render,
|
||||
// which is basically the same as making the audio param be k-rate.
|
||||
let refNode = new window[nodeName](context);
|
||||
let refMod = new ConstantSourceNode(context);
|
||||
refMod.offset.automationRate = 'k-rate';
|
||||
if (options && options.testModSetup) {
|
||||
options.testModSetup(refMod);
|
||||
} else {
|
||||
refMod.offset.linearRampToValueAtTime(context.length, testDuration);
|
||||
}
|
||||
|
||||
refMod.connect(refNode[paramName]);
|
||||
src.connect(refNode).connect(merger, 0, 1);
|
||||
|
||||
tstMod.start();
|
||||
refMod.start();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -44,6 +44,132 @@
|
|||
}).then(() => task.done());
|
||||
});
|
||||
|
||||
// Parameters for the For the following tests.
|
||||
|
||||
// Must be power of two to eliminate round-off
|
||||
const sampleRate8k = 8192;
|
||||
|
||||
// Arbitrary duration that doesn't need to be too long to verify k-rate
|
||||
// automations. Probably should be at least a few render quanta.
|
||||
const testDuration = 8 * RENDER_QUANTUM_FRAMES / sampleRate8k;
|
||||
|
||||
// Basic test that k-rate ConstantSourceNode.offset is k-rate. This is
|
||||
// the basis for all of the following tests, so make sure it's right.
|
||||
audit.define(
|
||||
{
|
||||
label: 'ConstantSourceNode.offset k-rate automation',
|
||||
description:
|
||||
'Explicitly test ConstantSourceNode.offset k-rate automation is k-rate'
|
||||
},
|
||||
(task, should) => {
|
||||
let context = new OfflineAudioContext({
|
||||
numberOfChannels: 2,
|
||||
sampleRate: sampleRate8k,
|
||||
length: testDuration * sampleRate8k
|
||||
});
|
||||
let merger = new ChannelMergerNode(
|
||||
context, {numberOfInputs: context.destination.channelCount});
|
||||
merger.connect(context.destination);
|
||||
|
||||
// k-rate ConstantSource.offset using a linear ramp starting at 0
|
||||
// and incrementing by 1 for each frame.
|
||||
let src = new ConstantSourceNode(context, {offset: 0});
|
||||
src.offset.automationRate = 'k-rate';
|
||||
|
||||
src.offset.setValueAtTime(0, 0);
|
||||
src.offset.linearRampToValueAtTime(context.length, testDuration);
|
||||
|
||||
src.connect(merger, 0, 0);
|
||||
|
||||
src.start();
|
||||
|
||||
// a-rate ConstantSource using the same ramp as above.
|
||||
let refSrc = new ConstantSourceNode(context, {offset: 0});
|
||||
|
||||
refSrc.offset.setValueAtTime(0, 0);
|
||||
refSrc.offset.linearRampToValueAtTime(context.length, testDuration);
|
||||
|
||||
refSrc.connect(merger, 0, 1);
|
||||
|
||||
refSrc.start();
|
||||
|
||||
context.startRendering()
|
||||
.then(buffer => {
|
||||
let actual = buffer.getChannelData(0);
|
||||
let expected = buffer.getChannelData(1);
|
||||
|
||||
for (let k = 0; k < actual.length;
|
||||
k += RENDER_QUANTUM_FRAMES) {
|
||||
// Verify that the k-rate output is constant over the render
|
||||
// and that it matches the value of the a-rate value at the
|
||||
// beginning of the render.
|
||||
should(
|
||||
actual.slice(k, k + RENDER_QUANTUM_FRAMES),
|
||||
`k-rate ConstantSource.offset: output[${k}:${
|
||||
k + RENDER_QUANTUM_FRAMES}]`)
|
||||
.beConstantValueOf(expected[k]);
|
||||
}
|
||||
})
|
||||
.then(() => task.done());
|
||||
});
|
||||
|
||||
// This test verifies that a k-rate input to the ConstantSourceNode.offset
|
||||
// works just as if we set the AudioParam to be k-rate. This is the basis
|
||||
// of the following tests, so make sure it works.
|
||||
audit.define(
|
||||
{
|
||||
label: 'ConstantSource.offset',
|
||||
description: 'Verify k-rate automation matches k-rate input'
|
||||
},
|
||||
(task, should) => {
|
||||
let context = new OfflineAudioContext({
|
||||
numberOfChannels: 2,
|
||||
sampleRate: sampleRate8k,
|
||||
length: testDuration * sampleRate8k
|
||||
});
|
||||
|
||||
let merger = new ChannelMergerNode(
|
||||
context, {numberOfInputs: context.destination.channelCount});
|
||||
merger.connect(context.destination);
|
||||
|
||||
let tstSrc = new ConstantSourceNode(context);
|
||||
let tstMod = new ConstantSourceNode(context);
|
||||
tstSrc.offset.automationRate = 'k-rate';
|
||||
tstMod.offset.linearRampToValueAtTime(context.length, testDuration);
|
||||
|
||||
tstMod.connect(tstSrc.offset)
|
||||
tstSrc.connect(merger, 0, 0);
|
||||
|
||||
let refSrc = new ConstantSourceNode(context);
|
||||
let refMod = new ConstantSourceNode(context);
|
||||
refMod.offset.linearRampToValueAtTime(context.length, testDuration);
|
||||
refMod.offset.automationRate = 'k-rate';
|
||||
|
||||
refMod.connect(refSrc.offset);
|
||||
refSrc.connect(merger, 0, 1);
|
||||
|
||||
tstSrc.start();
|
||||
tstMod.start();
|
||||
refSrc.start();
|
||||
refMod.start();
|
||||
|
||||
context.startRendering()
|
||||
.then(buffer => {
|
||||
let actual = buffer.getChannelData(0);
|
||||
let expected = buffer.getChannelData(1);
|
||||
|
||||
for (let k = 0; k < context.length;
|
||||
k += RENDER_QUANTUM_FRAMES) {
|
||||
should(
|
||||
actual.slice(k, k + RENDER_QUANTUM_FRAMES),
|
||||
`ConstantSource.offset k-rate input: output[${k}:${
|
||||
k + RENDER_QUANTUM_FRAMES}]`)
|
||||
.beConstantValueOf(expected[k]);
|
||||
}
|
||||
})
|
||||
.then(() => task.done());
|
||||
});
|
||||
|
||||
audit.run();
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -22,11 +22,12 @@
|
|||
promise_test(async t => {
|
||||
// if available, configure a mock authenticator that does not respond to user input
|
||||
try {
|
||||
await window.test_driver.add_virtual_authenticator({
|
||||
let authenticator = await window.test_driver.add_virtual_authenticator({
|
||||
protocol: "ctap1/u2f",
|
||||
transport: "usb",
|
||||
isUserConsenting: false,
|
||||
});
|
||||
t.add_cleanup(() => window.test_driver.remove_virtual_authenticator(authenticator));
|
||||
} catch (error) {
|
||||
if (error !== "error: Action add_virtual_authenticator not implemented") {
|
||||
throw error;
|
||||
|
|
|
@ -22,6 +22,7 @@ promise_test(async t => {
|
|||
transport: "usb",
|
||||
isUserConsenting: false,
|
||||
});
|
||||
t.add_cleanup(() => window.test_driver.remove_virtual_authenticator(authenticator));
|
||||
const private_key =
|
||||
"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg8_zMDQDYAxlU-Q"
|
||||
+ "hk1Dwkf0v18GZca1DMF3SaJ9HPdmShRANCAASNYX5lyVCOZLzFZzrIKmeZ2jwU"
|
||||
|
|
|
@ -537,17 +537,28 @@ function validateAuthenticatorAssertionResponse(assert) {
|
|||
|
||||
function standardSetup(cb) {
|
||||
// Setup an automated testing environment if available.
|
||||
window.test_driver.add_virtual_authenticator({
|
||||
protocol: "ctap1/u2f",
|
||||
transport: "usb"
|
||||
}).then(cb).catch(error => {
|
||||
if (error === "error: Action add_virtual_authenticator not implemented") {
|
||||
// The protocol is not available. Continue manually.
|
||||
cb();
|
||||
return;
|
||||
let authenticator;
|
||||
promise_test(async t => {
|
||||
try {
|
||||
authenticator = await window.test_driver.add_virtual_authenticator({
|
||||
protocol: "ctap1/u2f",
|
||||
transport: "usb"
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== "error: Action add_virtual_authenticator not implemented") {
|
||||
throw error;
|
||||
}
|
||||
// The protocol is not available. Continue manually.
|
||||
}
|
||||
throw error;
|
||||
});
|
||||
}, "Set up the test environment");
|
||||
|
||||
cb();
|
||||
|
||||
promise_test(t => {
|
||||
if (authenticator) {
|
||||
return window.test_driver.remove_virtual_authenticator(authenticator);
|
||||
}
|
||||
}, "Clean up the test environment");
|
||||
}
|
||||
|
||||
/* JSHINT */
|
||||
|
|
|
@ -10,8 +10,10 @@
|
|||
<script>
|
||||
"use strict";
|
||||
|
||||
let authenticator;
|
||||
|
||||
promise_test(async t => {
|
||||
return window.test_driver.add_virtual_authenticator({
|
||||
authenticator = await window.test_driver.add_virtual_authenticator({
|
||||
protocol: "ctap1/u2f",
|
||||
transport: "usb",
|
||||
});
|
||||
|
@ -114,4 +116,8 @@ promise_test(async t => {
|
|||
{ name: "ECDSA", hash: "SHA-256" }, key, signature, signedData));
|
||||
}, "Get an assertion");
|
||||
|
||||
promise_test(async t => {
|
||||
await window.test_driver.remove_virtual_authenticator(authenticator);
|
||||
}, "Clean up the test environment");
|
||||
|
||||
</script>
|
||||
|
|
|
@ -7,8 +7,12 @@
|
|||
|
||||
// TODO: Factor out the test cases into a separate file.
|
||||
// (like import-test-cases.js)
|
||||
// TODO: Add rest of the tests correponding to
|
||||
// 'dedicated-worker-import-failure.html'
|
||||
|
||||
// SharedWorkers doesn't fire error events when runtime script errors occur.
|
||||
//
|
||||
// "For shared workers, if the error is still not handled afterwards, the error
|
||||
// may be reported to a developer console." [spec text]
|
||||
// https://html.spec.whatwg.org/C/#runtime-script-errors-2
|
||||
|
||||
promise_test(async () => {
|
||||
const scriptURL = 'resources/import-scripts-worker.js';
|
||||
|
@ -25,6 +29,29 @@ promise_test(() => {
|
|||
}, 'Worker construction for non-existent script should dispatch an ' +
|
||||
'ErrorEvent.');
|
||||
|
||||
promise_test(() => {
|
||||
const scriptURL = 'resources/static-import-non-existent-script-worker.js';
|
||||
const worker = new SharedWorker(scriptURL, { type: 'module' });
|
||||
return new Promise(resolve => worker.onerror = resolve);
|
||||
}, 'Static import for non-existent script should dispatch an ErrorEvent.');
|
||||
|
||||
promise_test(async () => {
|
||||
const scriptURL = './non-existent-worker.js';
|
||||
const worker =
|
||||
new SharedWorker('resources/dynamic-import-given-url-worker.js',
|
||||
{ type: 'module' });
|
||||
worker.port.postMessage(scriptURL);
|
||||
const msg_event = await new Promise((resolve, reject) => {
|
||||
worker.port.onmessage = resolve;
|
||||
worker.onerror = error => {
|
||||
const msg = error instanceof ErrorEvent ? error.message
|
||||
: 'unknown error';
|
||||
reject(msg);
|
||||
};
|
||||
});
|
||||
assert_equals(msg_event.data, 'TypeError');
|
||||
}, 'Dynamic import for non-existent script should throw an exception.');
|
||||
|
||||
test(() => {
|
||||
const scriptURL = 'http://invalid:123$';
|
||||
assert_throws_dom('SyntaxError',
|
||||
|
|