Changeset 250836 in webkit


Ignore:
Timestamp:
Oct 8, 2019 9:55:18 AM (5 years ago)
Author:
youenn@apple.com
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:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r250824 r250836  
     12019-10-08  Youenn Fablet  <youenn@apple.com>
     2
     3        Simplify data channel buffer amount low tests
     4        https://bugs.webkit.org/show_bug.cgi?id=202693
     5
     6        Reviewed by Eric Carlson.
     7
     8        Neither of these tests need to handle a remoteChannel.
     9        Remove the related code and remove variables that are also unneeded.
     10
     11        * webrtc/datachannel/bufferedAmountLowThreshold-default.html:
     12        * webrtc/datachannel/bufferedAmountLowThreshold.html:
     13
    1142019-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>
    215
  • trunk/LayoutTests/webrtc/datachannel/bufferedAmountLowThreshold-default.html

    r230493 r250836  
    1515
    1616var localChannel;
    17 var remoteChannel;
    1817
    1918function closeDataChannels() {
    2019    localChannel.close();
    21     remoteChannel.close();
    2220    closeConnections();
    2321}
     
    3331}
    3432
    35 function receiveMessages(event) {
    36     if (++counter === 1)
    37         return;
    38 }
    39 
    4033promise_test((test) => {
    41     counter = 0;
    42     var gotEvent = false;
    4334    return new Promise((resolve, reject) => {
    4435        createConnections((localConnection) => {
     
    5041            assert_equals(localChannel.bufferedAmountLowThreshold, 0, "default bufferedAmountLowThreshold value");
    5142        }, (remoteConnection) => {
    52             remoteConnection.ondatachannel = (event) => {
    53                 remoteChannel = event.channel;
    54                 remoteChannel.onmessage = receiveMessages;
    55             };
    5643        });
    5744        setTimeout(() => reject('timed out'), 5000);
  • trunk/LayoutTests/webrtc/datachannel/bufferedAmountLowThreshold.html

    r230493 r250836  
    1515
    1616var localChannel;
    17 var remoteChannel;
    1817
    1918function closeDataChannels() {
    2019    localChannel.close();
    21     remoteChannel.close();
    2220    closeConnections();
    2321}
     
    2624for (var cptr = 0; cptr < 10; ++cptr)
    2725    longString += longString;
    28 
    29 function receiveMessages(event) {
    30     if (++counter === 1)
    31         return;
    32 }
    3326
    3427function sendContinuouslyMessages(channel)
     
    4437
    4538promise_test((test) => {
    46     counter = 0;
    47     var gotEvent = false;
    4839    return new Promise((resolve, reject) => {
    4940        createConnections((localConnection) => {
     
    5748            localChannel.bufferedAmountLowThreshold = 200000;
    5849        }, (remoteConnection) => {
    59             remoteConnection.ondatachannel = (event) => {
    60                 remoteChannel = event.channel;
    61                 remoteChannel.onmessage = receiveMessages;
    62             };
    6350        });
    6451        setTimeout(() => reject('timed out'), 5000);
Note: See TracChangeset for help on using the changeset viewer.