node-datachannel 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-mac-m1.yml +7 -6
- package/.github/workflows/build-mac-x64.yml +5 -5
- package/.github/workflows/build-win.yml +3 -3
- package/.gitmodules +3 -0
- package/CMakeLists.txt +2 -2
- package/README.md +33 -31
- package/examples/client-server/client-benchmark.js +7 -9
- package/examples/client-server/client-periodic.js +7 -9
- package/examples/client-server/client.js +7 -9
- package/examples/client-server/package-lock.json +0 -27
- package/examples/client-server/package.json +0 -1
- package/examples/client-server/signaling-server.js +21 -10
- package/examples/electron-demo/README.md +1 -1
- package/examples/websocket/websocket-client.js +20 -0
- package/examples/websocket/websocket-server.js +22 -0
- package/lib/index.cjs +52 -9
- package/lib/index.js +22 -15
- package/lib/node-datachannel.js +7 -0
- package/lib/websocket-server.js +34 -0
- package/package.json +4 -4
- package/polyfill/Events.js +5 -3
- package/polyfill/Exception.js +23 -0
- package/polyfill/README.md +3 -3
- package/polyfill/RTCDataChannel.js +19 -11
- package/polyfill/RTCPeerConnection.js +148 -41
- package/polyfill/index.cjs +252 -59
- package/src/peer-connection-wrapper.cpp +11 -3
- package/src/web-socket-server-wrapper.cpp +23 -23
- package/src/web-socket-server-wrapper.h +8 -6
- package/src/web-socket-wrapper.cpp +7 -1
- package/test/connectivity.js +1 -23
- package/test/wpt-tests/README.md +46 -0
- package/test/wpt-tests/chrome-failed-tests.js +42 -0
- package/test/wpt-tests/index.js +96 -0
- package/test/wpt-tests/last-test-results.md +205 -0
- package/test/wpt-tests/package-lock.json +1712 -0
- package/test/wpt-tests/package.json +19 -0
- package/test/wpt-tests/wpt-test-list.js +137 -0
- package/test/wpt-tests/wpt.js +131 -0
- package/test/wpt.js +0 -50
|
@@ -16,13 +16,11 @@
|
|
|
16
16
|
class WebSocketServerWrapper : public Napi::ObjectWrap<WebSocketServerWrapper>
|
|
17
17
|
{
|
|
18
18
|
public:
|
|
19
|
-
static Napi::FunctionReference constructor;
|
|
20
19
|
static Napi::Object Init(Napi::Env env, Napi::Object exports);
|
|
21
20
|
WebSocketServerWrapper(const Napi::CallbackInfo &info);
|
|
22
21
|
~WebSocketServerWrapper();
|
|
23
22
|
|
|
24
23
|
// Functions
|
|
25
|
-
|
|
26
24
|
void stop(const Napi::CallbackInfo &info);
|
|
27
25
|
Napi::Value port(const Napi::CallbackInfo &info);
|
|
28
26
|
|
|
@@ -31,13 +29,17 @@ public:
|
|
|
31
29
|
|
|
32
30
|
// Close all existing WebSocketServers
|
|
33
31
|
static void StopAll();
|
|
34
|
-
|
|
32
|
+
|
|
35
33
|
private:
|
|
36
|
-
static
|
|
37
|
-
std::
|
|
38
|
-
std::unique_ptr<ThreadSafeCallback> mOnClientCallback = nullptr;
|
|
34
|
+
static Napi::FunctionReference constructor;
|
|
35
|
+
static std::unordered_set<WebSocketServerWrapper *> instances;
|
|
39
36
|
|
|
40
37
|
void doStop();
|
|
38
|
+
|
|
39
|
+
std::unique_ptr<rtc::WebSocketServer> mWebSocketServerPtr = nullptr;
|
|
40
|
+
|
|
41
|
+
// Callback Ptrs
|
|
42
|
+
std::unique_ptr<ThreadSafeCallback> mOnClientCallback = nullptr;
|
|
41
43
|
};
|
|
42
44
|
|
|
43
45
|
#endif // WEB_SOCKET_SERVER_WRAPPER_H
|
|
@@ -65,6 +65,9 @@ WebSocketWrapper::WebSocketWrapper(const Napi::CallbackInfo &info) : Napi::Objec
|
|
|
65
65
|
mWebSocketPtr = *(info[1].As<Napi::External<std::shared_ptr<rtc::WebSocket>>>().Data());
|
|
66
66
|
PLOG_DEBUG << "Using WebSocket got from WebSocketServer";
|
|
67
67
|
instances.insert(this);
|
|
68
|
+
|
|
69
|
+
// Closed callback must be set to trigger cleanup
|
|
70
|
+
mOnClosedCallback = std::make_unique<ThreadSafeCallback>(Napi::Function::New(info.Env(), [](const Napi::CallbackInfo &) {}));
|
|
68
71
|
return;
|
|
69
72
|
}
|
|
70
73
|
|
|
@@ -82,6 +85,9 @@ WebSocketWrapper::WebSocketWrapper(const Napi::CallbackInfo &info) : Napi::Objec
|
|
|
82
85
|
return;
|
|
83
86
|
}
|
|
84
87
|
instances.insert(this);
|
|
88
|
+
|
|
89
|
+
// Closed callback must be set to trigger cleanup
|
|
90
|
+
mOnClosedCallback = std::make_unique<ThreadSafeCallback>(Napi::Function::New(info.Env(), [](const Napi::CallbackInfo &) {}));
|
|
85
91
|
return;
|
|
86
92
|
}
|
|
87
93
|
|
|
@@ -240,7 +246,7 @@ WebSocketWrapper::WebSocketWrapper(const Napi::CallbackInfo &info) : Napi::Objec
|
|
|
240
246
|
PLOG_DEBUG << "WebSocket created";
|
|
241
247
|
|
|
242
248
|
// Closed callback must set to trigger cleanup
|
|
243
|
-
mOnClosedCallback = std::make_unique<ThreadSafeCallback>(Napi::Function::New(info.Env(), [](const Napi::CallbackInfo&){}));
|
|
249
|
+
mOnClosedCallback = std::make_unique<ThreadSafeCallback>(Napi::Function::New(info.Env(), [](const Napi::CallbackInfo &) {}));
|
|
244
250
|
|
|
245
251
|
instances.insert(this);
|
|
246
252
|
}
|
package/test/connectivity.js
CHANGED
|
@@ -1,30 +1,16 @@
|
|
|
1
1
|
import nodeDataChannel from '../lib/index.js';
|
|
2
2
|
|
|
3
3
|
nodeDataChannel.initLogger('Debug');
|
|
4
|
-
nodeDataChannel.preload();
|
|
5
4
|
|
|
6
5
|
let dc1 = null;
|
|
7
6
|
let dc2 = null;
|
|
8
7
|
|
|
9
|
-
// Config options
|
|
10
|
-
// export interface RtcConfig {
|
|
11
|
-
// iceServers: string[];
|
|
12
|
-
// proxyServer?: ProxyServer;
|
|
13
|
-
// bindAddress?: string;
|
|
14
|
-
// enableIceTcp?: boolean;
|
|
15
|
-
// portRangeBegin?: number;
|
|
16
|
-
// portRangeEnd?: number;
|
|
17
|
-
// maxMessageSize?: number;
|
|
18
|
-
// iceTransportPolicy?: TransportPolicy;
|
|
19
|
-
// }
|
|
20
|
-
//
|
|
21
8
|
// "iceServers" option is an array of stun/turn server urls
|
|
22
9
|
// Examples;
|
|
23
10
|
// STUN Server Example : stun:stun.l.google.com:19302
|
|
24
11
|
// TURN Server Example : turn:USERNAME:PASSWORD@TURN_IP_OR_ADDRESS:PORT
|
|
25
12
|
// TURN Server Example (TCP) : turn:USERNAME:PASSWORD@TURN_IP_OR_ADDRESS:PORT?transport=tcp
|
|
26
13
|
// TURN Server Example (TLS) : turns:USERNAME:PASSWORD@TURN_IP_OR_ADDRESS:PORT
|
|
27
|
-
|
|
28
14
|
let peer1 = new nodeDataChannel.PeerConnection('Peer1', { iceServers: ['stun:stun.l.google.com:19302'] });
|
|
29
15
|
|
|
30
16
|
// Set Callbacks
|
|
@@ -78,15 +64,7 @@ peer2.onDataChannel((dc) => {
|
|
|
78
64
|
});
|
|
79
65
|
});
|
|
80
66
|
|
|
81
|
-
// DataChannel
|
|
82
|
-
// export interface DataChannelInitConfig {
|
|
83
|
-
// protocol?: string;
|
|
84
|
-
// negotiated?: boolean;
|
|
85
|
-
// id?: number;
|
|
86
|
-
// ordered?: boolean;
|
|
87
|
-
// maxPacketLifeTime?: number;
|
|
88
|
-
// maxRetransmits?: number;
|
|
89
|
-
// }
|
|
67
|
+
// Create DataChannel
|
|
90
68
|
dc1 = peer1.createDataChannel('test');
|
|
91
69
|
dc1.onOpen(() => {
|
|
92
70
|
dc1.sendMessage('Hello from Peer1');
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Setup (First time usage)
|
|
2
|
+
|
|
3
|
+
> cd test/wpt-tests
|
|
4
|
+
|
|
5
|
+
> npm i
|
|
6
|
+
|
|
7
|
+
> git submodule update --init --recursive --depth 1
|
|
8
|
+
|
|
9
|
+
> cd wpt
|
|
10
|
+
|
|
11
|
+
> ./wpt make-hosts-file | sudo tee -a /etc/hosts
|
|
12
|
+
|
|
13
|
+
After your hosts file is configured, the servers will be locally accessible at:
|
|
14
|
+
|
|
15
|
+
http://web-platform.test:8000/
|
|
16
|
+
|
|
17
|
+
https://web-platform.test:8443/ \*
|
|
18
|
+
|
|
19
|
+
To use the web-based runner point your browser to:
|
|
20
|
+
|
|
21
|
+
http://web-platform.test:8000/tools/runner/index.html
|
|
22
|
+
|
|
23
|
+
https://web-platform.test:8443/tools/runner/index.html \*
|
|
24
|
+
|
|
25
|
+
# Running Tests
|
|
26
|
+
|
|
27
|
+
> npm run test
|
|
28
|
+
|
|
29
|
+
OR
|
|
30
|
+
|
|
31
|
+
> npm run:wpt (Let this run)
|
|
32
|
+
|
|
33
|
+
> npm run:test (In an other console)
|
|
34
|
+
|
|
35
|
+
The files that tested are listed in `wpt-test-list.js`. The commented lines need still to be one-by-one tested and uncommented.
|
|
36
|
+
|
|
37
|
+
Contributions are welcome!
|
|
38
|
+
|
|
39
|
+
# Run a test for Chrome
|
|
40
|
+
|
|
41
|
+
./wpt run chrome /webrtc/RTCPeerConnection-addIceCandidate.html
|
|
42
|
+
|
|
43
|
+
# Latest Test Results
|
|
44
|
+
|
|
45
|
+
Please check [last-test-results.md](./last-test-results.md) page
|
|
46
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { runWptTests } from './wpt.js';
|
|
2
|
+
|
|
3
|
+
// Some tests also fail in Chrome
|
|
4
|
+
// We don't also care of them
|
|
5
|
+
let chromeFailedTests = [];
|
|
6
|
+
let totalNumberOfTests = 0;
|
|
7
|
+
|
|
8
|
+
export async function runChromeTests(wptTestList) {
|
|
9
|
+
chromeFailedTests = [];
|
|
10
|
+
totalNumberOfTests = 0;
|
|
11
|
+
let results = await runWptTests(wptTestList, true);
|
|
12
|
+
for (let i = 0; i < results.length; i++) {
|
|
13
|
+
totalNumberOfTests += results[i].result?.length || 0;
|
|
14
|
+
if (results[i].result && results[i].result.some((test) => test.status === 1)) {
|
|
15
|
+
chromeFailedTests.push({
|
|
16
|
+
test: results[i].test,
|
|
17
|
+
result: results[i].result.filter((test) => test.status === 1),
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function getChromeFailedTests() {
|
|
24
|
+
return chromeFailedTests;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function isTestForChromeFailed(testPath, testName) {
|
|
28
|
+
return chromeFailedTests.some(
|
|
29
|
+
(test) =>
|
|
30
|
+
test.test === testPath && test.result.some((result) => result.name === testName && result.status === 1),
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function getTotalNumberOfTests() {
|
|
35
|
+
return totalNumberOfTests;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Test
|
|
39
|
+
// (async () => {
|
|
40
|
+
// await runChromeTests();
|
|
41
|
+
// console.log(getChromeFailedTests());
|
|
42
|
+
// })();
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import ndc from '../../lib/index.js';
|
|
2
|
+
import wptTestList from './wpt-test-list.js';
|
|
3
|
+
import { runWptTests } from './wpt.js';
|
|
4
|
+
import { runChromeTests, isTestForChromeFailed, getTotalNumberOfTests } from './chrome-failed-tests.js';
|
|
5
|
+
|
|
6
|
+
// Set the log level, for debugging purposes
|
|
7
|
+
// ndc.initLogger('Debug');
|
|
8
|
+
|
|
9
|
+
// Catch unhandled exceptions
|
|
10
|
+
process.on('unhandledRejection', (reason, promise) => {
|
|
11
|
+
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
|
|
12
|
+
process.exit(1);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// Run tests for Chrome
|
|
16
|
+
console.log('# Running tests for Chrome...');
|
|
17
|
+
await runChromeTests(wptTestList);
|
|
18
|
+
//console.log(JSON.stringify(getChromeFailedTests(), null, 2));
|
|
19
|
+
|
|
20
|
+
// Run tests for node-datachannel
|
|
21
|
+
console.log('');
|
|
22
|
+
console.log('# Running tests for node-datachannel...');
|
|
23
|
+
let results = await runWptTests(wptTestList);
|
|
24
|
+
|
|
25
|
+
// Calc total number of tests
|
|
26
|
+
let totalTests = 0;
|
|
27
|
+
results.forEach((result) => {
|
|
28
|
+
totalTests += result.result.length;
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// Compare results
|
|
32
|
+
// Filter failed tests for node-datachannel
|
|
33
|
+
let failedTestsLibrary = [];
|
|
34
|
+
results.forEach((result) => {
|
|
35
|
+
if (result.result.some((test) => test.status === 1)) {
|
|
36
|
+
failedTestsLibrary.push({
|
|
37
|
+
test: result.test,
|
|
38
|
+
result: result.result.filter((test) => test.status === 1),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
let totalFailedTestsLibrary = 0;
|
|
43
|
+
failedTestsLibrary.forEach((result) => {
|
|
44
|
+
totalFailedTestsLibrary += result.result.length;
|
|
45
|
+
});
|
|
46
|
+
// console.log(JSON.stringify(failedTestsLibrary, null, 2));
|
|
47
|
+
|
|
48
|
+
// Filter out any failed tests that also failed in Chrome
|
|
49
|
+
let failedTests = [];
|
|
50
|
+
failedTestsLibrary.forEach((result) => {
|
|
51
|
+
if (result.result.some((test) => !isTestForChromeFailed(result.test, test.name))) {
|
|
52
|
+
failedTests.push({
|
|
53
|
+
test: result.test,
|
|
54
|
+
result: result.result.filter((test) => !isTestForChromeFailed(result.test, test.name)),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
let totalFailedTests = 0;
|
|
59
|
+
failedTests.forEach((result) => {
|
|
60
|
+
totalFailedTests += result.result.length;
|
|
61
|
+
});
|
|
62
|
+
// console.log(JSON.stringify(failedTests, null, 2));
|
|
63
|
+
|
|
64
|
+
// Print Report
|
|
65
|
+
// Print Test Names
|
|
66
|
+
console.log('');
|
|
67
|
+
console.log('# Tests Report');
|
|
68
|
+
// Total number of tests
|
|
69
|
+
console.log('Total Tests [Chrome]: ', getTotalNumberOfTests(), ' ');
|
|
70
|
+
console.log('Total Tests [Library]: ', totalTests, ' (We expect this to be equal to Total Tests [Chrome]) ');
|
|
71
|
+
// Number of passed tests
|
|
72
|
+
console.log('Passed Tests: ', totalTests - totalFailedTestsLibrary, ' ');
|
|
73
|
+
// Number of failed tests for chrome + node-datachannel
|
|
74
|
+
console.log(
|
|
75
|
+
'Failed Tests (Chrome + Library): ',
|
|
76
|
+
totalFailedTestsLibrary - totalFailedTests,
|
|
77
|
+
" (We don't care about these tests) ",
|
|
78
|
+
);
|
|
79
|
+
// Number of failed tests
|
|
80
|
+
console.log('Failed Tests: ', totalFailedTests, ' ');
|
|
81
|
+
|
|
82
|
+
// Print Failed Tests
|
|
83
|
+
console.log('');
|
|
84
|
+
console.log('## Failed Tests');
|
|
85
|
+
for (let i = 0; i < failedTests.length; i++) {
|
|
86
|
+
console.log(`### ${failedTests[i].test}`);
|
|
87
|
+
for (let j = 0; j < failedTests[i].result.length; j++) {
|
|
88
|
+
console.log(`- name: ${failedTests[i].result[j].name} `);
|
|
89
|
+
console.log(` message: ${failedTests[i].result[j].message} `);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Sometimes failed tests are not cleaned up
|
|
94
|
+
// This can prevent the process from exiting
|
|
95
|
+
ndc.cleanup();
|
|
96
|
+
console.log('End of tests');
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
|
|
2
|
+
> wpt-tests@1.0.0 run:test
|
|
3
|
+
> node index.js
|
|
4
|
+
|
|
5
|
+
# Running tests for Chrome...
|
|
6
|
+
Running test: /webrtc/getstats.html
|
|
7
|
+
Running test: /webrtc/historical.html
|
|
8
|
+
Running test: /webrtc/no-media-call.html
|
|
9
|
+
Running test: /webrtc/promises-call.html
|
|
10
|
+
Running test: /webrtc/receiver-track-live.https.html
|
|
11
|
+
Running test: /webrtc/recvonly-transceiver-can-become-sendrecv.https.html
|
|
12
|
+
Running test: /webrtc/RollbackEvents.https.html
|
|
13
|
+
Running test: /webrtc/RTCCertificate.html
|
|
14
|
+
Running test: /webrtc/RTCConfiguration-bundlePolicy.html
|
|
15
|
+
Running test: /webrtc/RTCConfiguration-iceCandidatePoolSize.html
|
|
16
|
+
Running test: /webrtc/RTCConfiguration-iceServers.html
|
|
17
|
+
Running test: /webrtc/RTCConfiguration-iceTransportPolicy.html
|
|
18
|
+
Running test: /webrtc/RTCConfiguration-rtcpMuxPolicy.html
|
|
19
|
+
Running test: /webrtc/RTCConfiguration-validation.html
|
|
20
|
+
Running test: /webrtc/RTCDataChannel-bufferedAmount.html
|
|
21
|
+
Running test: /webrtc/RTCDataChannelEvent-constructor.html
|
|
22
|
+
Running test: /webrtc/RTCDataChannel-iceRestart.html
|
|
23
|
+
Running test: /webrtc/RTCDataChannel-id.html
|
|
24
|
+
Running test: /webrtc/RTCDataChannel-send-blob-order.html
|
|
25
|
+
Running test: /webrtc/RTCPeerConnection-addIceCandidate.html
|
|
26
|
+
Running test: /webrtc/RTCPeerConnection-addTcpIceCandidate.html
|
|
27
|
+
|
|
28
|
+
# Running tests for node-datachannel...
|
|
29
|
+
Running test: /webrtc/getstats.html
|
|
30
|
+
Running test: /webrtc/historical.html
|
|
31
|
+
Running test: /webrtc/no-media-call.html
|
|
32
|
+
Running test: /webrtc/promises-call.html
|
|
33
|
+
Running test: /webrtc/receiver-track-live.https.html
|
|
34
|
+
Running test: /webrtc/recvonly-transceiver-can-become-sendrecv.https.html
|
|
35
|
+
Running test: /webrtc/RollbackEvents.https.html
|
|
36
|
+
Running test: /webrtc/RTCCertificate.html
|
|
37
|
+
Running test: /webrtc/RTCConfiguration-bundlePolicy.html
|
|
38
|
+
Running test: /webrtc/RTCConfiguration-iceCandidatePoolSize.html
|
|
39
|
+
Running test: /webrtc/RTCConfiguration-iceServers.html
|
|
40
|
+
Running test: /webrtc/RTCConfiguration-iceTransportPolicy.html
|
|
41
|
+
Running test: /webrtc/RTCConfiguration-rtcpMuxPolicy.html
|
|
42
|
+
Running test: /webrtc/RTCConfiguration-validation.html
|
|
43
|
+
Running test: /webrtc/RTCDataChannel-bufferedAmount.html
|
|
44
|
+
Running test: /webrtc/RTCDataChannelEvent-constructor.html
|
|
45
|
+
Running test: /webrtc/RTCDataChannel-iceRestart.html
|
|
46
|
+
Running test: /webrtc/RTCDataChannel-id.html
|
|
47
|
+
Running test: /webrtc/RTCDataChannel-send-blob-order.html
|
|
48
|
+
Running test: /webrtc/RTCPeerConnection-addIceCandidate.html
|
|
49
|
+
Running test: /webrtc/RTCPeerConnection-addTcpIceCandidate.html
|
|
50
|
+
|
|
51
|
+
# Tests Report
|
|
52
|
+
Total Tests [Chrome]: 316
|
|
53
|
+
Total Tests [Library]: 316 (We expect this to be equal to Total Tests [Chrome])
|
|
54
|
+
Passed Tests: 228
|
|
55
|
+
Failed Tests (Chrome + Library): 35 (We don't care about these tests)
|
|
56
|
+
Failed Tests: 53
|
|
57
|
+
|
|
58
|
+
## Failed Tests
|
|
59
|
+
### /webrtc/historical.html
|
|
60
|
+
- name: RTCRtpTransceiver member setDirection should not exist
|
|
61
|
+
message: RTCRtpTransceiver is not defined
|
|
62
|
+
### /webrtc/recvonly-transceiver-can-become-sendrecv.https.html
|
|
63
|
+
- name: [audio] recvonly transceiver can become sendrecv
|
|
64
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
65
|
+
- name: [video] recvonly transceiver can become sendrecv
|
|
66
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
67
|
+
### /webrtc/RTCCertificate.html
|
|
68
|
+
- name: Constructing RTCPeerConnection with expired certificate should reject with InvalidAccessError
|
|
69
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
70
|
+
- name: Calling setConfiguration with different set of certs should reject with InvalidModificationError
|
|
71
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
72
|
+
- name: RTCCertificate should have at least one fingerprint
|
|
73
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
74
|
+
- name: RTCPeerConnection({ certificates }) should generate offer SDP with fingerprint of provided certificate
|
|
75
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
76
|
+
### /webrtc/RTCConfiguration-bundlePolicy.html
|
|
77
|
+
- name: Default bundlePolicy should be balanced
|
|
78
|
+
message: assert_equals: expected (string) "balanced" but got (undefined) undefined
|
|
79
|
+
- name: new RTCPeerConnection({ bundlePolicy: undefined }) should have bundlePolicy balanced
|
|
80
|
+
message: assert_equals: expected (string) "balanced" but got (undefined) undefined
|
|
81
|
+
- name: new RTCPeerConnection({ bundlePolicy: null }) should throw TypeError
|
|
82
|
+
message: assert_throws_js: function "() =>
|
|
83
|
+
new RTCPeerConnection({ bundlePolicy: null })" did not throw
|
|
84
|
+
- name: new RTCPeerConnection({ bundlePolicy: 'invalid' }) should throw TypeError
|
|
85
|
+
message: assert_throws_js: function "() =>
|
|
86
|
+
new RTCPeerConnection({ bundlePolicy: 'invalid' })" did not throw
|
|
87
|
+
- name: setConfiguration({ bundlePolicy: 'max-compat' }) with initial bundlePolicy max-bundle should throw InvalidModificationError
|
|
88
|
+
message: assert_throws_dom: function "() =>
|
|
89
|
+
pc.setConfiguration({ bundlePolicy: 'max-compat' })" did not throw
|
|
90
|
+
- name: setConfiguration({}) with initial bundlePolicy max-bundle should throw InvalidModificationError
|
|
91
|
+
message: assert_throws_dom: function "() =>
|
|
92
|
+
pc.setConfiguration({})" did not throw
|
|
93
|
+
### /webrtc/RTCConfiguration-iceCandidatePoolSize.html
|
|
94
|
+
- name: Initialize a new RTCPeerConnection with no iceCandidatePoolSize
|
|
95
|
+
message: assert_equals: expected (number) 0 but got (undefined) undefined
|
|
96
|
+
- name: Initialize a new RTCPeerConnection with iceCandidatePoolSize: -1 (Out Of Range)
|
|
97
|
+
message: assert_throws_js: function "() => {
|
|
98
|
+
new RTCPeerConnection({
|
|
99
|
+
iceCandidatePoolSize: -1
|
|
100
|
+
});
|
|
101
|
+
}" did not throw
|
|
102
|
+
- name: Initialize a new RTCPeerConnection with iceCandidatePoolSize: 256 (Out Of Range)
|
|
103
|
+
message: assert_throws_js: function "() => {
|
|
104
|
+
new RTCPeerConnection({
|
|
105
|
+
iceCandidatePoolSize: 256
|
|
106
|
+
});
|
|
107
|
+
}" did not throw
|
|
108
|
+
- name: Reconfigure RTCPeerConnection instance iceCandidatePoolSize to -1 (Out Of Range)
|
|
109
|
+
message: assert_throws_js: function "() => {
|
|
110
|
+
pc.setConfiguration({
|
|
111
|
+
iceCandidatePoolSize: -1
|
|
112
|
+
});
|
|
113
|
+
}" did not throw
|
|
114
|
+
- name: Reconfigure RTCPeerConnection instance iceCandidatePoolSize to 256 (Out Of Range)
|
|
115
|
+
message: assert_throws_js: function "() => {
|
|
116
|
+
pc.setConfiguration({
|
|
117
|
+
iceCandidatePoolSize: 256
|
|
118
|
+
});
|
|
119
|
+
}" did not throw
|
|
120
|
+
### /webrtc/RTCConfiguration-iceTransportPolicy.html
|
|
121
|
+
- name: new RTCPeerConnection(config) - with null iceTransportPolicy should throw TypeError
|
|
122
|
+
message: assert_throws_js: function "() =>
|
|
123
|
+
makePc({ iceTransportPolicy: null })" threw object "SyntaxError: Invalid ICE transport policy, expected string" ("SyntaxError") expected instance of function "function TypeError() { [native code] }" ("TypeError")
|
|
124
|
+
- name: setConfiguration(config) - with null iceTransportPolicy should throw TypeError
|
|
125
|
+
message: assert_throws_js: function "() =>
|
|
126
|
+
makePc({ iceTransportPolicy: null })" did not throw
|
|
127
|
+
- name: iceTransportPolicy "relay" on offerer should prevent candidate gathering
|
|
128
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
129
|
+
- name: iceTransportPolicy "relay" on answerer should prevent candidate gathering
|
|
130
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
131
|
+
- name: Changing iceTransportPolicy from "all" to "relay" causes an ICE restart which should fail, with no new candidates
|
|
132
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
133
|
+
- name: Changing iceTransportPolicy from "relay" to "all" causes an ICE restart which should succeed
|
|
134
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
135
|
+
- name: Changing iceTransportPolicy from "all" to "relay", and back to "all" prompts an ICE restart
|
|
136
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
137
|
+
- name: Changing iceTransportPolicy from "all" to "relay" on the answerer has no effect on a subsequent offer/answer
|
|
138
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
139
|
+
### /webrtc/RTCConfiguration-rtcpMuxPolicy.html
|
|
140
|
+
- name: new RTCPeerConnection() should have default rtcpMuxPolicy require
|
|
141
|
+
message: assert_equals: expected (string) "require" but got (undefined) undefined
|
|
142
|
+
- name: new RTCPeerConnection({ rtcpMuxPolicy: undefined }) should have default rtcpMuxPolicy require
|
|
143
|
+
message: assert_equals: expected (string) "require" but got (undefined) undefined
|
|
144
|
+
- name: new RTCPeerConnection(config) - with { rtcpMuxPolicy: null } should throw TypeError
|
|
145
|
+
message: assert_throws_js: function "() =>
|
|
146
|
+
makePc({ rtcpMuxPolicy: null })" did not throw
|
|
147
|
+
- name: setConfiguration(config) - with { rtcpMuxPolicy: null } should throw TypeError
|
|
148
|
+
message: assert_throws_js: function "() =>
|
|
149
|
+
makePc({ rtcpMuxPolicy: null })" did not throw
|
|
150
|
+
- name: new RTCPeerConnection(config) - with { rtcpMuxPolicy: 'invalid' } should throw TypeError
|
|
151
|
+
message: assert_throws_js: function "() =>
|
|
152
|
+
makePc({ rtcpMuxPolicy: 'invalid' })" did not throw
|
|
153
|
+
- name: setConfiguration(config) - with { rtcpMuxPolicy: 'invalid' } should throw TypeError
|
|
154
|
+
message: assert_throws_js: function "() =>
|
|
155
|
+
makePc({ rtcpMuxPolicy: 'invalid' })" did not throw
|
|
156
|
+
- name: setConfiguration({ rtcpMuxPolicy: 'negotiate' }) with initial rtcpMuxPolicy require should throw InvalidModificationError
|
|
157
|
+
message: assert_throws_dom: function "() =>
|
|
158
|
+
pc.setConfiguration({ rtcpMuxPolicy: 'negotiate' })" did not throw
|
|
159
|
+
- name: setConfiguration({ rtcpMuxPolicy: 'require' }) with initial rtcpMuxPolicy negotiate should throw InvalidModificationError
|
|
160
|
+
message: assert_throws_dom: function "() =>
|
|
161
|
+
pc.setConfiguration({ rtcpMuxPolicy: 'require' })" did not throw
|
|
162
|
+
- name: setConfiguration({}) with initial rtcpMuxPolicy require should leave rtcpMuxPolicy to require
|
|
163
|
+
message: assert_equals: expected (string) "require" but got (undefined) undefined
|
|
164
|
+
- name: setConfiguration({}) with initial rtcpMuxPolicy negotiate should throw InvalidModificationError
|
|
165
|
+
message: assert_throws_dom: function "() =>
|
|
166
|
+
pc.setConfiguration({})" did not throw
|
|
167
|
+
- name: setRemoteDescription throws InvalidAccessError when called with an offer without rtcp-mux and rtcpMuxPolicy is set to require
|
|
168
|
+
message: assert_unreached: Should have rejected: undefined Reached unreachable code
|
|
169
|
+
### /webrtc/RTCDataChannel-bufferedAmount.html
|
|
170
|
+
- name: datachannel bufferedAmount should increase to byte length of encodedunicode string sent
|
|
171
|
+
message: assert_equals: Expect bufferedAmount to be the byte length of the unicode string expected 12 but got 0
|
|
172
|
+
- name: datachannel bufferedAmount should increase to byte length of buffer sent
|
|
173
|
+
message: assert_equals: Expect bufferedAmount to increase to byte length of sent buffer expected 5 but got 0
|
|
174
|
+
- name: datachannel bufferedAmount should not decrease immediately after initiating closure
|
|
175
|
+
message: assert_equals: Expect bufferedAmount to increase to byte length of sent buffer expected 5 but got 0
|
|
176
|
+
- name: datachannel bufferedAmount should not decrease after closing the peer connection
|
|
177
|
+
message: assert_equals: Expect bufferedAmount to increase to byte length of sent buffer expected 5 but got 0
|
|
178
|
+
### /webrtc/RTCDataChannel-iceRestart.html
|
|
179
|
+
- name: Data channel remains usable after ICE restart
|
|
180
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
181
|
+
- name: Data channel remains usable at each step of an ICE restart
|
|
182
|
+
message: promise_test: Unhandled rejection with value: object "Error: Not implemented"
|
|
183
|
+
### /webrtc/RTCDataChannel-id.html
|
|
184
|
+
- name: DTLS client uses odd data channel IDs
|
|
185
|
+
message: promise_test: Unhandled rejection with value: object "Error: libdatachannel error while adding remote description: Got the local description as remote description"
|
|
186
|
+
- name: DTLS server uses even data channel IDs
|
|
187
|
+
message: promise_test: Unhandled rejection with value: object "Error: libdatachannel error while adding remote description: Got the local description as remote description"
|
|
188
|
+
- name: In-band negotiation with a specific ID should not work
|
|
189
|
+
message: assert_equals: expected (object) null but got (number) 42
|
|
190
|
+
- name: Odd/even role should not be violated when mixing with negotiated channels
|
|
191
|
+
message: assert_equals: Channel id must be null before DTLS role has been determined expected (object) null but got (number) 65535
|
|
192
|
+
### /webrtc/RTCPeerConnection-addIceCandidate.html
|
|
193
|
+
- name: addIceCandidate with second sdpMid and sdpMLineIndex should add candidate to second media stream
|
|
194
|
+
message: assert_true: Expect candidate line to be found after media line m=video expected true got false
|
|
195
|
+
- name: Adding multiple candidates should add candidates to their corresponding media stream
|
|
196
|
+
message: assert_true: Expect candidate line to be found after media line m=video expected true got false
|
|
197
|
+
- name: Add candidate for media stream 2 with null usernameFragment should succeed
|
|
198
|
+
message: assert_true: Expect candidate line to be found after media line m=video expected true got false
|
|
199
|
+
### /webrtc/RTCPeerConnection-addTcpIceCandidate.html
|
|
200
|
+
- name: TCP candidate aimed at port 8001 accepted
|
|
201
|
+
message: promise_test: Unhandled rejection with value: undefined
|
|
202
|
+
- name: TCP addIceCandidate aimed at port 8001 accepted
|
|
203
|
+
message: promise_test: Unhandled rejection with value: object "OperationError: Invalid sdpMid format"
|
|
204
|
+
- name: TCP candidate aimed at Fetch bad port 119 ignored
|
|
205
|
+
message: assert_unreached: Reached unreachable code
|