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

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

Issue 2820433003: [Presentation API] Add browser tests for 1-UA mode (Closed)
Patch Set: 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
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">
+ <head>
+ <title>MR Integration Basic Test</title>
+ <script type="text/javascript">
+ const addConnection = connection => {
+ connection.onconnect = function() {
+ this.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>
« chrome/test/media_router/resources/common.js ('K') | « 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