| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>RTCPeerConnection.id</title> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| </head> |
| <body> |
| <script> |
| test(t => { |
| const pc = new RTCPeerConnection(); |
| t.add_cleanup(() => { pc.close(); }); |
| assert_equals(typeof pc.id, 'string'); |
| }, 'RTCPeerConnection.id is a string.'); |
| |
| test(t => { |
| const pc1 = new RTCPeerConnection(); |
| const pc2 = new RTCPeerConnection(); |
| t.add_cleanup(() => { pc1.close(); pc2.close() }); |
| assert_not_equals(pc1.id, pc2.id); |
| }, 'RTCPeerConnection.id is unique between RTCPeerConnection objects.'); |
| </script> |
| </body> |
| </html> |