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

Side by Side Diff: chrome/test/media_router/resources/common.js

Issue 2547703002: [Media Router] Handle multiple Presentation URLs when creating routes (Closed)
Patch Set: rebase Created 4 years 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * Copyright 2015 The Chromium Authors. All rights reserved. 2 * Copyright 2015 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 * 5 *
6 * @fileoverview Common APIs for presentation integration tests. 6 * @fileoverview Common APIs for presentation integration tests.
7 * 7 *
8 */ 8 */
9 9
10 var startSessionPromise = null; 10 var startSessionPromise = null;
11 var startedConnection = null; 11 var startedConnection = null;
12 var reconnectedSession = null; 12 var reconnectedSession = null;
13 var presentationUrl = null; 13 var presentationUrl = null;
14 if (window.location.href.indexOf('__is_android__=true') >= 0) { 14 if (window.location.href.indexOf('__is_android__=true') >= 0) {
15 // For android, "google.com/cast" is required in presentation URL. 15 // For android, "google.com/cast" is required in presentation URL.
16 // TODO(zqzhang): this requirement may be removed in the future. 16 // TODO(zqzhang): this requirement may be removed in the future.
17 presentationUrl = "http://google.com/cast#__castAppId__=CCCCCCCC/"; 17 presentationUrl = "https://google.com/cast#__castAppId__=CCCCCCCC/";
18 } else { 18 } else {
19 presentationUrl = "http://www.google.com/#__testprovider__=true"; 19 presentationUrl = "http://www.google.com/#__testprovider__=true";
20 } 20 }
21 var startSessionRequest = new PresentationRequest(presentationUrl); 21 var startSessionRequest = new PresentationRequest(presentationUrl);
22 var defaultRequestSessionId = null; 22 var defaultRequestSessionId = null;
23 var lastExecutionResult = null; 23 var lastExecutionResult = null;
24 var useDomAutomationController = !!window.domAutomationController; 24 var useDomAutomationController = !!window.domAutomationController;
25 25
26 window.navigator.presentation.defaultRequest = startSessionRequest; 26 window.navigator.presentation.defaultRequest = startSessionRequest;
27 window.navigator.presentation.defaultRequest.onconnectionavailable = function(e) 27 window.navigator.presentation.defaultRequest.onconnectionavailable = function(e)
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 passed: passed, 223 passed: passed,
224 errorMessage: errorMessage 224 errorMessage: errorMessage
225 })); 225 }));
226 } else { 226 } else {
227 lastExecutionResult = JSON.stringify({ 227 lastExecutionResult = JSON.stringify({
228 passed: passed, 228 passed: passed,
229 errorMessage: errorMessage 229 errorMessage: errorMessage
230 }); 230 });
231 } 231 }
232 } 232 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698