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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 // Callback used by WaitForConnection to check whether the connection | 307 // Callback used by WaitForConnection to check whether the connection |
308 // has been established. | 308 // has been established. |
309 bool IsSessionConnected(); | 309 bool IsSessionConnected(); |
310 | 310 |
311 // Callback used by Approve to check whether the chromoting app has | 311 // Callback used by Approve to check whether the chromoting app has |
312 // successfully authenticated with the Google services. | 312 // successfully authenticated with the Google services. |
313 bool IsAuthenticated() { | 313 bool IsAuthenticated() { |
314 return IsAuthenticatedInWindow(active_web_contents()); | 314 return IsAuthenticatedInWindow(active_web_contents()); |
315 } | 315 } |
316 | 316 |
| 317 // Callback used by Approve to check whether the Accept button is enabled |
| 318 // and ready to receive a click. |
| 319 bool IsEnabled(const std::string& name) { |
| 320 return !ExecuteScriptAndExtractBool( |
| 321 active_web_contents(), |
| 322 "document.getElementById(\"" + name + "\").disabled"); |
| 323 } |
| 324 |
317 // If the "Host version out-of-date" form is visible, dismiss it. | 325 // If the "Host version out-of-date" form is visible, dismiss it. |
318 void DismissHostVersionWarningIfVisible(); | 326 void DismissHostVersionWarningIfVisible(); |
319 | 327 |
320 // Callback used by Approve to check whether the chromoting app has | 328 // Callback used by Approve to check whether the chromoting app has |
321 // successfully authenticated with the Google services. | 329 // successfully authenticated with the Google services. |
322 static bool IsAuthenticatedInWindow(content::WebContents* web_contents); | 330 static bool IsAuthenticatedInWindow(content::WebContents* web_contents); |
323 | 331 |
324 // Callback used to check whether a host action is completed. | 332 // Callback used to check whether a host action is completed. |
325 // Used by browser tests while conditionally waiting for host actions. | 333 // Used by browser tests while conditionally waiting for host actions. |
326 static bool IsHostActionComplete( | 334 static bool IsHostActionComplete( |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 std::string password_; | 370 std::string password_; |
363 std::string me2me_pin_; | 371 std::string me2me_pin_; |
364 std::string remote_host_name_; | 372 std::string remote_host_name_; |
365 std::string extension_name_; | 373 std::string extension_name_; |
366 std::string http_server_; | 374 std::string http_server_; |
367 }; | 375 }; |
368 | 376 |
369 } // namespace remoting | 377 } // namespace remoting |
370 | 378 |
371 #endif // CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ | 379 #endif // CHROME_TEST_REMOTING_REMOTE_DESKTOP_BROWSERTEST_H_ |
OLD | NEW |