mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326
This commit is contained in:
parent
462c272380
commit
1f531f66ea
5377 changed files with 174916 additions and 84369 deletions
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
// Run a test function as two test cases.
|
||||
// The first test case test the configuration by passing a given config
|
||||
// to the constructor.
|
||||
// The second test case create an RTCPeerConnection object with default
|
||||
// configuration, then call setConfiguration with the provided config.
|
||||
// The test function is given a constructor function to create
|
||||
// a new instance of RTCPeerConnection with given config,
|
||||
// either directly as constructor parameter or through setConfiguration.
|
||||
function config_test(test_func, desc) {
|
||||
test(() => {
|
||||
test_func(config => new RTCPeerConnection(config));
|
||||
}, `new RTCPeerConnection(config) - ${desc}`);
|
||||
|
||||
test(() => {
|
||||
test_func(config => {
|
||||
const pc = new RTCPeerConnection();
|
||||
assert_idl_attribute(pc, 'setConfiguration');
|
||||
pc.setConfiguration(config);
|
||||
return pc;
|
||||
})
|
||||
}, `setConfiguration(config) - ${desc}`);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue