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

Side by Side Diff: content/test/data/media/peerconnection-call.html

Issue 12255004: Remove workaround in WebrtcBrowserTest.CallWithDataAndMedia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed code review comment. Created 7 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript"> 3 <script type="text/javascript">
4 $ = function(id) { 4 $ = function(id) {
5 return document.getElementById(id); 5 return document.getElementById(id);
6 }; 6 };
7 7
8 var gFirstConnection = null; 8 var gFirstConnection = null;
9 var gSecondConnection = null; 9 var gSecondConnection = null;
10 var gTestWithoutMsidAndBundle = false; 10 var gTestWithoutMsidAndBundle = false;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 eventOccured(); 98 eventOccured();
99 } 99 }
100 100
101 // Event handler for when |gSecondConnection| receive a new dataChannel. 101 // Event handler for when |gSecondConnection| receive a new dataChannel.
102 gSecondConnection.ondatachannel = function (event) { 102 gSecondConnection.ondatachannel = function (event) {
103 var secondDataChannel = event.channel; 103 var secondDataChannel = event.channel;
104 104
105 // When |secondDataChannel| receive a message, send a message back. 105 // When |secondDataChannel| receive a message, send a message back.
106 secondDataChannel.onmessage = function(event) { 106 secondDataChannel.onmessage = function(event) {
107 expectEquals(event.data, sendDataString); 107 expectEquals(event.data, sendDataString);
108 // TODO(perkj): Currently we sometimes can't send a message here since 108 expectEquals('open', secondDataChannel.readyState);
109 // the the |dataChannel.readyState| has not transitioned to open yet. 109 secondDataChannel.send(sendDataString);
110 // http://code.google.com/p/webrtc/issues/detail?id=1262
111 if (secondDataChannel.readyState == "open") {
112 secondDataChannel.send(sendDataString);
113 } else {
114 secondDataChannel.onopen = function(event) {
115 expectEquals('open', secondDataChannel.readyState);
116 secondDataChannel.send(sendDataString);
117 }
118 }
119 } 110 }
120 } 111 }
121 } 112 }
122 113
123 function failedCallback(error) { 114 function failedCallback(error) {
124 document.title = 'getUserMedia request failed with code ' + error.code; 115 document.title = 'getUserMedia request failed with code ' + error.code;
125 } 116 }
126 117
127 function okCallback(localStream) { 118 function okCallback(localStream) {
128 var localStreamUrl = webkitURL.createObjectURL(localStream); 119 var localStreamUrl = webkitURL.createObjectURL(localStream);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 autoplay="autoplay"></video></td> 269 autoplay="autoplay"></video></td>
279 <td><canvas width="320" height="240" id="canvas"></canvas></td> 270 <td><canvas width="320" height="240" id="canvas"></canvas></td>
280 </tr> 271 </tr>
281 <tr> 272 <tr>
282 <td colspan="3">You should see the same animated feed in all three 273 <td colspan="3">You should see the same animated feed in all three
283 displays (the canvas will lag a bit). 274 displays (the canvas will lag a bit).
284 </td> 275 </td>
285 </table> 276 </table>
286 </body> 277 </body>
287 </html> 278 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698