Title: [250836] trunk/LayoutTests
Revision
250836
Author
you...@apple.com
Date
2019-10-08 09:55:18 -0700 (Tue, 08 Oct 2019)

Log Message

Simplify data channel buffer amount low tests
https://bugs.webkit.org/show_bug.cgi?id=202693

Reviewed by Eric Carlson.

Neither of these tests need to handle a remoteChannel.
Remove the related code and remove variables that are also unneeded.

* webrtc/datachannel/bufferedAmountLowThreshold-default.html:
* webrtc/datachannel/bufferedAmountLowThreshold.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (250835 => 250836)


--- trunk/LayoutTests/ChangeLog	2019-10-08 16:32:16 UTC (rev 250835)
+++ trunk/LayoutTests/ChangeLog	2019-10-08 16:55:18 UTC (rev 250836)
@@ -1,3 +1,16 @@
+2019-10-08  Youenn Fablet  <you...@apple.com>
+
+        Simplify data channel buffer amount low tests
+        https://bugs.webkit.org/show_bug.cgi?id=202693
+
+        Reviewed by Eric Carlson.
+
+        Neither of these tests need to handle a remoteChannel.
+        Remove the related code and remove variables that are also unneeded.
+
+        * webrtc/datachannel/bufferedAmountLowThreshold-default.html:
+        * webrtc/datachannel/bufferedAmountLowThreshold.html:
+
 2019-10-08  Wenson Hsieh  <wenson_hs...@apple.com>
 
         [Clipboard API] Introduce bindings for the async Clipboard API

Modified: trunk/LayoutTests/webrtc/datachannel/bufferedAmountLowThreshold-default.html (250835 => 250836)


--- trunk/LayoutTests/webrtc/datachannel/bufferedAmountLowThreshold-default.html	2019-10-08 16:32:16 UTC (rev 250835)
+++ trunk/LayoutTests/webrtc/datachannel/bufferedAmountLowThreshold-default.html	2019-10-08 16:55:18 UTC (rev 250836)
@@ -14,11 +14,9 @@
 });
 
 var localChannel;
-var remoteChannel;
 
 function closeDataChannels() {
     localChannel.close();
-    remoteChannel.close();
     closeConnections();
 }
 
@@ -32,14 +30,7 @@
         channel.send(longString);
 }
 
-function receiveMessages(event) {
-    if (++counter === 1)
-        return;
-}
-
 promise_test((test) => {
-    counter = 0;
-    var gotEvent = false;
     return new Promise((resolve, reject) => {
         createConnections((localConnection) => {
             localChannel = localConnection.createDataChannel('sendDataChannel');
@@ -49,10 +40,6 @@
             }
             assert_equals(localChannel.bufferedAmountLowThreshold, 0, "default bufferedAmountLowThreshold value");
         }, (remoteConnection) => {
-            remoteConnection._ondatachannel_ = (event) => {
-                remoteChannel = event.channel;
-                remoteChannel._onmessage_ = receiveMessages;
-            };
         });
         setTimeout(() => reject('timed out'), 5000);
     }).then (() => {

Modified: trunk/LayoutTests/webrtc/datachannel/bufferedAmountLowThreshold.html (250835 => 250836)


--- trunk/LayoutTests/webrtc/datachannel/bufferedAmountLowThreshold.html	2019-10-08 16:32:16 UTC (rev 250835)
+++ trunk/LayoutTests/webrtc/datachannel/bufferedAmountLowThreshold.html	2019-10-08 16:55:18 UTC (rev 250836)
@@ -14,11 +14,9 @@
 });
 
 var localChannel;
-var remoteChannel;
 
 function closeDataChannels() {
     localChannel.close();
-    remoteChannel.close();
     closeConnections();
 }
 
@@ -26,11 +24,6 @@
 for (var cptr = 0; cptr < 10; ++cptr)
     longString += longString;
 
-function receiveMessages(event) {
-    if (++counter === 1)
-        return;
-}
-
 function sendContinuouslyMessages(channel)
 {
     try {
@@ -43,8 +36,6 @@
 }
 
 promise_test((test) => {
-    counter = 0;
-    var gotEvent = false;
     return new Promise((resolve, reject) => {
         createConnections((localConnection) => {
             localChannel = localConnection.createDataChannel('sendDataChannel');
@@ -56,10 +47,6 @@
             };
             localChannel.bufferedAmountLowThreshold = 200000;
         }, (remoteConnection) => {
-            remoteConnection._ondatachannel_ = (event) => {
-                remoteChannel = event.channel;
-                remoteChannel._onmessage_ = receiveMessages;
-            };
         });
         setTimeout(() => reject('timed out'), 5000);
     }).then (() => {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to