| 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_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/chromeos/login/mixin_based_browser_test.h" | 10 #include "chrome/browser/chromeos/login/mixin_based_browser_test.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 void AddUser(const std::string& user_id); | 60 void AddUser(const std::string& user_id); |
| 61 | 61 |
| 62 // Executes given JS |expression| in |web_contents_| and checks | 62 // Executes given JS |expression| in |web_contents_| and checks |
| 63 // that it is true. | 63 // that it is true. |
| 64 void JSExpect(const std::string& expression); | 64 void JSExpect(const std::string& expression); |
| 65 | 65 |
| 66 MockLoginUtils& login_utils() { return *mock_login_utils_; } | 66 MockLoginUtils& login_utils() { return *mock_login_utils_; } |
| 67 | 67 |
| 68 content::WebContents* web_contents() { return web_contents_; } | 68 content::WebContents* web_contents() { return web_contents_; } |
| 69 | 69 |
| 70 test::JSChecker& js_checker() { return js_checker_; } |
| 71 |
| 70 private: | 72 private: |
| 71 void InitializeWebContents(); | 73 void InitializeWebContents(); |
| 72 | 74 |
| 73 void set_web_contents(content::WebContents* web_contents) { | 75 void set_web_contents(content::WebContents* web_contents) { |
| 74 web_contents_ = web_contents; | 76 web_contents_ = web_contents; |
| 75 } | 77 } |
| 76 | 78 |
| 77 MockLoginUtils* mock_login_utils_; | 79 MockLoginUtils* mock_login_utils_; |
| 78 bool should_launch_browser_; | 80 bool should_launch_browser_; |
| 79 content::WebContents* web_contents_; | 81 content::WebContents* web_contents_; |
| 80 test::JSChecker js_checker_; | 82 test::JSChecker js_checker_; |
| 81 | 83 |
| 82 DISALLOW_COPY_AND_ASSIGN(LoginManagerTest); | 84 DISALLOW_COPY_AND_ASSIGN(LoginManagerTest); |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 } // namespace chromeos | 87 } // namespace chromeos |
| 86 | 88 |
| 87 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ | 89 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ |
| OLD | NEW |