Chromium Code Reviews| Index: chrome/test/media_router/resources/presentation_receiver.html |
| diff --git a/chrome/test/media_router/resources/presentation_receiver.html b/chrome/test/media_router/resources/presentation_receiver.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..941a4512904ecd699b6953718b09cb9ff6d8e80d |
| --- /dev/null |
| +++ b/chrome/test/media_router/resources/presentation_receiver.html |
| @@ -0,0 +1,31 @@ |
| +<!DOCTYPE HTML> |
| +<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.
|
| + <head> |
| + <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.
|
| + <script type="text/javascript"> |
|
mark a. foltz
2017/04/18 01:03:44
Just <script>
zhaobin
2017/04/18 03:17:10
Done.
|
| + const addConnection = connection => { |
| + connection.onconnect = function() { |
| + this.onmessage = event => { |
| + if (event.data == 'close') { |
| + 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.
|
| + } else { |
| + connection.send('Pong: ' + event.data); |
| + } |
| + } |
| + }; |
| + }; |
| + |
| + navigator.presentation.receiver.connectionList |
| + .then(list => { |
| + list.onconnectionavailable = evt => { |
| + addConnection(evt.connection); |
| + }; |
| + list.connections.map(connection => { |
| + addConnection(connection); |
| + }); |
| + }); |
| + </script> |
| + </head> |
| + <body> |
| + </body> |
| +</html> |