OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ | 5 #ifndef CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ |
6 #define CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ | 6 #define CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ |
7 | 7 |
8 #include "base/debug/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
9 #include "chrome/browser/apps/app_browsertest_util.h" | 9 #include "chrome/browser/apps/app_browsertest_util.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // Whether to perform the cleanup tasks (uninstalling chromoting, etc). | 216 // Whether to perform the cleanup tasks (uninstalling chromoting, etc). |
217 // This is useful for diagnostic purposes. | 217 // This is useful for diagnostic purposes. |
218 bool NoCleanup() { return no_cleanup_; } | 218 bool NoCleanup() { return no_cleanup_; } |
219 | 219 |
220 // Whether to install the chromoting extension before running the test cases. | 220 // Whether to install the chromoting extension before running the test cases. |
221 // This is useful for diagnostic purposes. | 221 // This is useful for diagnostic purposes. |
222 bool NoInstall() { return no_install_; } | 222 bool NoInstall() { return no_install_; } |
223 | 223 |
224 // Helper to construct the starting URL of the installed chromoting webapp. | 224 // Helper to construct the starting URL of the installed chromoting webapp. |
225 GURL Chromoting_Main_URL() { | 225 GURL Chromoting_Main_URL() { |
226 return GURL("chrome-extension://" + ChromotingID() + "/main.html"); | 226 if (is_platform_app()) |
| 227 // The v2 remoting app recently (M38 at the latest) started adding a |
| 228 // query-string parameter to the main extension page. So we'll create a |
| 229 // different expected URL for it. |
| 230 return GURL("chrome-extension://" + ChromotingID() + |
| 231 "/main.html?isKioskSession=false"); |
| 232 else |
| 233 return GURL("chrome-extension://" + ChromotingID() + "/main.html"); |
227 } | 234 } |
228 | 235 |
229 // Helper to retrieve the current URL in the active WebContents. | 236 // Helper to retrieve the current URL in the active WebContents. |
230 GURL GetCurrentURL() { | 237 GURL GetCurrentURL() { |
231 return active_web_contents()->GetURL(); | 238 return active_web_contents()->GetURL(); |
232 } | 239 } |
233 | 240 |
234 // Helpers to execute JavaScript code on a web page. | 241 // Helpers to execute JavaScript code on a web page. |
235 | 242 |
236 // Helper to execute a JavaScript code snippet in the active WebContents. | 243 // Helper to execute a JavaScript code snippet in the active WebContents. |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 std::string password_; | 379 std::string password_; |
373 std::string me2me_pin_; | 380 std::string me2me_pin_; |
374 std::string remote_host_name_; | 381 std::string remote_host_name_; |
375 std::string extension_name_; | 382 std::string extension_name_; |
376 std::string http_server_; | 383 std::string http_server_; |
377 }; | 384 }; |
378 | 385 |
379 } // namespace remoting | 386 } // namespace remoting |
380 | 387 |
381 #endif // CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ | 388 #endif // CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ |
OLD | NEW |