Don't put pages that have not reached the non-visually empty layout milestone in...
[WebKit-https.git] / LayoutTests / webrtc / candidate-stats.html
1 <!doctype html>
2 <html>
3     <head>
4         <meta charset="utf-8">
5         <title>Testing basic video exchange from offerer to receiver</title>
6         <script src="../resources/testharness.js"></script>
7         <script src="../resources/testharnessreport.js"></script>
8     </head>
9     <body>
10         <script src ="routines.js"></script>
11         <script>
12 promise_test(async (test) => {
13     let firstConnection, secondConnection;
14     await new Promise((resolve, reject) => {
15         createConnections((connection) => {
16             firstConnection = connection;
17             localChannel = connection.createDataChannel('sendDataChannel');
18         }, (connection) => {
19             secondConnection = connection;
20             connection.ondatachannel = resolve;
21         });
22         setTimeout(() => { reject("Test timed out"); }, 5000);
23     });
24
25     let stats = await getTypedStats(firstConnection, "local-candidate");
26     assert_true(!stats.address, "address is not exposed");
27     assert_true(!stats.networkType, "networkType is not exposed");
28
29     assert_array_equals(Object.keys(stats), ["id","timestamp","type","candidateType","deleted","port","priority","protocol","transportId"], "local");
30
31     stats = await getTypedStats(firstConnection, "remote-candidate");
32
33     // For now, we do not want to expose address or networkType.
34     assert_true(!stats.address, "address is not exposed");
35     assert_true(!stats.networkType, "networkType is not exposed");
36
37     assert_array_equals(Object.keys(stats), ["id","timestamp","type","candidateType","deleted","port","priority","protocol","transportId"], "remote");
38 }, "ICE candidate data channel stats");
39         </script>
40     </body>
41 </html>