Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML> | |
| 2 <html xmlns="http://www.w3.org/1999/xhtml"> | |
|
mark a. foltz
2017/04/18 01:03:44
Spot checking the LayoutTests, I don't think we us
zhaobin
2017/04/18 03:17:10
Done.
| |
| 3 <head> | |
| 4 <title>MR Integration Basic Test</title> | |
|
mark a. foltz
2017/04/18 01:03:44
Maybe:
Media Router Integration Test - Receiver Pa
zhaobin
2017/04/18 03:17:11
Done.
| |
| 5 <script type="text/javascript"> | |
|
mark a. foltz
2017/04/18 01:03:44
Just <script>
zhaobin
2017/04/18 03:17:10
Done.
| |
| 6 const addConnection = connection => { | |
| 7 connection.onconnect = function() { | |
| 8 this.onmessage = event => { | |
| 9 if (event.data == 'close') { | |
| 10 connection.close(); | |
|
mark a. foltz
2017/04/18 01:03:44
Use |this| or |connection| consistently in the eve
zhaobin
2017/04/18 03:17:11
Done.
| |
| 11 } else { | |
| 12 connection.send('Pong: ' + event.data); | |
| 13 } | |
| 14 } | |
| 15 }; | |
| 16 }; | |
| 17 | |
| 18 navigator.presentation.receiver.connectionList | |
| 19 .then(list => { | |
| 20 list.onconnectionavailable = evt => { | |
| 21 addConnection(evt.connection); | |
| 22 }; | |
| 23 list.connections.map(connection => { | |
| 24 addConnection(connection); | |
| 25 }); | |
| 26 }); | |
| 27 </script> | |
| 28 </head> | |
| 29 <body> | |
| 30 </body> | |
| 31 </html> | |
| OLD | NEW |