Update web-platform-tests to revision d5be80a86d4f938250c075ac12414ad47516969c

This commit is contained in:
WPT Sync Bot 2018-11-08 21:03:14 -05:00
parent bb2c5e387f
commit 463b6d3b60
32 changed files with 454 additions and 43 deletions

View file

@ -133225,6 +133225,18 @@
{} {}
] ]
], ],
"css/css-scoping/slotted-placeholder.html": [
[
"/css/css-scoping/slotted-placeholder.html",
[
[
"/css/css-scoping/slotted-placeholder-ref.html",
"=="
]
],
{}
]
],
"css/css-scoping/slotted-specificity.html": [ "css/css-scoping/slotted-specificity.html": [
[ [
"/css/css-scoping/slotted-specificity.html", "/css/css-scoping/slotted-specificity.html",
@ -264959,6 +264971,11 @@
{} {}
] ]
], ],
"css/css-scoping/slotted-placeholder-ref.html": [
[
{}
]
],
"css/css-scoping/slotted-with-pseudo-element-ref.html": [ "css/css-scoping/slotted-with-pseudo-element-ref.html": [
[ [
{} {}
@ -316554,11 +316571,21 @@
{} {}
] ]
], ],
"webaudio/js/worklet-recorder.js": [
[
{}
]
],
"webaudio/refresh_idl.rb": [ "webaudio/refresh_idl.rb": [
[ [
{} {}
] ]
], ],
"webaudio/resources/4ch-440.wav": [
[
{}
]
],
"webaudio/resources/audio-param.js": [ "webaudio/resources/audio-param.js": [
[ [
{} {}
@ -335024,6 +335051,12 @@
{} {}
] ]
], ],
"css/CSS2/floats/computed-float-position-absolute.html": [
[
"/css/CSS2/floats/computed-float-position-absolute.html",
{}
]
],
"css/CSS2/floats/zero-space-between-floats-001.html": [ "css/CSS2/floats/zero-space-between-floats-001.html": [
[ [
"/css/CSS2/floats/zero-space-between-floats-001.html", "/css/CSS2/floats/zero-space-between-floats-001.html",
@ -407804,12 +407837,24 @@
{} {}
] ]
], ],
"webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/cors-check.https.html": [
[
"/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/cors-check.https.html",
{}
]
],
"webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html": [ "webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html": [
[ [
"/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html", "/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html",
{} {}
] ]
], ],
"webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/no-cors.https.html": [
[
"/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/no-cors.https.html",
{}
]
],
"webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html": [ "webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html": [
[ [
"/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html", "/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html",
@ -490239,6 +490284,10 @@
"59843ae54b64f6ce4f7e616d4be491c911ea84cf", "59843ae54b64f6ce4f7e616d4be491c911ea84cf",
"support" "support"
], ],
"css/CSS2/floats/computed-float-position-absolute.html": [
"ad9220b3a06085c458f7100c896100fb32f562e8",
"testharness"
],
"css/CSS2/floats/float-nowrap-1-notref.html": [ "css/CSS2/floats/float-nowrap-1-notref.html": [
"540c8048af61a2c7804d99ff14c3a2bf1f87e6ad", "540c8048af61a2c7804d99ff14c3a2bf1f87e6ad",
"support" "support"
@ -559656,9 +559705,17 @@
"testharness" "testharness"
], ],
"css/css-scoping/slotted-parsing.html": [ "css/css-scoping/slotted-parsing.html": [
"308ff430449e4569abea713814f336eaa9e0e98a", "6888693bbf40932d62a19b535adba22adbd43b19",
"testharness" "testharness"
], ],
"css/css-scoping/slotted-placeholder-ref.html": [
"f99c0385d061766b49d55e7703bf596fe69d6ec2",
"support"
],
"css/css-scoping/slotted-placeholder.html": [
"a3d607afb8e78e8c340b2d4c6ec86a5f4fc12190",
"reftest"
],
"css/css-scoping/slotted-slot.html": [ "css/css-scoping/slotted-slot.html": [
"1f4aa75ae60ec5ee5f6863aace8678584e4e6934", "1f4aa75ae60ec5ee5f6863aace8678584e4e6934",
"testharness" "testharness"
@ -568152,7 +568209,7 @@
"testharness" "testharness"
], ],
"css/css-transforms/parsing/scale-parsing-valid.html": [ "css/css-transforms/parsing/scale-parsing-valid.html": [
"89f79e2e85d35f1306577acfede9585b703a6c8f", "b9afbc848a3b5ff3033d070b4f080245e0d822c5",
"testharness" "testharness"
], ],
"css/css-transforms/parsing/transform-box-invalid.html": [ "css/css-transforms/parsing/transform-box-invalid.html": [
@ -585472,7 +585529,7 @@
"testharness" "testharness"
], ],
"css/filter-effects/META.yml": [ "css/filter-effects/META.yml": [
"0098e6065a751201bceea961363181cb7180cbfa", "930b762b01a1a75e5b5ab4fb18dedd5939618fe1",
"support" "support"
], ],
"css/filter-effects/css-filters-animation-blur-ref.html": [ "css/filter-effects/css-filters-animation-blur-ref.html": [
@ -619696,7 +619753,7 @@
"testharness" "testharness"
], ],
"html/semantics/forms/the-input-element/type-change-state.html": [ "html/semantics/forms/the-input-element/type-change-state.html": [
"34cfd438cb6a68dc7b7e7204f8531b9553b689ad", "de068f17a735c09d9ed2727bbab45b102f3ad23e",
"testharness" "testharness"
], ],
"html/semantics/forms/the-input-element/url.html": [ "html/semantics/forms/the-input-element/url.html": [
@ -637728,7 +637785,7 @@
"testharness" "testharness"
], ],
"payment-request/META.yml": [ "payment-request/META.yml": [
"e608c0ee279fcb7987f9167f8223f3fedce66c33", "16738814437ab69e625ef79a42bb322152a5969f",
"support" "support"
], ],
"payment-request/MerchantValidationEvent/complete-method.https.html": [ "payment-request/MerchantValidationEvent/complete-method.https.html": [
@ -647828,7 +647885,7 @@
"support" "support"
], ],
"resources/chromium/webxr-test.js": [ "resources/chromium/webxr-test.js": [
"4b7707b49a556879137ac19b59bb5c454307fb56", "c6c21a6fed6c05a1981b9241d233a1b501fdf3ab",
"support" "support"
], ],
"resources/chromium/webxr-test.js.headers": [ "resources/chromium/webxr-test.js.headers": [
@ -662916,7 +662973,7 @@
"support" "support"
], ],
"tools/wpt/requirements.txt": [ "tools/wpt/requirements.txt": [
"c20f36f24647f26ad00e4508afaa798e1b6be0b1", "5610e90053f6bcab3d699fd2132aba5274818697",
"support" "support"
], ],
"tools/wpt/run.py": [ "tools/wpt/run.py": [
@ -663044,7 +663101,7 @@
"support" "support"
], ],
"tools/wptrunner/requirements_sauce.txt": [ "tools/wptrunner/requirements_sauce.txt": [
"8ba53dafaa587dccd1f3dd3df23c5c62b78d22e6", "666db37ac1a4822250ee1dcdbf3c23e672a154e3",
"support" "support"
], ],
"tools/wptrunner/requirements_servo.txt": [ "tools/wptrunner/requirements_servo.txt": [
@ -666432,7 +666489,7 @@
"support" "support"
], ],
"web-animations/animation-model/animation-types/property-types.js": [ "web-animations/animation-model/animation-types/property-types.js": [
"e13cac067c489e4dab253d2f4aa5c793199e1704", "a71783b99e14322639251f5b58ede826696a7c3a",
"support" "support"
], ],
"web-animations/animation-model/animation-types/visibility.html": [ "web-animations/animation-model/animation-types/visibility.html": [
@ -667003,10 +667060,18 @@
"fbbfc8e00444dce1440fdbe8e28e11c5b064ce3d", "fbbfc8e00444dce1440fdbe8e28e11c5b064ce3d",
"support" "support"
], ],
"webaudio/js/worklet-recorder.js": [
"3bf3bc23b20764ba54d5ff125699df91fffe741a",
"support"
],
"webaudio/refresh_idl.rb": [ "webaudio/refresh_idl.rb": [
"a07847535ad7cae63b06c3d30333819cfef08b77", "a07847535ad7cae63b06c3d30333819cfef08b77",
"support" "support"
], ],
"webaudio/resources/4ch-440.wav": [
"85dc1ea9044e28eeeac6176bae61285c25ebf711",
"support"
],
"webaudio/resources/audio-param.js": [ "webaudio/resources/audio-param.js": [
"bc33fe8a21f5e7fcbe4e3d2d2a4c4c3b840d3072", "bc33fe8a21f5e7fcbe4e3d2d2a4c4c3b840d3072",
"support" "support"
@ -667336,7 +667401,7 @@
"testharness" "testharness"
], ],
"webaudio/the-audio-api/the-audioparam-interface/event-insertion.html": [ "webaudio/the-audio-api/the-audioparam-interface/event-insertion.html": [
"688d0478235e202859c7939eef65ad383f7a4f36", "07a54c3bbf68a7af3d651140df5ddcc99ac0f823",
"testharness" "testharness"
], ],
"webaudio/the-audio-api/the-audioparam-interface/k-rate-audioworklet.https.html": [ "webaudio/the-audio-api/the-audioparam-interface/k-rate-audioworklet.https.html": [
@ -667779,10 +667844,18 @@
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"support" "support"
], ],
"webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/cors-check.https.html": [
"a2fa8040b2c6100f7ec22f0f133525808403ce01",
"testharness"
],
"webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html": [ "webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html": [
"2c1162d47b973937c826caba0c740f58970defcc", "2c1162d47b973937c826caba0c740f58970defcc",
"testharness" "testharness"
], ],
"webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/no-cors.https.html": [
"38324a9f67a67f50f134fb78af43117e2ec9b8c8",
"testharness"
],
"webaudio/the-audio-api/the-mediastreamaudiodestinationnode-interface/.gitkeep": [ "webaudio/the-audio-api/the-mediastreamaudiodestinationnode-interface/.gitkeep": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"support" "support"
@ -668144,7 +668217,7 @@
"wdspec" "wdspec"
], ],
"webdriver/tests/element_click/interactability.py": [ "webdriver/tests/element_click/interactability.py": [
"702468599f3a379aa184821c84911531ba06ad31", "7463d493e3d8bd2b56c4b01ff5c9fd758c6fff03",
"wdspec" "wdspec"
], ],
"webdriver/tests/element_click/navigate.py": [ "webdriver/tests/element_click/navigate.py": [

View file

@ -0,0 +1,4 @@
[computed-float-position-absolute.html]
[The computed value of float with absolute positioning when there is no box should be "none"]
expected: FAIL

View file

@ -509,7 +509,7 @@
[single-byte-decoder.html?XMLHttpRequest] [single-byte-decoder.html?XMLHttpRequest]
expected: TIMEOUT expected: CRASH
[ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)] [ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)]
expected: FAIL expected: FAIL

View file

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

View file

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

View file

@ -5,5 +5,5 @@
expected: NOTRUN expected: NOTRUN
[calling play() on a sufficiently long video should trigger timeupdate event] [calling play() on a sufficiently long video should trigger timeupdate event]
expected: FAIL expected: NOTRUN

View file

@ -13,3 +13,6 @@
[picture: source (max-width:500px) valid image, img valid image, resize to narrow] [picture: source (max-width:500px) valid image, img valid image, resize to narrow]
expected: TIMEOUT expected: TIMEOUT
[picture: same URL in source (max-width:500px) and img, resize to narrow]
expected: FAIL

View file

@ -1,4 +1,5 @@
[parse-a-sizes-attribute-standards-mode.html] [parse-a-sizes-attribute-standards-mode.html]
expected: TIMEOUT
[<img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (standards mode)] [<img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (standards mode)]
expected: FAIL expected: FAIL

View file

@ -0,0 +1,7 @@
[toggleEvent.html]
[Calling open twice on 'details' fires only one toggle event]
expected: FAIL
[Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element]
expected: FAIL

View file

@ -1,4 +1,4 @@
[quirks.html] [limited-quirks.html]
[top: -\\31 .5] [top: -\\31 .5]
expected: FAIL expected: FAIL

View file

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

View file

@ -0,0 +1,4 @@
[cors-check.https.html]
[\n Test if MediaElementAudioSourceNode works for cross-origin redirects with\n "cors" request mode.\n ]
expected: FAIL

View file

@ -0,0 +1,4 @@
[no-cors.https.html]
[\n Test if MediaElementAudioSourceNode works for cross-origin redirects with\n "no-cors" request mode.\n ]
expected: FAIL

View file

@ -1,6 +1,5 @@
[005.html] [005.html]
type: testharness type: testharness
expected: ERROR
[dedicated worker in shared worker in dedicated worker] [dedicated worker in shared worker in dedicated worker]
expected: FAIL expected: FAIL

View file

@ -0,0 +1,28 @@
<!doctype html>
<link rel="help" href="https://drafts.csswg.org/css2/visuren.html" />
<title>The computed value of float with absolute positioning when there is no box should be "none"</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
div[id] {
position: absolute;
float: left;
}
</style>
<div id="test1" style="display: none"></div>
<div id="test2" style="display: contents"></div>
<div style="display: none"><div id="test3"></div></div>
<script>
promise_test(
t => {
return new Promise(test => addEventListener('load', e=>test()))
.then(test => assert_equals(getComputedStyle(test1)['float'], "none", "[display:none] Invalid gCS(test1)['float'];"))
.then(test => assert_equals(getComputedStyle(test2)['float'], "none", "[display:contents] Invalid gCS(test2)['float'];"))
.then(test => assert_equals(getComputedStyle(test3)['float'], "none", "[in a display:none] Invalid gCS(test3)['float'];"))
}
);
</script>

View file

@ -49,6 +49,8 @@
// Allow tree-abiding pseudo elements after ::slotted // Allow tree-abiding pseudo elements after ::slotted
test_valid_selector("::slotted(*)::before"); test_valid_selector("::slotted(*)::before");
test_valid_selector("::slotted(*)::after"); test_valid_selector("::slotted(*)::after");
test_valid_selector("::slotted(*)::placeholder");
test_valid_selector("::slotted(*)::marker");
// Other pseudo elements not valid after ::slotted // Other pseudo elements not valid after ::slotted
test_invalid_selector("::slotted(*)::first-line"); test_invalid_selector("::slotted(*)::first-line");

View file

@ -0,0 +1,6 @@
<!doctype html>
<style>
::placeholder { color: green }
</style>
<input placeholder="I should be green">
<textarea placeholder="I should be green"></textarea>

View file

@ -0,0 +1,19 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Scoping Test: ::slotted() allows ::placeholder</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#slotted-pseudo">
<link rel="match" href="slotted-placeholder-ref.html">
<div id="host">
<input placeholder="I should be green">
<textarea placeholder="I should be green"></textarea>
</div>
<script>
host.attachShadow({ mode: "open" }).innerHTML = `
<style>
::slotted(*)::placeholder { color: green }
</style>
<slot></slot>
`;
</script>

View file

@ -16,8 +16,10 @@ test_valid_value("scale", "none");
test_valid_value("scale", "1"); test_valid_value("scale", "1");
test_valid_value("scale", "100 100", "100");
test_valid_value("scale", "100 200"); test_valid_value("scale", "100 200");
test_valid_value("scale", "100 200 1");
test_valid_value("scale", "100 200 300"); test_valid_value("scale", "100 200 300");
</script> </script>
</body> </body>

View file

@ -3,3 +3,4 @@ suggested_reviewers:
- svgeesus - svgeesus
- grorg - grorg
- dirkschulze - dirkschulze
- chrishtr

View file

@ -36,6 +36,17 @@
const selectionEnd = 5; const selectionEnd = 5;
const selectionDirection = "backward"; const selectionDirection = "backward";
// Obtain selectionDirection after setting it to "none".
// Some platforms don't support "none" direction, and "forward" is returned
// in such platforms.
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#set-the-selection-direction
function testNoneDirection() {
const input = document.createElement("input");
input.selectionDirection = "none";
return input.selectionDirection;
}
const noneDirectionResult = testNoneDirection();
for (var i = 0; i < types.length; i++) { for (var i = 0; i < types.length; i++) {
for (var j = 0; j < types.length; j++) { for (var j = 0; j < types.length; j++) {
if (types[i] != types[j]) { if (types[i] != types[j]) {
@ -92,7 +103,8 @@
} else { } else {
assert_equals(input.selectionStart, 0, "selectionStart should be 0"); assert_equals(input.selectionStart, 0, "selectionStart should be 0");
assert_equals(input.selectionEnd, 0, "selectionEnd should be 0"); assert_equals(input.selectionEnd, 0, "selectionEnd should be 0");
assert_equals(input.selectionDirection, "none", "selectionDirection should be 'none'"); assert_equals(input.selectionDirection, noneDirectionResult,
`selectionDirection should be '{noneDirectionResult}'`);
} }
} }
} }

View file

@ -7,3 +7,4 @@ suggested_reviewers:
- mnoorenberghe - mnoorenberghe
- romandev - romandev
- edenchuang - edenchuang
- aestes

View file

@ -146,6 +146,10 @@ class MockRuntime {
} else { } else {
this.displayInfo_ = this.getNonImmersiveDisplayInfo(); this.displayInfo_ = this.getNonImmersiveDisplayInfo();
} }
if (fakeDeviceInit.supportsEnvironmentIntegration) {
this.displayInfo_.capabilities.canProvideEnvironmentIntegration = true;
}
} }
// Test methods. // Test methods.
@ -323,6 +327,12 @@ class MockRuntime {
}); });
} }
getEnvironmentIntegrationProvider(environmentProviderRequest) {
let environmentProviderBinding = new mojo.AssociatedBinding(
device.mojom.XREnvironmentIntegrationProvider, this,
environmentProviderRequest);
}
updateSessionGeometry(frame_size, display_rotation) { updateSessionGeometry(frame_size, display_rotation) {
// This function must exist to ensure that calls to it do not crash, but we // This function must exist to ensure that calls to it do not crash, but we
// do not have any use for this data at present. // do not have any use for this data at present.
@ -352,21 +362,12 @@ class MockRuntime {
let dataProviderBinding = new mojo.Binding( let dataProviderBinding = new mojo.Binding(
device.mojom.XRFrameDataProvider, this, dataProviderRequest); device.mojom.XRFrameDataProvider, this, dataProviderRequest);
let environmentProviderPtr =
new device.mojom.XREnvironmentIntegrationProviderPtr();
let environmentProviderRequest =
mojo.makeRequest(environmentProviderPtr);
let environmentProviderBinding = new mojo.Binding(
device.mojom.XREnvironmentIntegrationProvider, this,
environmentProviderRequest);
let clientRequest = mojo.makeRequest(this.sessionClient_); let clientRequest = mojo.makeRequest(this.sessionClient_);
return Promise.resolve({ return Promise.resolve({
session: { session: {
submitFrameSink: submit_frame_sink, submitFrameSink: submit_frame_sink,
dataProvider: dataProviderPtr, dataProvider: dataProviderPtr,
environmentProvider: environmentProviderPtr,
clientRequest: clientRequest, clientRequest: clientRequest,
displayInfo: this.displayInfo_ displayInfo: this.displayInfo_
} }

View file

@ -1 +1 @@
requests==2.20.0 requests==2.20.1

View file

@ -1,3 +1,3 @@
mozprocess == 0.26 mozprocess == 0.26
selenium==3.141.0 selenium==3.141.0
requests==2.20.0 requests==2.20.1

View file

@ -1976,7 +1976,7 @@ const scaleListType = {
1000); 1000);
testAnimationSamples(animation, idlName, testAnimationSamples(animation, idlName,
[{ time: 500, expected: '4 4' }]); [{ time: 500, expected: '4' }]);
}, `${property} with one unspecified value`); }, `${property} with one unspecified value`);
test(t => { test(t => {
@ -2012,8 +2012,8 @@ const scaleListType = {
composite: 'add' }); composite: 'add' });
testAnimationSamples(animation, idlName, testAnimationSamples(animation, idlName,
[{ time: 0, expected: '-6 -6' }, [{ time: 0, expected: '-6' },
{ time: 1000, expected: '10 10' }]); { time: 1000, expected: '10' }]);
}, `${property} with one unspecified value`); }, `${property} with one unspecified value`);
test(t => { test(t => {
@ -2052,8 +2052,8 @@ const scaleListType = {
composite: 'accumulate' }); composite: 'accumulate' });
testAnimationSamples(animation, idlName, testAnimationSamples(animation, idlName,
[{ time: 0, expected: '-2 -2' }, [{ time: 0, expected: '-2' },
{ time: 1000, expected: '6 6' }]); { time: 1000, expected: '6' }]);
}, `${property} with one unspecified value`); }, `${property} with one unspecified value`);
test(t => { test(t => {

View file

@ -0,0 +1,54 @@
/**
* @class RecorderProcessor
* @extends AudioWorkletProcessor
*
* A simple recorder AudioWorkletProcessor. Returns the recorded buffer to the
* node when recording is finished.
*/
class RecorderProcessor extends AudioWorkletProcessor {
/**
* @param {*} options
* @param {number} options.duration A duration to record in seconds.
* @param {number} options.channelCount A channel count to record.
*/
constructor(options) {
super();
this._createdAt = currentTime;
this._elapsed = 0;
this._recordDuration = options.duration || 1;
this._recordChannelCount = options.channelCount || 1;
this._recordBufferLength = sampleRate * this._recordDuration;
this._recordBuffer = [];
for (let i = 0; i < this._recordChannelCount; ++i) {
this._recordBuffer[i] = new Float32Array(this._recordBufferLength);
}
}
process(inputs, outputs) {
if (this._recordBufferLength <= currentFrame) {
this.port.postMessage({
type: 'recordfinished',
recordBuffer: this._recordBuffer
});
return false;
}
// Records the incoming data from |inputs| and also bypasses the data to
// |outputs|.
const input = inputs[0];
const output = outputs[0];
for (let channel = 0; channel < input.length; ++channel) {
const inputChannel = input[channel];
const outputChannel = output[channel];
outputChannel.set(inputChannel);
const buffer = this._recordBuffer[channel];
const capacity = buffer.length - currentFrame;
buffer.set(inputChannel.slice(0, capacity), currentFrame);
}
return true;
}
}
registerProcessor('recorder-processor', RecorderProcessor);

View file

@ -61,6 +61,13 @@
extraArgs: RENDER_QUANTUM_FRAMES / context.sampleRate, extraArgs: RENDER_QUANTUM_FRAMES / context.sampleRate,
outputTestFrame: 4 * RENDER_QUANTUM_FRAMES, outputTestFrame: 4 * RENDER_QUANTUM_FRAMES,
expectedOutputValue: 4 expectedOutputValue: 4
},
{
event: 'setValueAtTime',
frame: 5 * RENDER_QUANTUM_FRAMES - 1,
values: [99, 1, 5],
outputTestFrame: 5 * RENDER_QUANTUM_FRAMES,
expectedOutputValue: 5
} }
]; ];

View file

@ -0,0 +1,74 @@
<!DOCTYPE html>
<html>
<head>
<title>
Test if MediaElementAudioSourceNode works for cross-origin redirects with
"cors" request mode.
</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/webaudio/resources/audit.js"></script>
<script src="/common/get-host-info.sub.js"></script>
</head>
<body>
<script id="layout-test-code">
const audit = Audit.createTaskRunner();
const context = new AudioContext();
context.suspend();
const host_info = get_host_info();
const audioElement = document.createElement('audio');
audioElement.loop = true;
audioElement.crossOrigin = 'anonymous';
const wav =
host_info.HTTPS_ORIGIN + '/webaudio/resources/4ch-440.wav?' +
'pipe=header(access-control-allow-origin,*)';
audioElement.src =
host_info.HTTPS_REMOTE_ORIGIN +
'/fetch/api/resources/redirect.py?location=' +
encodeURIComponent(wav);
let source;
let workletRecorder;
audit.define(
{label: 'setting-up-graph'},
(task, should) => {
source = new MediaElementAudioSourceNode(context, {
mediaElement: audioElement
});
workletRecorder = new AudioWorkletNode(
context, 'recorder-processor', {channelCount: 4});
source.connect(workletRecorder).connect(context.destination);
task.done();
});
// The recorded data from MESN must be non-zero. The source file contains
// 4 channels of sine wave.
audit.define(
{label: 'start-playback-and-capture'},
(task, should) => {
workletRecorder.port.onmessage = (event) => {
if (event.data.type === 'recordfinished') {
for (let i = 0; i < event.data.recordBuffer.length; ++i) {
const channelData = event.data.recordBuffer[i];
should(channelData, `Recorded channel #${i}`)
.notBeConstantValueOf(0);
}
}
task.done();
};
context.resume();
audioElement.play();
});
Promise.all([
context.audioWorklet.addModule('/webaudio/js/worklet-recorder.js')
]).then(() => {
audit.run();
});
</script>
</body>
</html>

View file

@ -0,0 +1,73 @@
<!DOCTYPE html>
<html>
<head>
<title>
Test if MediaElementAudioSourceNode works for cross-origin redirects with
"no-cors" request mode.
</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/webaudio/resources/audit.js"></script>
<script src="/common/get-host-info.sub.js"></script>
</head>
<body>
<script id="layout-test-code">
const audit = Audit.createTaskRunner();
const context = new AudioContext();
context.suspend();
const host_info = get_host_info();
const audioElement = document.createElement('audio');
audioElement.loop = true;
const wav =
host_info.HTTPS_ORIGIN + '/webaudio/resources/4ch-440.wav?' +
'pipe=header(access-control-allow-origin,*)';
audioElement.src =
host_info.HTTPS_REMOTE_ORIGIN +
'/fetch/api/resources/redirect.py?location=' +
encodeURIComponent(wav);
let source;
let workletRecorder;
audit.define(
{label: 'setting-up-graph'},
(task, should) => {
source = new MediaElementAudioSourceNode(context, {
mediaElement: audioElement
});
workletRecorder = new AudioWorkletNode(
context, 'recorder-processor', {channelCount: 4});
source.connect(workletRecorder).connect(context.destination);
task.done();
});
// The recorded data from MESN must be non-zero. The source file contains
// 4 channels of sine wave.
audit.define(
{label: 'start-playback-and-capture'},
(task, should) => {
workletRecorder.port.onmessage = (event) => {
if (event.data.type === 'recordfinished') {
for (let i = 0; i < event.data.recordBuffer.length; ++i) {
const channelData = event.data.recordBuffer[i];
should(channelData, `Recorded channel #${i}`)
.beConstantValueOf(0);
}
}
task.done();
};
context.resume();
audioElement.play();
});
Promise.all([
context.audioWorklet.addModule('/webaudio/js/worklet-recorder.js')
]).then(() => {
audit.run();
});
</script>
</body>
</html>

View file

@ -57,10 +57,17 @@ def test_element_not_interactable_css_transform(session, transform):
def test_element_not_interactable_out_of_view(session): def test_element_not_interactable_out_of_view(session):
session.url = inline(""" session.url = inline("""
<div style="width: 500px; height: 100px; <style>
position: absolute; left: 0px; top: -150px; background-color: blue;"> input {
</div>""") position: absolute;
element = session.find.css("div", all=False) margin-top: -100vh;
background: red;
}
</style>
<input>
""")
element = session.find.css("input", all=False)
response = element_click(session, element) response = element_click(session, element)
assert_error(response, "element not interactable") assert_error(response, "element not interactable")
@ -76,9 +83,20 @@ def test_zero_sized_element(session, tag_name):
def test_element_intercepted(session): def test_element_intercepted(session):
session.url = inline(""" session.url = inline("""
<input type=button value=Roger style="position: absolute; left: 10px; top: 10px"> <style>
<div style="position: absolute; height: 100px; width: 100px; background: rgba(255,0,0,.5); left: 10px; top: 5px"></div>""") div {
position: absolute;
height: 100vh;
width: 100vh;
background: blue;
top: 0;
left: 0;
}
</style>
<input type=button value=Roger>
<div></div>
""")
element = session.find.css("input", all=False) element = session.find.css("input", all=False)
response = element_click(session, element) response = element_click(session, element)
assert_error(response, "element click intercepted") assert_error(response, "element click intercepted")
@ -86,7 +104,6 @@ def test_element_intercepted(session):
def test_element_intercepted_no_pointer_events(session): def test_element_intercepted_no_pointer_events(session):
session.url = inline("""<input type=button value=Roger style="pointer-events: none">""") session.url = inline("""<input type=button value=Roger style="pointer-events: none">""")
element = session.find.css("input", all=False) element = session.find.css("input", all=False)
response = element_click(session, element) response = element_click(session, element)
assert_error(response, "element click intercepted") assert_error(response, "element click intercepted")
@ -94,11 +111,21 @@ def test_element_intercepted_no_pointer_events(session):
def test_element_not_visible_overflow_hidden(session): def test_element_not_visible_overflow_hidden(session):
session.url = inline(""" session.url = inline("""
<div style="position: absolute; height: 50px; width: 100px; background: rgba(255,0,0,.5); left: 10px; top: 50px; overflow: hidden"> <style>
ABCDEFGHIJKLMNOPQRSTUVWXYZ div {
<input type=text value=Federer style="position: absolute; top: 50px; left: 10px;"> overflow: hidden;
</div>""") height: 50px;
background: green;
}
input {
margin-top: 100px;
background: red;
}
</style>
<div><input></div>
""")
element = session.find.css("input", all=False) element = session.find.css("input", all=False)
response = element_click(session, element) response = element_click(session, element)
assert_error(response, "element not interactable") assert_error(response, "element not interactable")