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

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

Issue 2534883002: Extract ArcTermsOfServiceNegotiator implementation. (Closed)
Patch Set: Address comments Created 4 years 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
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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 3938 matching lines...) Expand 10 before | Expand all | Expand 10 after
3949 class ArcPolicyTest : public PolicyTest { 3949 class ArcPolicyTest : public PolicyTest {
3950 public: 3950 public:
3951 ArcPolicyTest() {} 3951 ArcPolicyTest() {}
3952 ~ArcPolicyTest() override {} 3952 ~ArcPolicyTest() override {}
3953 3953
3954 protected: 3954 protected:
3955 void SetUpTest() { 3955 void SetUpTest() {
3956 arc::ArcSessionManager::DisableUIForTesting(); 3956 arc::ArcSessionManager::DisableUIForTesting();
3957 3957
3958 browser()->profile()->GetPrefs()->SetBoolean(prefs::kArcSignedIn, true); 3958 browser()->profile()->GetPrefs()->SetBoolean(prefs::kArcSignedIn, true);
3959 browser()->profile()->GetPrefs()->SetBoolean(prefs::kArcTermsAccepted,
3960 true);
3959 } 3961 }
3960 3962
3961 void TearDownTest() { arc::ArcSessionManager::Get()->Shutdown(); } 3963 void TearDownTest() { arc::ArcSessionManager::Get()->Shutdown(); }
3962 3964
3963 void SetUpInProcessBrowserTestFixture() override { 3965 void SetUpInProcessBrowserTestFixture() override {
3964 PolicyTest::SetUpInProcessBrowserTestFixture(); 3966 PolicyTest::SetUpInProcessBrowserTestFixture();
3965 fake_session_manager_client_ = new chromeos::FakeSessionManagerClient; 3967 fake_session_manager_client_ = new chromeos::FakeSessionManagerClient;
3966 fake_session_manager_client_->set_arc_available(true); 3968 fake_session_manager_client_->set_arc_available(true);
3967 chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( 3969 chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient(
3968 std::unique_ptr<chromeos::SessionManagerClient>( 3970 std::unique_ptr<chromeos::SessionManagerClient>(
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
4226 4228
4227 SetEmptyPolicy(); 4229 SetEmptyPolicy();
4228 // Policy not set. 4230 // Policy not set.
4229 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); 4231 CheckSystemTimezoneAutomaticDetectionPolicyUnset();
4230 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); 4232 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false));
4231 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); 4233 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests());
4232 } 4234 }
4233 #endif // defined(OS_CHROMEOS) 4235 #endif // defined(OS_CHROMEOS)
4234 4236
4235 } // namespace policy 4237 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698