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

Side by Side Diff: components/policy/core/common/cloud/component_cloud_policy_updater_unittest.cc

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "components/policy/core/common/cloud/component_cloud_policy_updater.h" 5 #include "components/policy/core/common/cloud/component_cloud_policy_updater.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 public: 59 public:
60 virtual ~MockComponentCloudPolicyStoreDelegate() {} 60 virtual ~MockComponentCloudPolicyStoreDelegate() {}
61 61
62 MOCK_METHOD0(OnComponentCloudPolicyStoreUpdated, void()); 62 MOCK_METHOD0(OnComponentCloudPolicyStoreUpdated, void());
63 }; 63 };
64 64
65 } // namespace 65 } // namespace
66 66
67 class ComponentCloudPolicyUpdaterTest : public testing::Test { 67 class ComponentCloudPolicyUpdaterTest : public testing::Test {
68 protected: 68 protected:
69 virtual void SetUp() override; 69 void SetUp() override;
70 virtual void TearDown() override; 70 void TearDown() override;
71 71
72 scoped_ptr<em::PolicyFetchResponse> CreateResponse(); 72 scoped_ptr<em::PolicyFetchResponse> CreateResponse();
73 73
74 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; 74 scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
75 base::ScopedTempDir temp_dir_; 75 base::ScopedTempDir temp_dir_;
76 scoped_ptr<ResourceCache> cache_; 76 scoped_ptr<ResourceCache> cache_;
77 scoped_ptr<ComponentCloudPolicyStore> store_; 77 scoped_ptr<ComponentCloudPolicyStore> store_;
78 MockComponentCloudPolicyStoreDelegate store_delegate_; 78 MockComponentCloudPolicyStoreDelegate store_delegate_;
79 net::TestURLFetcherFactory fetcher_factory_; 79 net::TestURLFetcherFactory fetcher_factory_;
80 scoped_ptr<ExternalPolicyDataFetcherBackend> fetcher_backend_; 80 scoped_ptr<ExternalPolicyDataFetcherBackend> fetcher_backend_;
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // Now cancel that update before the download completes. 347 // Now cancel that update before the download completes.
348 EXPECT_CALL(store_delegate_, OnComponentCloudPolicyStoreUpdated()).Times(0); 348 EXPECT_CALL(store_delegate_, OnComponentCloudPolicyStoreUpdated()).Times(0);
349 updater_->CancelUpdate( 349 updater_->CancelUpdate(
350 PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, kTestExtension)); 350 PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, kTestExtension));
351 task_runner_->RunUntilIdle(); 351 task_runner_->RunUntilIdle();
352 Mock::VerifyAndClearExpectations(&store_delegate_); 352 Mock::VerifyAndClearExpectations(&store_delegate_);
353 EXPECT_FALSE(fetcher_factory_.GetFetcherByID(0)); 353 EXPECT_FALSE(fetcher_factory_.GetFetcherByID(0));
354 } 354 }
355 355
356 } // namespace policy 356 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698