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

Side by Side Diff: chrome/browser/policy/auto_enrollment_client_unittest.cc

Issue 11759019: Update other unittests to use newly added TestingBrowserProcess::GetGlobal(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simpler codez Created 7 years, 11 months 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) 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 "chrome/browser/policy/auto_enrollment_client.h" 5 #include "chrome/browser/policy/auto_enrollment_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 18 matching lines...) Expand all
29 "\x6f\x02\x4a\xd7\xeb\x92\x45\xfc\xd4\xe4\x37\xa1\x55\x2b\x13\x8a"; 29 "\x6f\x02\x4a\xd7\xeb\x92\x45\xfc\xd4\xe4\x37\xa1\x55\x2b\x13\x8a";
30 30
31 using ::testing::InSequence; 31 using ::testing::InSequence;
32 using ::testing::SaveArg; 32 using ::testing::SaveArg;
33 using ::testing::_; 33 using ::testing::_;
34 34
35 class AutoEnrollmentClientTest : public testing::Test { 35 class AutoEnrollmentClientTest : public testing::Test {
36 protected: 36 protected:
37 AutoEnrollmentClientTest() 37 AutoEnrollmentClientTest()
38 : scoped_testing_local_state_( 38 : scoped_testing_local_state_(
39 static_cast<TestingBrowserProcess*>(g_browser_process)), 39 TestingBrowserProcess::GetGlobal()),
40 local_state_(scoped_testing_local_state_.Get()), 40 local_state_(scoped_testing_local_state_.Get()),
41 service_(NULL), 41 service_(NULL),
42 completion_callback_count_(0) {} 42 completion_callback_count_(0) {}
43 43
44 virtual void SetUp() OVERRIDE { 44 virtual void SetUp() OVERRIDE {
45 CreateClient(kSerial, 4, 8); 45 CreateClient(kSerial, 4, 8);
46 ASSERT_FALSE(local_state_->GetUserPref(prefs::kShouldAutoEnroll)); 46 ASSERT_FALSE(local_state_->GetUserPref(prefs::kShouldAutoEnroll));
47 ASSERT_FALSE(local_state_->GetUserPref(prefs::kAutoEnrollmentPowerLimit)); 47 ASSERT_FALSE(local_state_->GetUserPref(prefs::kAutoEnrollmentPowerLimit));
48 } 48 }
49 49
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 CreateClient(kSerial, 5, 10); 315 CreateClient(kSerial, 5, 10);
316 ServerWillReply(-1, true, true); 316 ServerWillReply(-1, true, true);
317 client_->Start(); 317 client_->Start();
318 EXPECT_TRUE(client_->should_auto_enroll()); 318 EXPECT_TRUE(client_->should_auto_enroll());
319 EXPECT_EQ(1, completion_callback_count_); 319 EXPECT_EQ(1, completion_callback_count_);
320 } 320 }
321 321
322 } // namespace 322 } // namespace
323 323
324 } // namespace policy 324 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/history/android/sqlite_cursor_unittest.cc ('k') | chrome/browser/policy/cloud_policy_subsystem_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698