| 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..9508056248c82fa04103e567a46e4fd39f9260d6
|
| --- /dev/null
|
| +++ b/chrome/test/media_router/resources/presentation_receiver.html
|
| @@ -0,0 +1,31 @@
|
| +<!DOCTYPE HTML>
|
| +<html>
|
| + <head>
|
| + <title>Media Router Integration Test - Receiver Page</title>
|
| + <script>
|
| + const addConnection = connection => {
|
| + connection.onconnect = () => {
|
| + connection.onmessage = event => {
|
| + if (event.data == 'close') {
|
| + connection.close();
|
| + } 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>
|
|
|