mirror of
https://github.com/servo/servo.git
synced 2025-08-24 06:45:33 +01:00
Update web-platform-tests to revision 8a14626934f5748a4ea6210847a02c0d8bbc8560
This commit is contained in:
parent
defc176333
commit
4851e4e2b9
133 changed files with 3076 additions and 304 deletions
|
@ -156,6 +156,45 @@
|
|||
});
|
||||
});
|
||||
|
||||
audit.define(
|
||||
{
|
||||
label: 'test-audiocontextoptions-sampleRate',
|
||||
description:
|
||||
'Test creating contexts with non-default sampleRate values.'
|
||||
},
|
||||
function(task, should) {
|
||||
// A sampleRate of 1 is unlikely to be supported on any browser,
|
||||
// test that this rate is rejected.
|
||||
should(
|
||||
() => {
|
||||
context = new AudioContext({sampleRate: 1})
|
||||
},
|
||||
'context = new AudioContext({sampleRate: 1})')
|
||||
.throw(DOMException);
|
||||
|
||||
// A sampleRate of 1,000,000 is unlikely to be supported on any
|
||||
// browser, test that this rate is also rejected.
|
||||
should(
|
||||
() => {
|
||||
context = new AudioContext({sampleRate: 1000000})
|
||||
},
|
||||
'context = new AudioContext({sampleRate: 1000000})')
|
||||
.throw(DOMException);
|
||||
|
||||
should(
|
||||
() => {
|
||||
context = new AudioContext({sampleRate: 24000})
|
||||
},
|
||||
'context = new AudioContext({sampleRate: 24000})')
|
||||
.notThrow();
|
||||
should(
|
||||
context.sampleRate, 'sampleRate inrange')
|
||||
.beEqualTo(24000);
|
||||
|
||||
context.close();
|
||||
task.done();
|
||||
});
|
||||
|
||||
audit.run();
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue