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

Unified Diff: chrome/test/media_router/resources/presentation_receiver.html

Issue 2820433003: [Presentation API] Add browser tests for 1-UA mode (Closed)
Patch Set: fix android test failures Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/media_router/resources/common.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « chrome/test/media_router/resources/common.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698