| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ash/shell.h" | 5 #include "ash/shell.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "chrome/browser/chrome_browser_main.h" | 7 #include "chrome/browser/chrome_browser_main.h" |
| 8 #include "chrome/browser/chrome_browser_main_extra_parts.h" | 8 #include "chrome/browser/chrome_browser_main_extra_parts.h" |
| 9 #include "chrome/browser/chrome_content_browser_client.h" | 9 #include "chrome/browser/chrome_content_browser_client.h" |
| 10 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 10 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
| 30 | 30 |
| 31 using ::testing::_; | 31 using ::testing::_; |
| 32 using ::testing::AnyNumber; | 32 using ::testing::AnyNumber; |
| 33 using ::testing::Return; | 33 using ::testing::Return; |
| 34 | 34 |
| 35 namespace { | 35 namespace { |
| 36 | 36 |
| 37 class LoginTestBase : public chromeos::CrosInProcessBrowserTest { | 37 class LoginTestBase : public chromeos::CrosInProcessBrowserTest { |
| 38 public: | 38 public: |
| 39 LoginTestBase() | 39 LoginTestBase() {} |
| 40 : mock_cryptohome_library_(NULL) { | |
| 41 } | |
| 42 | 40 |
| 43 protected: | 41 protected: |
| 44 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 42 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
| 45 mock_cryptohome_library_.reset(new chromeos::MockCryptohomeLibrary()); | 43 mock_cryptohome_library_.reset(new chromeos::MockCryptohomeLibrary()); |
| 46 cros_mock_->InitStatusAreaMocks(); | 44 cros_mock_->InitStatusAreaMocks(); |
| 47 cros_mock_->SetStatusAreaMocksExpectations(); | 45 cros_mock_->SetStatusAreaMocksExpectations(); |
| 48 EXPECT_CALL(*(mock_cryptohome_library_.get()), GetSystemSalt()) | 46 EXPECT_CALL(*(mock_cryptohome_library_.get()), GetSystemSalt()) |
| 49 .WillRepeatedly(Return(std::string("stub_system_salt"))); | 47 .WillRepeatedly(Return(std::string("stub_system_salt"))); |
| 50 EXPECT_CALL(*(mock_cryptohome_library_.get()), InstallAttributesIsReady()) | 48 EXPECT_CALL(*(mock_cryptohome_library_.get()), InstallAttributesIsReady()) |
| 51 .WillRepeatedly(Return(false)); | 49 .WillRepeatedly(Return(false)); |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // Verifies that the webui for login comes up successfully. | 206 // Verifies that the webui for login comes up successfully. |
| 209 IN_PROC_BROWSER_TEST_F(LoginSigninTest, WebUIVisible) { | 207 IN_PROC_BROWSER_TEST_F(LoginSigninTest, WebUIVisible) { |
| 210 scoped_refptr<content::MessageLoopRunner> runner = | 208 scoped_refptr<content::MessageLoopRunner> runner = |
| 211 new content::MessageLoopRunner; | 209 new content::MessageLoopRunner; |
| 212 content_browser_client_->browser_main_extra_parts_->set_quit_task( | 210 content_browser_client_->browser_main_extra_parts_->set_quit_task( |
| 213 runner->QuitClosure()); | 211 runner->QuitClosure()); |
| 214 runner->Run(); | 212 runner->Run(); |
| 215 } | 213 } |
| 216 | 214 |
| 217 } | 215 } |
| OLD | NEW |