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

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

Issue 2148643002: [Presentation API] Adds DOMString[] constructor to PresentationRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix LayoutTests Created 4 years, 5 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 unified diff | Download patch
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 = "http://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)
28 { 28 {
29 defaultRequestSessionId = e.connection.id; 29 defaultRequestSessionId = e.connection.id;
30 }; 30 };
31 31
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 passed: passed, 212 passed: passed,
213 errorMessage: errorMessage 213 errorMessage: errorMessage
214 })); 214 }));
215 } else { 215 } else {
216 lastExecutionResult = JSON.stringify({ 216 lastExecutionResult = JSON.stringify({
217 passed: passed, 217 passed: passed,
218 errorMessage: errorMessage 218 errorMessage: errorMessage
219 }); 219 });
220 } 220 }
221 } 221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698