Skip to content

Commit 4723a14

Browse files
committed
Resync web-platform-tests/webaudio from upstream
https://bugs.webkit.org/show_bug.cgi?id=216700 Reviewed by Sam Weinig. Resync web-platform-tests/webaudio from upstream 175a108. * web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active-expected.txt: Added. * web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html: Added. * web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/resources/not-fully-active-helper.sub.html: Added. * web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/resources/w3c-import.log: Added. * web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/w3c-import.log: * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/extended-audioworkletnode-with-parameters.https-expected.txt: Added. * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/extended-audioworkletnode-with-parameters.https.html: Added. * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/w3c-import.log: * web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt: * web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html: * web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delay-test-expected.txt: Added. * web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delay-test.html: Added. * web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/w3c-import.log: Canonical link: https://commits.webkit.org/229510@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 13ddea1 commit 4723a14

18 files changed

Lines changed: 274 additions & 8 deletions

LayoutTests/imported/w3c/ChangeLog

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
2020-09-18 Chris Dumez <cdumez@apple.com>
2+
3+
Resync web-platform-tests/webaudio from upstream
4+
https://bugs.webkit.org/show_bug.cgi?id=216700
5+
6+
Reviewed by Sam Weinig.
7+
8+
Resync web-platform-tests/webaudio from upstream 175a1086e0061c75d1.
9+
10+
* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active-expected.txt: Added.
11+
* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html: Added.
12+
* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/resources/not-fully-active-helper.sub.html: Added.
13+
* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/resources/w3c-import.log: Added.
14+
* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/w3c-import.log:
15+
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/extended-audioworkletnode-with-parameters.https-expected.txt: Added.
16+
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/extended-audioworkletnode-with-parameters.https.html: Added.
17+
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/w3c-import.log:
18+
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt:
19+
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html:
20+
* web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delay-test-expected.txt: Added.
21+
* web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delay-test.html: Added.
22+
* web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/w3c-import.log:
23+
124
2020-09-18 Youenn Fablet <youenn@apple.com>
225

326
Hash deviceIds in WebProcess instead of UIProcess to allow audio output device IDs in WebProcess
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
FAIL Test that a DelayNode allows a feedback loop of a single rendering quantum Can't find variable: Audiobuffer
2+
FAIL Test that a DelayNode allows a feedback loop of a single rendering quantum assert_equals: Silent audio found instead of a delayed impulse expected 1 but got 0
33

LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/processing-model/delay-time-clamping.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<script>
1010
function doTest() {
1111
let off = new OfflineAudioContext(1, 512, 48000);
12-
let b = new Audiobuffer({sampleRate: off.sampleRate, length: 1});
12+
let b = new AudioBuffer({sampleRate: off.sampleRate, length: 1});
1313
b.getChannelData(0)[0] = 1;
1414
let impulse = new AudioBufferSourceNode(off, {buffer: b});
1515
impulse.start(0);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
PASS removed frame
4+
PASS navigated frame
5+
PASS frame in removed frame
6+
PASS frame in navigated frame
7+
PASS frame in removed remote-site frame
8+
PASS frame in navigated remote-site frame
9+
PASS removed frame in remote-site frame
10+
PASS navigated frame in remote-site frame
11+
PASS frame in removed remote-site frame in remote-site frame
12+
PASS frame in navigated remote-site frame in remote-site frame
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<!doctype html>
2+
<title>Test AudioContext construction when document is not fully active</title>
3+
<script src=/resources/testharness.js></script>
4+
<script src=/resources/testharnessreport.js></script>
5+
<script src="/common/get-host-info.sub.js"></script>
6+
<body></body>
7+
<script>
8+
const dir = location.pathname.replace(/\/[^\/]*$/, '/');
9+
const helper = dir + 'resources/not-fully-active-helper.sub.html?childsrc=';
10+
const remote_helper = get_host_info().HTTP_NOTSAMESITE_ORIGIN + helper;
11+
const blank_url = get_host_info().ORIGIN + '/common/blank.html';
12+
13+
const load_content = (frame, src) => {
14+
if (src == undefined) {
15+
frame.srcdoc = '<html></html>';
16+
} else {
17+
frame.src = src;
18+
}
19+
return new Promise(resolve => frame.onload = () => resolve(frame));
20+
};
21+
const append_iframe = (src) => {
22+
const frame = document.createElement('iframe');
23+
document.body.appendChild(frame);
24+
return load_content(frame, src);
25+
};
26+
const remote_op = (win, op) => {
27+
win.postMessage(op, '*');
28+
return new Promise(resolve => window.onmessage = e => {
29+
if (e.data == 'DONE ' + op) resolve();
30+
});
31+
};
32+
const test_constructor_throws = async (win, deactivate) => {
33+
const {AudioContext, DOMException} = win;
34+
await deactivate();
35+
assert_throws_dom("InvalidStateError", DOMException,
36+
() => new AudioContext());
37+
};
38+
39+
promise_test(async () => {
40+
const frame = await append_iframe();
41+
return test_constructor_throws(frame.contentWindow, () => frame.remove());
42+
}, "removed frame");
43+
promise_test(async () => {
44+
const frame = await append_iframe();
45+
return test_constructor_throws(frame.contentWindow,
46+
() => load_content(frame));
47+
}, "navigated frame");
48+
promise_test(async () => {
49+
const frame = await append_iframe(helper + blank_url);
50+
const inner = frame.contentWindow.frames[0];
51+
return test_constructor_throws(inner, () => frame.remove());
52+
}, "frame in removed frame");
53+
promise_test(async () => {
54+
const frame = await append_iframe(helper + blank_url);
55+
const inner = frame.contentWindow.frames[0];
56+
return test_constructor_throws(inner, () => load_content(frame));
57+
}, "frame in navigated frame");
58+
promise_test(async () => {
59+
const frame = await append_iframe(remote_helper + blank_url);
60+
const inner = frame.contentWindow.frames[0];
61+
return test_constructor_throws(inner, () => frame.remove());
62+
}, "frame in removed remote-site frame");
63+
promise_test(async () => {
64+
const frame = await append_iframe(remote_helper + blank_url);
65+
const inner = frame.contentWindow.frames[0];
66+
return test_constructor_throws(inner, () => load_content(frame));
67+
}, "frame in navigated remote-site frame");
68+
promise_test(async () => {
69+
const outer = (await append_iframe(remote_helper + blank_url)).contentWindow;
70+
const inner = outer.frames[0];
71+
return test_constructor_throws(inner,
72+
() => remote_op(outer, 'REMOVE FRAME'));
73+
}, "removed frame in remote-site frame");
74+
promise_test(async () => {
75+
const outer = (await append_iframe(remote_helper + blank_url)).contentWindow;
76+
const inner = outer.frames[0];
77+
return test_constructor_throws(inner,
78+
() => remote_op(outer, 'NAVIGATE FRAME'));
79+
}, "navigated frame in remote-site frame");
80+
promise_test(async () => {
81+
const url = remote_helper + helper + blank_url;
82+
const outer = (await append_iframe(url)).contentWindow;
83+
const inner = outer.frames[0].frames[0];
84+
return test_constructor_throws(inner,
85+
() => remote_op(outer, 'REMOVE FRAME'));
86+
}, "frame in removed remote-site frame in remote-site frame");
87+
promise_test(async () => {
88+
const url = remote_helper + helper + blank_url;
89+
const outer = (await append_iframe(url)).contentWindow;
90+
const inner = outer.frames[0].frames[0];
91+
return test_constructor_throws(inner,
92+
() => remote_op(outer, 'NAVIGATE FRAME'));
93+
}, "frame in navigated remote-site frame in remote-site frame");
94+
</script>

LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume-expected.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ PASS offlineContext.resume() rejected correctly with InvalidStateError: Cannot
2626
PASS < [test-after-close] All assertions passed. (total 4 assertions)
2727
PASS > [resume-running-context] Test resuming a running context
2828
PASS Create online context did not throw an exception.
29-
FAIL X context.state is not equal to running. Got suspended. assert_true: expected true got false
29+
PASS context.state is equal to suspended.
3030
PASS context.resume resolved correctly.
3131
PASS context.state after resume is equal to running.
32-
FAIL < [resume-running-context] 1 out of 4 assertions were failed. assert_true: expected true got false
33-
FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 4 tasks were failed. assert_true: expected true got false
32+
PASS < [resume-running-context] All assertions passed. (total 4 assertions)
33+
PASS # AUDIT TASK RUNNER FINISHED: 4 tasks ran successfully.
3434

LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
should(() => context = new AudioContext(), 'Create online context')
130130
.notThrow();
131131

132-
should(context.state, 'context.state').beEqualTo('running');
132+
should(context.state, 'context.state').beEqualTo('suspended');
133133
should(context.resume(), 'context.resume')
134134
.beResolved()
135135
.then(() => {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!doctype html>
2+
<html>
3+
<iframe src="{{GET[childsrc]}}">
4+
</iframe>
5+
<script>
6+
const frame = document.getElementsByTagName('iframe')[0];
7+
const reply = op => window.parent.postMessage('DONE ' + op, '*');
8+
9+
window.onmessage = e => {
10+
switch (e.data) {
11+
case 'REMOVE FRAME':
12+
frame.remove();
13+
reply(e.data);
14+
break;
15+
case 'NAVIGATE FRAME':
16+
frame.srcdoc = '<html></html>';
17+
frame.onload = () => reply(e.data);
18+
break;
19+
}
20+
};
21+
</script>
22+
</html>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
The tests in this directory were imported from the W3C repository.
2+
Do NOT modify these tests directly in WebKit.
3+
Instead, create a pull request on the WPT github:
4+
https://github.com/web-platform-tests/wpt
5+
6+
Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
7+
8+
Do NOT modify or remove this file.
9+
10+
------------------------------------------------------------------------
11+
Properties requiring vendor prefixes:
12+
None
13+
Property values requiring vendor prefixes:
14+
None
15+
------------------------------------------------------------------------
16+
List of files:
17+
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/resources/not-fully-active-helper.sub.html

LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/w3c-import.log

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ None
1616
List of files:
1717
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-detached-execution-context.tentative.html
1818
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-getoutputtimestamp.html
19+
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html
1920
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume.html
2021
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html
2122
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/constructor-allowed-to-start.html

0 commit comments

Comments
 (0)