Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/peerconnection/RTCDataChannelEvent-constructor.html

Issue 2509983007: Upstream RTCDataChannelEvent and RTCPeerConnectionIceEvent ctor tests (Closed)
Patch Set: update MANIFEST.json Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnectionIceEvent-constructor.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <title>RTCDataChannelEvent constructor</title>
4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 <script>
7 test(function() {
8 assert_equals(RTCDataChannelEvent.length, 2);
9 assert_throws(
10 new TypeError(),
11 function() { new RTCDataChannelEvent('type'); }
12 );
13 }, 'RTCDataChannelEvent constructor without a required argument.');
14
15 test(function() {
16 assert_throws(
17 new TypeError(),
18 function() { new RTCDataChannelEvent('type', { channel: null }); }
19 );
20 }, 'RTCDataChannelEvent constructor with channel passed as "null".');
21
22 test(function() {
23 assert_throws(
24 new TypeError(),
25 function() { new RTCDataChannelEvent('type', { channel: undefined }); }
26 );
27 }, 'RTCDataChannelEvent constructor with a channel passed as "undefined".');
28
29 test(function() {
30 var pc = new RTCPeerConnection();
31 var c = pc.createDataChannel('');
32 var e = new RTCDataChannelEvent('type', { channel: c });
33 assert_true(e instanceof RTCDataChannelEvent);
34 assert_equals(e.channel, c);
35 }, 'RTCDataChannelEvent constructor with full arguments.');
36 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnectionIceEvent-constructor.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698