Update web-platform-tests to revision ac3d096a5972dea5ecca1c43e324086895db7c6f

This commit is contained in:
WPT Sync Bot 2019-05-25 10:23:28 +00:00
parent 1c74a80e28
commit db54f176d0
47 changed files with 860 additions and 246 deletions

View file

@ -37,3 +37,6 @@
[Revoke blob URL after creating Request, will fetch]
expected: FAIL
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL

View file

@ -19609,9 +19609,9 @@
{}
]
],
"wake-lock/wakelock-applicability-manual.https.html": [
"wake-lock/wakelock-document-hidden-manual.https.html": [
[
"wake-lock/wakelock-applicability-manual.https.html",
"wake-lock/wakelock-document-hidden-manual.https.html",
{}
]
],
@ -120560,7 +120560,7 @@
"css/css-flexbox/flexbox_stf-fixpos.html",
[
[
"about:blank",
"/css/reference/blank.html",
"=="
]
],
@ -127873,6 +127873,30 @@
{}
]
],
"css/css-lists/nested-marker-dynamic.html": [
[
"css/css-lists/nested-marker-dynamic.html",
[
[
"/css/css-lists/nested-marker-ref.html",
"=="
]
],
{}
]
],
"css/css-lists/nested-marker.html": [
[
"css/css-lists/nested-marker.html",
[
[
"/css/css-lists/nested-marker-ref.html",
"=="
]
],
{}
]
],
"css/css-logical/cascading-001.html": [
[
"css/css-logical/cascading-001.html",
@ -178123,6 +178147,42 @@
{}
]
],
"css/motion/offset-rotate-003.html": [
[
"css/motion/offset-rotate-003.html",
[
[
"/css/motion/offset-rotate-ref.html",
"=="
]
],
{}
]
],
"css/motion/offset-rotate-004.html": [
[
"css/motion/offset-rotate-004.html",
[
[
"/css/motion/offset-rotate-ref.html",
"=="
]
],
{}
]
],
"css/motion/offset-rotate-005.html": [
[
"css/motion/offset-rotate-005.html",
[
[
"/css/motion/offset-rotate-ref.html",
"=="
]
],
{}
]
],
"css/selectors/any-link-dynamic-001.html": [
[
"css/selectors/any-link-dynamic-001.html",
@ -274009,6 +274069,11 @@
{}
]
],
"css/css-lists/nested-marker-ref.html": [
[
{}
]
],
"css/css-lists/resources/white.gif": [
[
{}
@ -331404,6 +331469,16 @@
{}
]
],
"wake-lock/resources/page1.html": [
[
{}
]
],
"wake-lock/resources/page2.html": [
[
{}
]
],
"wake-lock/wakelock-disabled-by-feature-policy.https.sub.html.headers": [
[
{}
@ -358733,6 +358808,12 @@
{}
]
],
"css/css-break/break-before-with-no-fragmentation-crash.html": [
[
"css/css-break/break-before-with-no-fragmentation-crash.html",
{}
]
],
"css/css-break/hit-test-inline-fragmentation-with-border-radius.html": [
[
"css/css-break/hit-test-inline-fragmentation-with-border-radius.html",
@ -363611,6 +363692,12 @@
{}
]
],
"css/css-scoping/slotted-matches.html": [
[
"css/css-scoping/slotted-matches.html",
{}
]
],
"css/css-scoping/slotted-nested.html": [
[
"css/css-scoping/slotted-nested.html",
@ -398293,6 +398380,12 @@
{}
]
],
"html/semantics/embedded-content/the-object-element/block-object-with-ruby-crash.html": [
[
"html/semantics/embedded-content/the-object-element/block-object-with-ruby-crash.html",
{}
]
],
"html/semantics/embedded-content/the-object-element/document-getters-return-null-for-cross-origin.html": [
[
"html/semantics/embedded-content/the-object-element/document-getters-return-null-for-cross-origin.html",
@ -445072,15 +445165,21 @@
}
]
],
"wake-lock/wakelock-disabled-by-feature-policy.https.sub.html": [
"wake-lock/wakelock-abortsignal-set.https.html": [
[
"wake-lock/wakelock-disabled-by-feature-policy.https.sub.html",
"wake-lock/wakelock-abortsignal-set.https.html",
{}
]
],
"wake-lock/wakelock-document-hidden.https.html": [
"wake-lock/wakelock-active-document.https.window.js": [
[
"wake-lock/wakelock-document-hidden.https.html",
"wake-lock/wakelock-active-document.https.window.html",
{}
]
],
"wake-lock/wakelock-disabled-by-feature-policy.https.sub.html": [
[
"wake-lock/wakelock-disabled-by-feature-policy.https.sub.html",
{}
]
],
@ -445114,12 +445213,6 @@
{}
]
],
"wake-lock/wakelock-onactivechange.https.html": [
[
"wake-lock/wakelock-onactivechange.https.html",
{}
]
],
"wake-lock/wakelock-state-is-global.https.html": [
[
"wake-lock/wakelock-state-is-global.https.html",
@ -449955,6 +450048,12 @@
{}
]
],
"webaudio/the-audio-api/the-scriptprocessornode-interface/simple-input-output.html": [
[
"webaudio/the-audio-api/the-scriptprocessornode-interface/simple-input-output.html",
{}
]
],
"webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html": [
[
"webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html",
@ -451668,6 +451767,12 @@
{}
]
],
"webrtc/protocol/dtls-fingerprint-validation.html": [
[
"webrtc/protocol/dtls-fingerprint-validation.html",
{}
]
],
"webrtc/protocol/ice-state.https.html": [
[
"webrtc/protocol/ice-state.https.html",
@ -581135,6 +581240,10 @@
"e2e7297d1532fba60d2074aa2701600dc7441742",
"visual"
],
"css/css-break/break-before-with-no-fragmentation-crash.html": [
"fb80ec45bceec093481fa54513c606c5952628b1",
"testharness"
],
"css/css-break/form-control.html": [
"8ef6eedae252f36de3bfeef8c3a6db23bf6f3d89",
"reftest"
@ -582480,7 +582589,7 @@
"reftest"
],
"css/css-contain/contain-layout-baseline-005.html": [
"a447744bd7c63d7c36e4dece1654885c6cc8f7a7",
"0971402e6b9f3afcf3224cd3e95d195606e0c698",
"reftest"
],
"css/css-contain/contain-layout-breaks-001.html": [
@ -582492,7 +582601,7 @@
"reftest"
],
"css/css-contain/contain-layout-button-001.html": [
"e8beef7c0edfa20258b9600376d3ab245ca63f32",
"b53b28879e2ce884b61f741032afbf486afb3bf5",
"reftest"
],
"css/css-contain/contain-layout-cell-001.html": [
@ -583052,7 +583161,7 @@
"support"
],
"css/css-contain/reference/contain-layout-baseline-005-ref.html": [
"40a34f9ff156cb1d876b4f538b59c57e560403c4",
"360652c9397ee8b69a4bf07c763148eafcc64be0",
"support"
],
"css/css-contain/reference/contain-layout-breaks-002-ref.html": [
@ -583060,7 +583169,7 @@
"support"
],
"css/css-contain/reference/contain-layout-button-001-ref.html": [
"11a784b213cbc05d10cdcc199a11055fe0c0fdfa",
"da83204dce641b37a820cf47d2201d94a0fd60cb",
"support"
],
"css/css-contain/reference/contain-layout-cell-001-ref.html": [
@ -587708,7 +587817,7 @@
"reftest"
],
"css/css-flexbox/flexbox_stf-fixpos.html": [
"48537524586a91286f76e0de2cfbf8579d8f8b6f",
"f211201efdea7b552f8ee7ee8cfc850a71fbad3c",
"reftest"
],
"css/css-flexbox/flexbox_stf-float.html": [
@ -600491,6 +600600,18 @@
"d4b3e300f8ea5011249e433b925a9a8f32e8c935",
"reftest"
],
"css/css-lists/nested-marker-dynamic.html": [
"fdfb93dc6149055be4611d85fb9705bcafe5c3a5",
"reftest"
],
"css/css-lists/nested-marker-ref.html": [
"c4233918ab5dbad77129e2c473d527feb022c3f7",
"support"
],
"css/css-lists/nested-marker.html": [
"9627ce936ae570325b430a1ac673cd66ae7d4252",
"reftest"
],
"css/css-lists/resources/white.gif": [
"3aa2098dc8817f5360d13440f3d6245a030dc31d",
"support"
@ -608095,6 +608216,10 @@
"c06c96143ba0d478940fb54208d241adb4f6ee8b",
"testharness"
],
"css/css-scoping/slotted-matches.html": [
"1a582fe98d3d6bbd13a66869af151d614cdb1165",
"testharness"
],
"css/css-scoping/slotted-nested.html": [
"c7139fea4c280585197db5bd432931bcf53c2e53",
"testharness"
@ -638584,7 +638709,7 @@
"support"
],
"css/motion/inheritance.html": [
"8af4f9b91a83506d6f20c320e229cf890e0fdf4f",
"4a82f32cd58694f43314b6f52fc5e828ddfd8f01",
"testharness"
],
"css/motion/offset-anchor-transform-box-fill-box-ref.html": [
@ -638667,6 +638792,18 @@
"fb301be24efc2aa2e50da0aabe6009553b92b655",
"reftest"
],
"css/motion/offset-rotate-003.html": [
"8f52024a6fc6e5883b80a1292b6d644f58eb93f7",
"reftest"
],
"css/motion/offset-rotate-004.html": [
"33783d423b50585c3da0cd37f13df4763774bd38",
"reftest"
],
"css/motion/offset-rotate-005.html": [
"9b1c40ed112c9f95bacfa70810d18de97fd3bcd7",
"reftest"
],
"css/motion/offset-rotate-ref.html": [
"ec22768e96a1cd1efab206781b985cec8f006686",
"support"
@ -638716,7 +638853,7 @@
"testharness"
],
"css/motion/parsing/offset-rotate-computed.html": [
"a29d25ccdf2551503399b0a36089d463e481c0ed",
"56705769fb7bb752402788337d66bef0b5a705d3",
"testharness"
],
"css/motion/parsing/offset-rotate-parsing-invalid.html": [
@ -638724,7 +638861,7 @@
"testharness"
],
"css/motion/parsing/offset-rotate-parsing-valid.html": [
"71978d33b120f4ed353820f3f08ff4290c070eb7",
"048c246f16b6cdcd286c9fa4ac6d1ac8dbdfbcbf",
"testharness"
],
"css/reference/META.yml": [
@ -640764,7 +640901,7 @@
"support"
],
"css/support/computed-testcommon.js": [
"6c0c9aef72ba0f0e6cfd45e703f2a9bb654eded1",
"c6719784522136093480178197375bef75159d05",
"support"
],
"css/support/green.ico": [
@ -640784,7 +640921,7 @@
"support"
],
"css/support/inheritance-testcommon.js": [
"0e4651be8aa9e0d45949a9d1ae85a19cf85ab467",
"8d1645f9b110137408837418423a2ed42a588072",
"support"
],
"css/support/parsing-testcommon.js": [
@ -656776,7 +656913,7 @@
"support"
],
"feature-policy/resources/feature-policy-wakelock.html": [
"292e8a1c036b872cc75fa02cba96009a2f6385a5",
"24fe7a526cbae846727391f7527a3165c865ca0a",
"support"
],
"feature-policy/resources/feature-policy-webvr.html": [
@ -672631,6 +672768,10 @@
"c28f667ff3ae310ecd45b3be9c8cf0cb972a2722",
"testharness"
],
"html/semantics/embedded-content/the-object-element/block-object-with-ruby-crash.html": [
"481a7408e4a4fa91613556b39c9ddc95d568c50c",
"testharness"
],
"html/semantics/embedded-content/the-object-element/document-getters-return-null-for-cross-origin.html": [
"3d1077538e2468dd3a6a3020e1badfd2dcd759a3",
"testharness"
@ -692624,7 +692765,7 @@
"support"
],
"payment-handler/app-change-payment-method.js": [
"7a9f7a7fa7538fd234c5930cb96b2e6fdf970a77",
"0e5a4768e7626f666077e794e0731c9a1e3e9d35",
"support"
],
"payment-handler/basic-card.js": [
@ -719888,7 +720029,7 @@
"support"
],
"tools/wptrunner/requirements.txt": [
"ff0adf17ac8cf60ee4878b99801b60605e6046c3",
"50560fa82255dd8c56f0b58e7d15539b75ede005",
"support"
],
"tools/wptrunner/requirements_chrome.txt": [
@ -722876,35 +723017,47 @@
"support"
],
"wake-lock/idlharness.https.any.js": [
"fa47bd9b1e007518fb4c91328bf305e3afead449",
"2ad9980dae53727ea328e942dead029a936875cc",
"testharness"
],
"wake-lock/wakelock-applicability-manual.https.html": [
"2bd5c9dba4d7c7cbaab692f8f87f64d2708313d5",
"manual"
"wake-lock/resources/page1.html": [
"7fc080d380c4bd46dfb011910e570ee412561b92",
"support"
],
"wake-lock/resources/page2.html": [
"7fc080d380c4bd46dfb011910e570ee412561b92",
"support"
],
"wake-lock/wakelock-abortsignal-set.https.html": [
"cc534d13d6ca81763627291680c8740d6bd5aff2",
"testharness"
],
"wake-lock/wakelock-active-document.https.window.js": [
"f0f1e38ddf9defaf4a484ee5db39ec37e561ade5",
"testharness"
],
"wake-lock/wakelock-disabled-by-feature-policy.https.sub.html": [
"008424ac3c8720a1b0a0691827a1c6f1ddb34ccd",
"0d451c98debb3b8ec258c949f9e0989bcb7ed23c",
"testharness"
],
"wake-lock/wakelock-disabled-by-feature-policy.https.sub.html.headers": [
"1d3769ec794b353e8c614e64ce2c1b0b1010e528",
"support"
],
"wake-lock/wakelock-document-hidden.https.html": [
"1edafee45fc11ba5ae3ebcc83d1e8a5c22da9f24",
"testharness"
"wake-lock/wakelock-document-hidden-manual.https.html": [
"d7c12485e16a811fe680fde07048fd2a4294660f",
"manual"
],
"wake-lock/wakelock-enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
"d93eaa8bdc58861a922cb8cdb7cb3716d1ed8d97",
"b27fbefa4ecabae1445a830af41f71f59564453f",
"testharness"
],
"wake-lock/wakelock-enabled-by-feature-policy-attribute.https.sub.html": [
"c0066e7f1f84d642554a31a4fa592dc08edbfc00",
"3897df6288e7d7178dc7dfb24d680ca9ce3531e1",
"testharness"
],
"wake-lock/wakelock-enabled-by-feature-policy.https.sub.html": [
"39a2af4960fd8011d2b502f0d7986992ac92b7b2",
"f4aaa73e0efa09edd592bf1e147b1356c749e790",
"testharness"
],
"wake-lock/wakelock-enabled-by-feature-policy.https.sub.html.headers": [
@ -722912,7 +723065,7 @@
"support"
],
"wake-lock/wakelock-enabled-on-self-origin-by-feature-policy.https.sub.html": [
"ab81d4068b11d1aa534be0897f6dca684483158e",
"19bf59d368828c82c766d4841244c42e3b94baca",
"testharness"
],
"wake-lock/wakelock-enabled-on-self-origin-by-feature-policy.https.sub.html.headers": [
@ -722923,10 +723076,6 @@
"2c61f41311db3f9edf0502ea752ca27970eed3fb",
"testharness"
],
"wake-lock/wakelock-onactivechange.https.html": [
"381e1e40f1cfb676e33d5c0374924164f4f6e2de",
"testharness"
],
"wake-lock/wakelock-state-is-global.https.html": [
"2eee31982498caab44b5160237c7ce7f8ce9a569",
"testharness"
@ -724903,6 +725052,10 @@
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"support"
],
"webaudio/the-audio-api/the-scriptprocessornode-interface/simple-input-output.html": [
"7fd20e67a7079ab3c02d490e458cb762006e0ca0",
"testharness"
],
"webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html": [
"9409f1ffce2110c177332388988d7ddb559d3ae2",
"testharness"
@ -726740,7 +726893,7 @@
"testharness"
],
"webrtc/RTCPeerConnection-helper.js": [
"986204df8b78d58af4fd4b171751931fb35ee563",
"fde1c6f0374a02c0998fdfe3a1ba5e7046d314f4",
"support"
],
"webrtc/RTCPeerConnection-iceConnectionState-disconnected.https.html": [
@ -727031,6 +727184,10 @@
"2603a02cddf3f026b09b8a233d17ff3f92bd43a1",
"testharness"
],
"webrtc/protocol/dtls-fingerprint-validation.html": [
"9a397785eec1972a3f6833853f386eeeb61de318",
"testharness"
],
"webrtc/protocol/ice-state.https.html": [
"4a6b4333e16a179e6fffadde0a7018eb91895104",
"testharness"

View file

@ -74,6 +74,3 @@
[opacity end]
expected: FAIL
[border-left-width end]
expected: FAIL

View file

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

View file

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

View file

@ -1,4 +1,4 @@
[traverse_the_history_2.html]
[traverse_the_history_5.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -0,0 +1,10 @@
[non-active-document.html]
[DOMParser]
expected: FAIL
[createHTMLDocument]
expected: FAIL
[<template>]
expected: FAIL

View file

@ -0,0 +1,2 @@
[simple-input-output.html]
expected: ERROR

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-break/">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=966369">
<div id="container" style="height:100px";>
<div style="height:100%;">
<div style="break-before:page;"></div>
</div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(()=> {
document.body.offsetTop;
container.style.height = "101px";
}, "no crash");
</script>

View file

@ -13,6 +13,7 @@
contain: layout;
background: cyan;
font-size: 20px;
vertical-align: baseline;
}
.wrapper > :nth-child(1) {
background: magenta;
@ -49,7 +50,7 @@ fieldset, details {
</div>
<div class="wrapper">
<canvas></canvas>
<input value="foo"></input>
<input value="foo" size="3"></input>
<input type="file"></input>
</div>
<div class="wrapper">

View file

@ -3,12 +3,16 @@
<title>CSS Containment Test: Layout containment on button</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout">
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align">
<link rel="match" href="reference/contain-layout-button-001-ref.html">
<meta name=assert content="Layout containment does apply to buttons, thus their baseline is the same than if they don't have contents.">
<meta name=assert content="Layout containment does apply to buttons, thus their baseline is their margin-bottom edge.">
<style>
button {
border: 5px solid green;
padding: 0;
/* We use a nonzero margin-bottom to be sure we're synthesizing a baseline
from the margin-box rather than from the border-box: */
margin-bottom: 2px;
contain: layout;
color: transparent;
width: 0;
@ -16,5 +20,5 @@ button {
}
</style>
<p>This test passes if it has the same output as the reference. You see the word "before", a 10px green square at the bottom, and then the word "after".</p>
<p>This test passes if it has the same output as the reference. You see the word "before", a 10px green square aligned 2px above the text's baseline, and then the word "after".</p>
before<button>b</button>after

View file

@ -46,7 +46,7 @@ fieldset, details {
</div>
<div class="wrapper">
<canvas></canvas>
<input value="foo"></input>
<input value="foo" size="3"></input>
<input type="file"></input>
</div>
<div class="wrapper">

View file

@ -3,9 +3,11 @@
<title>CSS Containment Test: Reference file</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<style>
button {
div.fakeButton {
display: inline-block;
border: 5px solid green;
padding: 0;
margin-bottom: 2px;
color: transparent;
width: 0;
height: 0px;
@ -15,5 +17,5 @@ button {
}
</style>
<p>This test passes if it has the same output as the reference. You see the word "before", a 10px green square at the bottom, and then the word "after".</p>
before<button></button>after
<p>This test passes if it has the same output as the reference. You see the word "before", a 10px green square aligned 2px above the text's baseline, and then the word "after".</p>
before<div class="fakeButton"></div>after

View file

@ -2,7 +2,7 @@
<title>flexbox | flexcontainer versus stf :: fixed</title>
<link rel="author" href="http://opera.com" title="Opera Software">
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-items">
<link rel="match" href="about:blank">
<link rel="match" href="../reference/blank.html">
<style>
#test {
background: red;

View file

@ -0,0 +1,36 @@
<!doctype html>
<title>::marker pseudo-elements generated by ::before and ::after are not addressable by selectors</title>
<link rel="help" href="https://drafts.csswg.org/css-lists/#list-item">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1539171">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1543758">
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<link rel="match" href="nested-marker-ref.html">
<style>
li, ::marker {
color: red;
}
li::before, li::after {
display: list-item;
content: "Before";
}
li::after {
content: "After";
}
.tweak::marker {
color: blue;
}
.tweak, .tweak::before, .tweak::after {
color: initial;
}
</style>
<ol>
<li>Foo
<li>Bar
<script>
window.onload = function() {
document.body.offsetTop;
for (let li of document.querySelectorAll("li"))
li.classList.add("tweak");
}
</script>

View file

@ -0,0 +1,15 @@
<!doctype html>
<title>CSS test reference</title>
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<style>
li::marker {
color: blue;
}
div {
display: list-item;
}
</style>
<ol>
<li><div>Before</div>Foo<div>After</div>
<li><div>Before</div>Bar<div>After</div>

View file

@ -0,0 +1,26 @@
<!doctype html>
<title>::marker pseudo-elements generated by ::before and ::after are not addressable by global selectors</title>
<link rel="help" href="https://drafts.csswg.org/css-lists/#list-item">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1539171">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1543758">
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<link rel="match" href="nested-marker-ref.html">
<style>
::marker {
color: red;
}
li::marker {
color: blue;
}
li::before, li::after {
display: list-item;
content: "Before";
}
li::after {
content: "After";
}
</style>
<ol>
<li>Foo
<li>Bar

View file

@ -0,0 +1,16 @@
<!doctype html>
<title>CSS Test: ::slotted() should not match via the matches() API, since it's in the wrong scope</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#slotted-pseudo">
<link rel="help" href="https://dom.spec.whatwg.org/#dom-element-matches">
<link rel="help" href="https://bugzil.la/1544242">
<div id="host"><div id="slotted"></div></div>
<script>
test(function() {
let slotted = document.getElementById("slotted");
host.attachShadow({ mode: "open" }).innerHTML = `<slot></slot>`;
assert_false(slotted.matches("::slotted(div)"), "Shouldn't match ::slotted from the outer tree")
}, "::slotted() doesn't reveal the presence of shadow DOM via matches()");
</script>

View file

@ -19,7 +19,8 @@ assert_not_inherited('offset-anchor', 'auto', '2px 3px');
assert_not_inherited('offset-distance', '0px', '4px');
assert_not_inherited('offset-path', 'none', 'path("M 5 6 H 7")');
assert_not_inherited('offset-position', 'auto', '8px 9px');
assert_not_inherited('offset-rotate', 'auto 0deg', '90deg');
// https://github.com/w3c/fxtf-drafts/issues/340
assert_not_inherited('offset-rotate', ['auto 0deg', 'auto'], '90deg');
</script>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Motion Path: offset-rotate</title>
<link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-rotate-property">
<link rel="match" href="offset-rotate-ref.html">
<meta name="assert" content="This tests offset-rotate <angle>">
<style>
#target {
position: absolute;
left: 300px;
top: 100px;
width: 300px;
height: 200px;
background-color: lime;
transform-origin: 0px 0px;
offset-path: path('m 0 0 v -200 -200') ;
offset-rotate: 30deg;
}
</style>
</head>
<body>
<div id="target"></div>
</body>
</html>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>CSS Motion Path: offset-rotate</title>
<link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-rotate-property">
<link rel="match" href="offset-rotate-ref.html">
<meta name="assert" content="This tests offset-rotate auto with path()">
<style>
#target {
position: absolute;
left: 300px;
top: 100px;
width: 300px;
height: 200px;
background-color: lime;
transform-origin: 0px 0px;
offset-rotate: auto;
}
</style>
<script>
function test() {
let target = document.getElementById('target');
// Get a path which has the same direction as "ray(120deg ...)"
let verticalMove = 100 * Math.tan(30 * Math.PI / 180);
target.style.offsetPath = `path("m 0 0 l 100 ${verticalMove}")`;
window.getComputedStyle(target).offsetPath;
window.requestAnimationFrame(function() {
document.documentElement.removeAttribute('class');
});
}
</script>
</head>
<body onload='test()'>
<div id="target"></div>
</body>
</html>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>CSS Motion Path: offset-rotate</title>
<link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-rotate-property">
<link rel="match" href="offset-rotate-ref.html">
<meta name="assert" content="This tests offset-rotate reverse <angle> with path()">
<style>
#target {
position: absolute;
left: 300px;
top: 100px;
width: 300px;
height: 200px;
background-color: lime;
transform-origin: 0px 0px;
offset-rotate: reverse 60deg;
}
</style>
<script>
function test() {
let target = document.getElementById('target');
// Get a path which has the same direction as "ray(-120deg ...)"
let verticalMove = 100 * Math.tan(30 * Math.PI / 180);
target.style.offsetPath = `path("m 0 0 l -100 ${verticalMove}")`;
window.getComputedStyle(target).offsetPath;
window.requestAnimationFrame(function() {
document.documentElement.removeAttribute('class');
});
}
</script>
</head>
<body onload='test()'>
<div id="target"></div>
</body>
</html>

View file

@ -13,7 +13,8 @@
<body>
<div id="target"></div>
<script>
test_computed_value("offset-rotate", "auto", "auto 0deg");
// https://github.com/w3c/fxtf-drafts/issues/340
test_computed_value("offset-rotate", "auto", ["auto 0deg", "auto"]);
test_computed_value("offset-rotate", "reverse", "auto 180deg");
test_computed_value("offset-rotate", "calc(90deg - 0.5turn - 300grad + 0rad)", "-360deg");
test_computed_value("offset-rotate", "auto 5turn", "auto 1800deg");

View file

@ -16,9 +16,11 @@ test_valid_value("offset-rotate", "auto");
test_valid_value("offset-rotate", "reverse");
test_valid_value("offset-rotate", "-400deg");
test_valid_value("offset-rotate", "auto 5turn");
test_valid_value("offset-rotate", "reverse 0rad");
// https://github.com/w3c/fxtf-drafts/issues/340
test_valid_value("offset-rotate", "reverse 0rad", ["reverse 0rad", "reverse"]);
test_valid_value("offset-rotate", "5turn auto", "auto 5turn");
test_valid_value("offset-rotate", "0rad reverse", "reverse 0rad");
// https://github.com/w3c/fxtf-drafts/issues/340
test_valid_value("offset-rotate", "0rad reverse", ["reverse 0rad", "reverse"]);
</script>
</body>
</html>

View file

@ -6,22 +6,36 @@
*
* @param {string} property The name of the CSS property being tested.
* @param {string} specified A specified value for the property.
* @param {string} computed The expected computed value. If omitted,
defaults to specified.
* @param {string|array} computed The expected computed value,
* or an array of permitted computed value.
* If omitted, defaults to specified.
*/
function test_computed_value(property, specified, computed) {
if (!computed)
computed = specified;
let computedDesc = "'" + computed + "'";
if (Array.isArray(computed))
computedDesc = '[' + computed.map(e => "'" + e + "'").join(' or ') + ']';
test(() => {
const target = document.getElementById('target');
assert_true(property in getComputedStyle(target), property + " doesn't seem to be supported in the computed style");
target.style[property] = '';
target.style[property] = specified;
assert_equals(getComputedStyle(target)[property], computed);
if (computed !== specified) {
target.style[property] = '';
target.style[property] = computed;
assert_equals(getComputedStyle(target)[property], computed, 'computed value should round-trip');
let readValue = getComputedStyle(target)[property];
if (Array.isArray(computed)) {
assert_in_array(readValue, computed);
} else {
assert_equals(readValue, computed);
}
}, "Property " + property + " value '" + specified + "' computes to '" + computed + "'");
if (readValue !== specified) {
target.style[property] = '';
target.style[property] = readValue;
assert_equals(getComputedStyle(target)[property], readValue,
'computed value should round-trip');
}
}, "Property " + property + " value '" + specified + "' computes to " +
computedDesc);
}

View file

@ -3,13 +3,21 @@
(function() {
function assert_initial(property, initial) {
let initialDesc = initial;
if (Array.isArray(initial))
initialDesc = '[' + initial.map(e => "'" + e + "'").join(' or ') + ']';
test(() => {
const target = document.getElementById('target');
assert_true(property in getComputedStyle(target), property + " doesn't seem to be supported in the computed style");
target.style[property] = 'initial';
assert_equals(getComputedStyle(target)[property], initial);
if (Array.isArray(initial)) {
assert_in_array(getComputedStyle(target)[property], initial);
} else {
assert_equals(getComputedStyle(target)[property], initial);
}
target.style[property] = '';
}, 'Property ' + property + ' has initial value ' + initial);
}, 'Property ' + property + ' has initial value ' + initialDesc);
}
/**
@ -17,10 +25,12 @@ function assert_initial(property, initial) {
*
* The current document must have an element #target within element #container.
*
* @param {string} property The name of the CSS property being tested.
* @param {string} initial The computed value for 'initial'.
* @param {string} other An arbitrary value for the property that round
* trips and is distinct from the initial value.
* @param {string} property The name of the CSS property being tested.
* @param {string|array} initial The computed value for 'initial' or a list
* of acceptable computed value serializations.
* @param {string} other An arbitrary value for the property that
* round trips and is distinct from the initial
* value.
*/
function assert_inherited(property, initial, other) {
assert_initial(property, initial);
@ -52,10 +62,12 @@ function assert_inherited(property, initial, other) {
*
* The current document must have an element #target within element #container.
*
* @param {string} property The name of the CSS property being tested.
* @param {string} initial The computed value for 'initial'.
* @param {string} other An arbitrary value for the property that round
* trips and is distinct from the initial value.
* @param {string} property The name of the CSS property being tested.
* @param {string|array} initial The computed value for 'initial' or a list
* of acceptable computed value serializations.
* @param {string} other An arbitrary value for the property that
* round trips and is distinct from the initial
* value.
*/
function assert_not_inherited(property, initial, other) {
assert_initial(property, initial);

View file

@ -1,12 +1,25 @@
<script>
"use strict";
Promise.resolve().then(() => {
try {
const wakeLock = new WakeLock("screen");
window.parent.postMessage({ enabled: true }, "*");
} catch (e) {
window.parent.postMessage({ enabled: false }, "*");
}
Promise.resolve().then(async () => {
// On success, WakeLock.request() returns a promise that never resolves. To
// prevent a timeout, abort it with an AbortController and use the different
// DOMExceptions we get to determine if this worked or not.
const controller = new AbortController();
const wakeLock = WakeLock.request("screen", { signal: controller.signal });
wakeLock.catch(e => {
if (e.name == "AbortError") {
// We stopped due to the call to AbortController.abort(), so we did manage
// to get the lock.
window.parent.postMessage({ enabled: true }, "*");
} else if (e.name == "NotAllowedError") {
// This means requesting the lock failed.
window.parent.postMessage({ enabled: false }, "*");
} else {
// We should not really hit this branch.
window.parent.postMessage({ enabled: false }, "*");
}
});
controller.abort();
});
</script>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=966363">
<object style="display:block;">
<ruby></ruby>
</object>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(()=> {}, "no crash");
</script>

View file

@ -20,7 +20,7 @@ async function responder(event) {
});
changePaymentMethodReturned = response;
} catch (err) {
changePaymentMethodReturned = error.message;
changePaymentMethodReturned = err.message;
}
return {methodName, details: {changePaymentMethodReturned}};
}

View file

@ -1,6 +1,6 @@
html5lib==1.0.1
mozinfo==1.1.0
mozlog==4.0
mozlog==4.1
mozdebug==0.1.1
pillow==6.0.0
urllib3[secure]==1.25.2

View file

@ -10,7 +10,7 @@ idl_test(
['dom', 'html', 'permissions'],
idl_array => {
idl_array.add_objects({
WakeLock: ['new WakeLock("screen")']
WakeLock: []
});
}
);

View file

@ -0,0 +1 @@
<meta charset="utf-8">

View file

@ -0,0 +1 @@
<meta charset="utf-8">

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>WakeLock: passing an AbortSignal already set aborts</title>
<link rel="help" href="https://w3c.github.io/wake-lock/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(t => {
const abortController = new AbortController();
const abortSignal = abortController.signal;
abortController.abort();
assert_true(abortSignal.aborted);
return promise_rejects(t, "AbortError", WakeLock.request('screen', { signal: abortSignal }));
}, "A WakeLock request with an AbortSignal whose abort flag is set always aborts");
promise_test(async t => {
const abortController = new AbortController();
const abortSignal = abortController.signal;
abortController.abort();
assert_true(abortSignal.aborted);
const lock1 = WakeLock.request('screen', { signal: abortSignal });
const lock2 = WakeLock.request('screen', { signal: abortSignal });
const lock3 = WakeLock.request('system', { signal: abortSignal });
await promise_rejects(t, "AbortError", lock1);
await promise_rejects(t, "AbortError", lock2);
await promise_rejects(t, "AbortError", lock3);
}, "The same AbortSignal can be used to cause multiple wake locks to abort");
</script>

View file

@ -0,0 +1,81 @@
function getWakeLockObject(iframe, url) {
return new Promise(resolve => {
iframe.addEventListener(
"load",
() => {
const { WakeLock } = iframe.contentWindow;
resolve(WakeLock);
},
{ once: true }
);
iframe.src = url;
});
}
promise_test(async t => {
const iframe = document.createElement("iframe");
document.body.appendChild(iframe);
// We first got to page1.html, grab a WakeLock object.
const wakeLock1 = await getWakeLockObject(
iframe,
"/wake-lock/resources/page1.html"
);
// We navigate the iframe again, putting wakeLock1's document into an inactive state.
const wakeLock2 = await getWakeLockObject(
iframe,
"/wake-lock/resources/page2.html"
);
// Now, wakeLock1's relevant global object's document is no longer active.
// So, call .request(), and make sure it rejects appropriately.
await promise_rejects(
t,
"NotAllowedError",
wakeLock1.request('screen'),
"Inactive document, so must throw NotAllowedError"
);
// We are done, so clean up.
iframe.remove();
}, "WakeLock.request() aborts if the document is not active.");
promise_test(async t => {
// We nest two iframes and wait for them to load.
const outerIframe = document.createElement("iframe");
document.body.appendChild(outerIframe);
// Load the outer iframe (we don't care about the awaited request)
await getWakeLockObject(
outerIframe,
"/wake-lock/resources/page1.html"
);
// Now we create the inner iframe
const innerIframe = outerIframe.contentDocument.createElement("iframe");
// nest them
outerIframe.contentDocument.body.appendChild(innerIframe);
// load innerIframe, and get the WakeLock instance
const wakeLock = await getWakeLockObject(
innerIframe,
"/wake-lock/resources/page2.html"
);
// Navigate the outer iframe to a new location.
// Wait for the load event to fire.
await new Promise(resolve => {
outerIframe.addEventListener("load", resolve);
outerIframe.src = "/wake-lock/resources/page2.html";
});
// Now, request's relevant global object's document is still active
// (it is the active document of the inner iframe), but is not fully active
// (since the parent of the inner iframe is itself no longer active).
// So, call request.show() and make sure it rejects appropriately.
await promise_rejects(
t,
"NotAllowedError",
wakeLock.request('screen'),
"Active, but not fully active, so must throw NotAllowedError"
);
// We are done, so clean up.
outerIframe.remove();
}, "WakeLock.request() aborts if the document is active, but not fully active.");

View file

@ -1,59 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>wake lock applicability test</title>
<link rel="help" href="https://w3c.github.io/wake-lock/#dfn-applicable-wake-lock">
<meta name="flags" content="interact">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<p>
Lock and turn off the screen, then turn on and unlock the screen.
</p>
<p>
Note: All the actions need to be done in 60 seconds, otherwise it will get TIMEOUT.
</p>
<script>
setup({ explicit_timeout: true });
promise_test(async t => {
const wakeLock = new WakeLock("screen");
const controller = new AbortController();
const signal = controller.signal;
await wakeLock.request({ signal });
assert_true(wakeLock.active, "the active is true when wake lock is acquired");
const eventWatcher = new EventWatcher(t, document, "visibilitychange");
//lock screen to fire 'visibilitychange'
await eventWatcher.wait_for("visibilitychange");
assert_true(document.hidden, "document is hidden when screen is locked");
assert_false(wakeLock.active, "the screen wake lock is not active when screen is switched off");
//unlock screen to fire 'visibilitychange'
await eventWatcher.wait_for("visibilitychange");
assert_false(document.hidden, "document is visiable when screen is unlocked");
assert_true(wakeLock.active, "the screen wake lock is active when screen is switched on again");
controller.abort();
}, "The screen wake lock isn't applicable after the screen is manually swiched off"
+ " by the user until it is switched on again.");
promise_test(async t => {
const wakeLock = new WakeLock("system");
const controller = new AbortController();
const signal = controller.signal;
await wakeLock.request({ signal });
assert_true(wakeLock.active, "the active is true when wake lock is acquired");
const eventWatcher = new EventWatcher(t, document, "visibilitychange");
//lock screen to fire 'visibilitychange'
await eventWatcher.wait_for("visibilitychange");
assert_true(document.hidden, "document is hidden when screen is locked");
assert_true(wakeLock.active, "the system wake lock is still active when screen is switched off");
controller.abort();
}, "Manually switching off the screen will not affect the applicability of the system wake lock.");
</script>

View file

@ -11,13 +11,13 @@
const cross_origin_src =
"https://{{domains[www]}}:{{ports[https][0]}}" + same_origin_src;
test(() => {
assert_throws("NotAllowedError", () => new WakeLock("screen"));
promise_test(t => {
return promise_rejects(t, "NotAllowedError", WakeLock.request("screen"));
}, 'Feature-Policy header {"wake-lock" : []} disallows the top-level document.');
async_test(t => {
test_feature_availability(
'new WakeLock("screen")',
'WakeLock.request("screen")',
t,
same_origin_src,
expect_feature_unavailable_default
@ -26,7 +26,7 @@
async_test(t => {
test_feature_availability(
'new WakeLock("screen")',
'WakeLock.request("screen")',
t,
cross_origin_src,
expect_feature_unavailable_default

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="timeout" content="long">
<title>Screen wake locks respect page visibility changes</title>
<link rel="help" href="https://w3c.github.io/wake-lock/#dfn-requesting-the-wake-lock">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async t => {
const controller = new AbortController();
const screenWakeLock = WakeLock.request('screen', { signal: controller.signal });
const systemWakeLock = WakeLock.request('system', { signal: controller.signal });
const systemWakeLockPromise = new Promise((resolve, reject) => {
systemWakeLock.catch(error => {
assert_equals("AbortError", error.name, "systemWakeLock must have been aborted");
assert_false(document.hidden, "systemWakeLock must have been aborted after the page is visible again");
resolve();
});
});
const eventWatcher = new EventWatcher(t, document, "visibilitychange");
await eventWatcher.wait_for("visibilitychange");
assert_true(document.hidden, "document is hidden after the visibilitychange event");
await promise_rejects(t, "AbortError", screenWakeLock, "existing screen locks are aborted");
await promise_rejects(t, "NotAllowedError", WakeLock.request('screen'),
"new screen locks are not allowed when the page is not visible");
await eventWatcher.wait_for("visibilitychange");
assert_false(document.hidden, "document is no longer hidden after the visibilitychange event");
controller.abort();
return systemWakeLockPromise;
}, "Test screen locks respect page visibility changes and system locks are unchanged");
</script>
<p>Switch the page to the background, then switch back to it.</p>

View file

@ -1,31 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>screen wake lock will not be actived in hidden document</title>
<link rel="help" href="https://w3c.github.io/wake-lock/#dfn-requesting-the-wake-lock">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async t => {
const wakeLock = new WakeLock("screen");
const controller = new AbortController();
const signal = controller.signal;
await wakeLock.request({ signal });
assert_true(wakeLock.active, "the active is true when wake lock is acquired");
const eventWatcher = new EventWatcher(t, document, "visibilitychange");
const win = window.open("about:blank", "_blank");
await eventWatcher.wait_for("visibilitychange");
assert_true(document.hidden, "document is hidden when new window is opened");
assert_false(wakeLock.active, "the active is false when document is hidden");
win.close();
await eventWatcher.wait_for("visibilitychange");
assert_false(document.hidden, "document is visiable when new window is closed");
assert_true(wakeLock.active, "the active is true when document regains visibility");
controller.abort();
}, "Test that screen wake lock will not be actived in hidden document");
</script>

View file

@ -14,7 +14,7 @@
async_test(t => {
test_feature_availability(
'new WakeLock("screen")',
'WakeLock.request("screen")',
t,
same_origin_src,
expect_feature_available_default,
@ -24,7 +24,7 @@
async_test(t => {
test_feature_availability(
'new WakeLock("screen")',
'WakeLock.request("screen")',
t,
cross_origin_src,
expect_feature_unavailable_default,

View file

@ -13,7 +13,7 @@
async_test(t => {
test_feature_availability(
'new WakeLock("screen")',
'WakeLock.request("screen")',
t,
same_origin_src,
expect_feature_available_default,
@ -23,7 +23,7 @@
async_test(t => {
test_feature_availability(
'new WakeLock("screen")',
'WakeLock.request("screen")',
t,
cross_origin_src,
expect_feature_available_default,

View file

@ -11,17 +11,16 @@
const cross_origin_src =
"https://{{domains[www]}}:{{ports[https][0]}}" + same_origin_src;
test(() => {
try {
new WakeLock("screen");
} catch (e) {
assert_unreached(e);
}
promise_test(t => {
const controller = new AbortController();
const lock = WakeLock.request("screen", { signal: controller.signal });
controller.abort();
return promise_rejects(t, "AbortError", lock);
}, 'Feature-Policy header {"wake-lock" : ["*"]} allows the top-level document.');
async_test(t => {
test_feature_availability(
'new WakeLock("screen")',
'WakeLock.request("screen")',
t,
same_origin_src,
expect_feature_available_default
@ -30,7 +29,7 @@
async_test(t => {
test_feature_availability(
'new WakeLock("screen")',
'WakeLock.request("screen")',
t,
cross_origin_src,
expect_feature_available_default

View file

@ -12,17 +12,16 @@
const cross_origin_src =
"https://{{domains[www]}}:{{ports[https][0]}}" + same_origin_src;
test(t => {
try {
new WakeLock("screen");
} catch (e) {
assert_unreached(e);
}
promise_test(t => {
const controller = new AbortController();
const lock = WakeLock.request("screen", { signal: controller.signal });
controller.abort();
return promise_rejects(t, "AbortError", lock);
}, 'Feature-Policy header wake-lock "self" allows the top-level document.');
async_test(t => {
test_feature_availability(
'new WakeLock("screen")',
'WakeLock.request("screen")',
t,
same_origin_src,
expect_feature_available_default
@ -31,7 +30,7 @@
async_test(t => {
test_feature_availability(
'new WakeLock("screen")',
'WakeLock.request("screen")',
t,
cross_origin_src,
expect_feature_unavailable_default

View file

@ -1,31 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Wake Lock 'onactivechange' Test</title>
<link rel="help" href="https://w3c.github.io/wake-lock/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async t => {
const wakeLock = new WakeLock("screen");
const eventWatcher = new EventWatcher(t, wakeLock, "activechange");
assert_false(wakeLock.active, "the active is false before wake lock is acquired");
const controller = new AbortController();
const signal = controller.signal;
await wakeLock.request({ signal });
let evt1 = await eventWatcher.wait_for("activechange");
assert_true(evt1.isTrusted && !evt1.bubbles && !evt1.cancelable && evt1 instanceof Event, "a simple event is fired");
assert_equals(evt1.type, "activechange", "the event name is 'activechange'");
assert_equals(evt1.target, wakeLock, "event.target is WakeLock.");
assert_true(wakeLock.active, "the active is true when wake lock is acquired");
controller.abort();
let evt2 = await eventWatcher.wait_for("activechange");
assert_true(evt2.isTrusted && !evt2.bubbles && !evt2.cancelable && evt2 instanceof Event, "a simple event is fired");
assert_false(wakeLock.active, "the active is false when wake lock is released");
}, "Test that 'activechange' event is fire and wakeLock.active is valid");
</script>

View file

@ -0,0 +1,98 @@
<!doctype html>
<html>
<head>
<title>Test ScriptProcessorNode</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>
// Arbitrary sample rate
const sampleRate = 48000;
let audit = Audit.createTaskRunner();
audit.define(
{
label: 'test',
description: 'ScriptProcessor with stopped input source'
},
(task, should) => {
// Two channels for testing. Channel 0 is the output of the
// scriptProcessor. Channel 1 is the oscillator so we can compare
// the outputs.
let context = new OfflineAudioContext({
numberOfChannels: 2,
length: sampleRate,
sampleRate: sampleRate
});
let merger = new ChannelMergerNode(
context, {numberOfChannels: context.destination.channelCount});
merger.connect(context.destination);
let src = new OscillatorNode(context);
// Arbitrary buffer size for the ScriptProcessorNode. Don't use 0;
// we need to know the actual size to know the latency of the node
// (easily).
const spnSize = 512;
let spn = context.createScriptProcessor(spnSize, 1, 1);
// Arrange for the ScriptProcessor to add |offset| to the input.
const offset = 1;
spn.onaudioprocess = (event) => {
let input = event.inputBuffer.getChannelData(0);
let output = event.outputBuffer.getChannelData(0);
for (let k = 0; k < output.length; ++k) {
output[k] = input[k] + offset;
}
};
src.connect(spn).connect(merger, 0, 0);
src.connect(merger, 0, 1);
// Start and stop the source. The stop time is fairly arbitrary,
// but use a render quantum boundary for simplicity.
const stopFrame = RENDER_QUANTUM_FRAMES;
src.start(0);
src.stop(stopFrame / context.sampleRate);
context.startRendering()
.then(buffer => {
let ch0 = buffer.getChannelData(0);
let ch1 = buffer.getChannelData(1);
let shifted = ch1.slice(0, stopFrame).map(x => x + offset);
// SPN has a basic latency of 2*|spnSize| fraems, so the
// beginning is silent.
should(
ch0.slice(0, 2 * spnSize - 1),
`ScriptProcessor output[0:${2 * spnSize - 1}]`)
.beConstantValueOf(0);
// For the middle section (after adding latency), the output
// should be the source shifted by |offset|.
should(
ch0.slice(2 * spnSize, 2 * spnSize + stopFrame),
`ScriptProcessor output[${2 * spnSize}:${
2 * spnSize + stopFrame - 1}]`)
.beCloseToArray(shifted, {absoluteThreshold: 0});
// Output should be constant after the source has stopped.
// Include the latency introduced by the node.
should(
ch0.slice(2 * spnSize + stopFrame),
`ScriptProcessor output[${2 * spnSize + stopFrame}:]`)
.beConstantValueOf(offset);
})
.then(() => task.done());
});
audit.run();
</script>
</body>
</html>

View file

@ -309,6 +309,21 @@ function listenToConnected(pc) {
});
}
// Returns a promise that resolves when |pc.connectionState| is in one of the
// wanted states.
function waitForConnectionStateChange(pc, wantedStates) {
return new Promise((resolve) => {
if (wantedStates.includes(pc.connectionState)) {
resolve();
return;
}
pc.addEventListener('connectionstatechange', () => {
if (wantedStates.includes(pc.connectionState))
resolve();
});
});
}
// Resolves when RTP packets have been received.
function listenForSSRCs(t, receiver) {
return new Promise((resolve) => {

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<title>DTLS fingerprint validation</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../RTCPeerConnection-helper.js"></script>
</head>
<body>
<script>
// Tests that an invalid fingerprint leads to a connectionState 'failed'.
promise_test(async t => {
const pc1 = new RTCPeerConnection();
const pc2 = new RTCPeerConnection();
t.add_cleanup(() => pc1.close());
t.add_cleanup(() => pc2.close());
pc1.createDataChannel('datachannel');
coupleIceCandidates(pc1, pc2);
const offer = await pc1.createOffer();
await pc2.setRemoteDescription(offer);
await pc1.setLocalDescription(offer);
const answer = await pc2.createAnswer();
await pc1.setRemoteDescription(new RTCSessionDescription({
type: answer.type,
sdp: answer.sdp.replace(/a=fingerprint:sha-256 .*/g,
'a=fingerprint:sha-256 00:00:00:00:00:00:00:00:00:00:00:00:00:' +
'00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00'),
}));
await pc2.setLocalDescription(answer);
await waitForConnectionStateChange(pc1, ['failed']);
await waitForConnectionStateChange(pc2, ['failed']);
}, 'Connection fails if one side provides a wrong DTLS fingerprint');
</script>
</body>
</html>