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

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

Issue 2494553002: Rename RTCIceCandidateEvent to RTCPeerConnectionIceEvent and expose. (Closed)
Patch Set: Codereview update 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/platform/linux/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/RTCPeerConnectionIceEvent-constructor.html
diff --git a/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnectionIceEvent-constructor.html b/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnectionIceEvent-constructor.html
new file mode 100644
index 0000000000000000000000000000000000000000..a346a5974af9a86e64283ab431175a6ebacc68ae
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnectionIceEvent-constructor.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>RTCPeerConnectionIceEvent constructor</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+test(function() {
+ assert_equals(RTCPeerConnectionIceEvent.length, 1);
+ var e = new RTCPeerConnectionIceEvent('type');
hbos_chromium 2016/11/14 15:45:14 What is 'type'? I don't get it from looking at the
foolip 2016/11/14 15:49:39 Yes, all event constructors have it has the first
lunalu1 2016/11/15 18:09:24 Done.
lunalu1 2016/11/15 18:09:24 Done.
+ assert_equals(e.candidate, null);
+ assert_false(e.bubbles);
+ assert_false(e.cancelable);
+}, 'RTCPeerConnectionIceEvent constructor with no candidate attribute provivded');
hbos_chromium 2016/11/14 15:45:15 nit: provided.'
lunalu1 2016/11/15 18:09:24 Done.
+
+test(function() {
+ var e = new RTCPeerConnectionIceEvent('type', { candidate: null });
+ assert_equals(e.candidate, null);
+}, 'RTCPeerConnectionIceEvent constructor with cnadidate paased as "null".');
hbos_chromium 2016/11/14 15:45:15 nit: candidate passed as null
lunalu1 2016/11/15 18:09:24 Done.
+
+test(function() {
+ var e = new RTCPeerConnectionIceEvent('type', { candidate: undefined });
+ assert_equals(e.candidate, null);
+}, 'RTCPeerConnectionIceEvent constructor with candidate paased as "undefined".');
+
+test(function() {
+ var c = new RTCIceCandidate({ candidate: 'candidate', sdpMid: 'sdpMid', sdpMLineIndex: 1 });
+ var e = new RTCPeerConnectionIceEvent('type', { candidate: c, url: 'url', bubbles: true, cancelable: true});
+ assert_equals(e.candidate, c);
+ assert_equals(e.url, undefined);
hbos_chromium 2016/11/14 15:45:14 nit: Add a TODO comment here since this assertion
lunalu1 2016/11/15 18:09:24 Done.
+ assert_true(e.bubbles);
+ assert_true(e.cancelable);
+}, 'RTCPeerConnectionIceEvent constructor with full arguments.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/virtual/stable/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698