Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(837)

Side by Side Diff: chrome/browser/chromeos/login/login_browsertest.cc

Issue 8499021: UserPolicyCache only becomes ready after policy has been fetched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/time.h" 6 #include "base/time.h"
7 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" 7 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h"
8 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" 8 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h"
9 #include "chrome/browser/chromeos/cros/mock_library_loader.h" 9 #include "chrome/browser/chromeos/cros/mock_library_loader.h"
10 #include "chrome/browser/chromeos/cros/mock_network_library.h" 10 #include "chrome/browser/chromeos/cros/mock_network_library.h"
11 #include "chrome/browser/chromeos/cros/mock_power_library.h" 11 #include "chrome/browser/chromeos/cros/mock_power_library.h"
12 #include "chrome/browser/chromeos/cros/mock_screen_lock_library.h" 12 #include "chrome/browser/chromeos/cros/mock_screen_lock_library.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "chrome/test/base/in_process_browser_test.h" 16 #include "chrome/test/base/in_process_browser_test.h"
17 #include "chrome/test/base/ui_test_utils.h" 17 #include "chrome/test/base/ui_test_utils.h"
18 #include "testing/gmock/include/gmock/gmock.h" 18 #include "testing/gmock/include/gmock/gmock.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 20
21 namespace chromeos { 21 namespace chromeos {
22 using ::testing::_; 22 using ::testing::_;
23 using ::testing::AnyNumber;
24 using ::testing::InvokeWithoutArgs;
25 using ::testing::NiceMock;
26 using ::testing::Return; 23 using ::testing::Return;
27 using ::testing::ReturnRef;
28 24
29 class LoginTestBase : public CrosInProcessBrowserTest { 25 class LoginTestBase : public CrosInProcessBrowserTest {
30 public: 26 public:
31 LoginTestBase() : mock_cryptohome_library_(NULL), 27 LoginTestBase() : mock_cryptohome_library_(NULL),
32 mock_screen_lock_library_(NULL) { 28 mock_screen_lock_library_(NULL) {
33 } 29 }
34 30
35 protected: 31 protected:
36 virtual void SetUpInProcessBrowserTestFixture() { 32 virtual void SetUpInProcessBrowserTestFixture() {
37 cros_mock_->InitStatusAreaMocks(); 33 cros_mock_->InitStatusAreaMocks();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // On initial launch, we should get the OTR default profile. 82 // On initial launch, we should get the OTR default profile.
87 IN_PROC_BROWSER_TEST_F(LoginProfileTest, UserNotPassed) { 83 IN_PROC_BROWSER_TEST_F(LoginProfileTest, UserNotPassed) {
88 Profile* profile = browser()->profile(); 84 Profile* profile = browser()->profile();
89 EXPECT_EQ("Default", profile->GetPath().BaseName().value()); 85 EXPECT_EQ("Default", profile->GetPath().BaseName().value());
90 EXPECT_TRUE(profile->IsOffTheRecord()); 86 EXPECT_TRUE(profile->IsOffTheRecord());
91 // Ensure there's extension service for this profile. 87 // Ensure there's extension service for this profile.
92 EXPECT_TRUE(profile->GetExtensionService()); 88 EXPECT_TRUE(profile->GetExtensionService());
93 } 89 }
94 90
95 } // namespace chromeos 91 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698