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

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

Issue 2463953002: Expose RTCDataChannel and RTCDataChannelEvent (with constructor) (Closed)
Patch Set: Added layout test for constructor and fixed expected output for global-listing Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/peerconnection/RTCDataChannelEvent-constructor.html
diff --git a/third_party/WebKit/LayoutTests/fast/peerconnection/RTCDataChannelEvent-constructor.html b/third_party/WebKit/LayoutTests/fast/peerconnection/RTCDataChannelEvent-constructor.html
new file mode 100644
index 0000000000000000000000000000000000000000..0ff478a04c67b2f4d23b3dfd775e0b7a5915d7fb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/peerconnection/RTCDataChannelEvent-constructor.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>RTCDataChannelEvent constructor</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+test(function() {
+ assert_equals(RTCDataChannelEvent.length, 2);
+ assert_throws(new TypeError(), function() { new RTCDataChannelEvent('type'); });
foolip 2016/11/08 20:36:43 Here, can you also test that these two throw TypeE
lunalu1 2016/11/11 15:37:27 Done.
+}, 'Checks for RTCDataChannelEvent constructor without a required argument.');
+
+test(function() {
+ var pc = new RTCPeerConnection();
+ var c = pc.createDataChannel('');
+ var e = new RTCDataChannelEvent('type', {channel: c});
+ assert_true(e instanceof RTCDataChannelEvent);
+ assert_equals(e.channel, c);
+}, 'Checks for RTCDataChannelEvent constructor with full arguments.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698