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

Side by Side Diff: chrome/browser/policy/cloud/component_cloud_policy_updater_unittest.cc

Issue 78763002: Move PolicyMap and its dependencies to components/policy/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export nested struct Created 7 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 | Annotate | Revision Log
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 "chrome/browser/policy/cloud/component_cloud_policy_updater.h" 5 #include "chrome/browser/policy/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"
11 #include "base/sha1.h" 11 #include "base/sha1.h"
12 #include "base/test/test_simple_task_runner.h" 12 #include "base/test/test_simple_task_runner.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" 14 #include "chrome/browser/policy/cloud/cloud_policy_constants.h"
15 #include "chrome/browser/policy/cloud/component_cloud_policy_store.h" 15 #include "chrome/browser/policy/cloud/component_cloud_policy_store.h"
16 #include "chrome/browser/policy/cloud/external_policy_data_fetcher.h" 16 #include "chrome/browser/policy/cloud/external_policy_data_fetcher.h"
17 #include "chrome/browser/policy/cloud/policy_builder.h" 17 #include "chrome/browser/policy/cloud/policy_builder.h"
18 #include "chrome/browser/policy/cloud/resource_cache.h" 18 #include "chrome/browser/policy/cloud/resource_cache.h"
19 #include "chrome/browser/policy/external_data_fetcher.h"
20 #include "chrome/browser/policy/policy_bundle.h" 19 #include "chrome/browser/policy/policy_bundle.h"
21 #include "chrome/browser/policy/policy_map.h"
22 #include "chrome/browser/policy/policy_types.h"
23 #include "chrome/browser/policy/proto/cloud/chrome_extension_policy.pb.h" 20 #include "chrome/browser/policy/proto/cloud/chrome_extension_policy.pb.h"
24 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" 21 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h"
22 #include "components/policy/core/common/external_data_fetcher.h"
23 #include "components/policy/core/common/policy_map.h"
24 #include "components/policy/core/common/policy_types.h"
25 #include "net/url_request/test_url_fetcher_factory.h" 25 #include "net/url_request/test_url_fetcher_factory.h"
26 #include "net/url_request/url_fetcher_delegate.h" 26 #include "net/url_request/url_fetcher_delegate.h"
27 #include "net/url_request/url_request_context_getter.h" 27 #include "net/url_request/url_request_context_getter.h"
28 #include "testing/gmock/include/gmock/gmock.h" 28 #include "testing/gmock/include/gmock/gmock.h"
29 #include "testing/gtest/include/gtest/gtest.h" 29 #include "testing/gtest/include/gtest/gtest.h"
30 #include "url/gurl.h" 30 #include "url/gurl.h"
31 31
32 namespace em = enterprise_management; 32 namespace em = enterprise_management;
33 33
34 using testing::Mock; 34 using testing::Mock;
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // Now cancel that update before the download completes. 341 // Now cancel that update before the download completes.
342 EXPECT_CALL(store_delegate_, OnComponentCloudPolicyStoreUpdated()).Times(0); 342 EXPECT_CALL(store_delegate_, OnComponentCloudPolicyStoreUpdated()).Times(0);
343 updater_->CancelUpdate( 343 updater_->CancelUpdate(
344 PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, kTestExtension)); 344 PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, kTestExtension));
345 task_runner_->RunUntilIdle(); 345 task_runner_->RunUntilIdle();
346 Mock::VerifyAndClearExpectations(&store_delegate_); 346 Mock::VerifyAndClearExpectations(&store_delegate_);
347 EXPECT_FALSE(fetcher_factory_.GetFetcherByID(0)); 347 EXPECT_FALSE(fetcher_factory_.GetFetcherByID(0));
348 } 348 }
349 349
350 } // namespace policy 350 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698