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 | |
72 private: | 70 private: |
73 void InitializeWebContents(); | 71 void InitializeWebContents(); |
74 | 72 |
75 void set_web_contents(content::WebContents* web_contents) { | 73 void set_web_contents(content::WebContents* web_contents) { |
76 web_contents_ = web_contents; | 74 web_contents_ = web_contents; |
77 } | 75 } |
78 | 76 |
79 MockLoginUtils* mock_login_utils_; | 77 MockLoginUtils* mock_login_utils_; |
80 bool should_launch_browser_; | 78 bool should_launch_browser_; |
81 content::WebContents* web_contents_; | 79 content::WebContents* web_contents_; |
82 test::JSChecker js_checker_; | 80 test::JSChecker js_checker_; |
83 | 81 |
84 DISALLOW_COPY_AND_ASSIGN(LoginManagerTest); | 82 DISALLOW_COPY_AND_ASSIGN(LoginManagerTest); |
85 }; | 83 }; |
86 | 84 |
87 } // namespace chromeos | 85 } // namespace chromeos |
88 | 86 |
89 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ | 87 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ |
OLD | NEW |