Changeset 261813 in webkit
- Timestamp:
- May 18, 2020 9:04:24 AM (4 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r261812 r261813 1 2020-05-18 Youenn Fablet <youenn@apple.com> 2 3 webrtc/datachannel/bufferedAmountLowThreshold.html is failing flakily 4 https://bugs.webkit.org/show_bug.cgi?id=211953 5 6 Reviewed by Eric Carlson. 7 8 * webrtc/datachannel/bufferedAmountLowThreshold-default.html: 9 Update test to make it more readable and robust, following changes made to webrtc/datachannel/bufferedAmountLowThreshold.html. 10 * webrtc/datachannel/bufferedAmountLowThreshold.html: 11 Split the tests in two parts to more easily debug which part (connection setup or sending lots of data) might time out. 12 Make sure to not send too much data by sending only one burst of data. 13 1 14 2020-05-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 15 -
trunk/LayoutTests/webrtc/datachannel/bufferedAmountLowThreshold-default.html
r250836 r261813 31 31 } 32 32 33 promise_test( (test) => {34 returnnew Promise((resolve, reject) => {33 promise_test(async (test) => { 34 await new Promise((resolve, reject) => { 35 35 createConnections((localConnection) => { 36 36 localChannel = localConnection.createDataChannel('sendDataChannel'); 37 localChannel.onopen = () => { sendMessages(localChannel); };38 localChannel.onbufferedamountlow = () => {39 resolve();40 }41 37 assert_equals(localChannel.bufferedAmountLowThreshold, 0, "default bufferedAmountLowThreshold value"); 38 localChannel.onopen = resolve; 42 39 }, (remoteConnection) => { 40 remoteConnection.ondatachannel = (event) => { 41 event.channel.onmessage = () => { }; 42 }; 43 43 }); 44 setTimeout(() => reject('timed out'), 5000); 45 }).then (() => { 46 closeDataChannels(); 44 setTimeout(() => reject('timed out 1'), 5000); 47 45 }); 46 47 const promise = new Promise((resolve, reject) => { 48 localChannel.onbufferedamountlow = resolve; 49 setTimeout(() => reject('timed out 2'), 5000); 50 }); 51 52 sendMessages(localChannel); 53 await promise; 54 closeDataChannels(); 48 55 }, "Default buffer threshold"); 49 56 -
trunk/LayoutTests/webrtc/datachannel/bufferedAmountLowThreshold.html
r250836 r261813 22 22 23 23 var longString = "abcdefgh"; 24 for (var cptr = 0; cptr < 1 0; ++cptr)24 for (var cptr = 0; cptr < 14; ++cptr) 25 25 longString += longString; 26 26 27 function send ContinuouslyMessages(channel)27 function sendLongMessages(channel) 28 28 { 29 try { 30 while (channel.bufferedAmount < 200000) 31 channel.send(longString); 32 33 setTimeout(() => sendContinuouslyMessages(channel), 0); 34 } catch(e) { 35 } 29 channel.send(longString); 30 channel.send(longString); 31 channel.send(longString); 32 channel.send(longString); 33 channel.send(longString); 34 channel.send(longString); 35 channel.send(longString); 36 channel.send(longString); 36 37 } 37 38 38 promise_test( (test) => {39 returnnew Promise((resolve, reject) => {39 promise_test(async (test) => { 40 await new Promise((resolve, reject) => { 40 41 createConnections((localConnection) => { 41 42 localChannel = localConnection.createDataChannel('sendDataChannel'); 42 localChannel.onopen = () => {43 sendContinuouslyMessages(localChannel);44 localChannel.onbufferedamountlow = () => {45 resolve();46 }43 localChannel.onopen = resolve; 44 localChannel.bufferedAmountLowThreshold = 100000; 45 }, (remoteConnection) => { 46 remoteConnection.ondatachannel = (event) => { 47 event.channel.onmessage = () => { }; 47 48 }; 48 localChannel.bufferedAmountLowThreshold = 200000;49 }, (remoteConnection) => {50 49 }); 51 setTimeout(() => reject('timed out'), 5000); 52 }).then (() => { 53 closeDataChannels(); 50 setTimeout(() => reject('timed out 1'), 5000); 54 51 }); 52 53 const promise = new Promise((resolve, reject) => { 54 localChannel.onbufferedamountlow = resolve; 55 setTimeout(() => reject('timed out 2'), 5000); 56 }); 57 sendLongMessages(localChannel); 58 await promise; 59 closeDataChannels(); 55 60 }, "Large buffer threshold reached"); 56 61 </script>
Note: See TracChangeset
for help on using the changeset viewer.