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

Side by Side Diff: chrome/browser/chromeos/policy/cloud_external_data_manager_base_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, 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/chromeos/policy/cloud_external_data_manager_base.h" 5 #include "chrome/browser/chromeos/policy/cloud_external_data_manager_base.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/files/scoped_temp_dir.h" 12 #include "base/files/scoped_temp_dir.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/message_loop/message_loop_proxy.h" 14 #include "base/message_loop/message_loop_proxy.h"
15 #include "base/run_loop.h" 15 #include "base/run_loop.h"
16 #include "base/sha1.h" 16 #include "base/sha1.h"
17 #include "base/stl_util.h" 17 #include "base/stl_util.h"
18 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
19 #include "base/test/test_simple_task_runner.h" 19 #include "base/test/test_simple_task_runner.h"
20 #include "base/values.h" 20 #include "base/values.h"
21 #include "chrome/browser/chromeos/policy/cloud_external_data_store.h" 21 #include "chrome/browser/chromeos/policy/cloud_external_data_store.h"
22 #include "chrome/browser/policy/cloud/mock_cloud_policy_store.h" 22 #include "chrome/browser/policy/cloud/mock_cloud_policy_store.h"
23 #include "chrome/browser/policy/cloud/resource_cache.h" 23 #include "chrome/browser/policy/cloud/resource_cache.h"
24 #include "chrome/browser/policy/external_data_fetcher.h"
25 #include "chrome/browser/policy/policy_map.h"
26 #include "chrome/browser/policy/policy_types.h"
27 #include "chrome/browser/policy/test/policy_test_utils.h" 24 #include "chrome/browser/policy/test/policy_test_utils.h"
25 #include "components/policy/core/common/external_data_fetcher.h"
26 #include "components/policy/core/common/policy_map.h"
27 #include "components/policy/core/common/policy_types.h"
28 #include "net/http/http_status_code.h" 28 #include "net/http/http_status_code.h"
29 #include "net/url_request/test_url_fetcher_factory.h" 29 #include "net/url_request/test_url_fetcher_factory.h"
30 #include "net/url_request/url_fetcher.h" 30 #include "net/url_request/url_fetcher.h"
31 #include "net/url_request/url_fetcher_delegate.h" 31 #include "net/url_request/url_fetcher_delegate.h"
32 #include "net/url_request/url_request_status.h" 32 #include "net/url_request/url_request_status.h"
33 #include "net/url_request/url_request_test_util.h" 33 #include "net/url_request/url_request_test_util.h"
34 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
35 #include "url/gurl.h" 35 #include "url/gurl.h"
36 36
37 namespace policy { 37 namespace policy {
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 ConstructMetadata(k20BytePolicyURL, base::SHA1HashString(k10ByteData))); 745 ConstructMetadata(k20BytePolicyURL, base::SHA1HashString(k10ByteData)));
746 cloud_policy_store_.NotifyStoreLoaded(); 746 cloud_policy_store_.NotifyStoreLoaded();
747 base::RunLoop().RunUntilIdle(); 747 base::RunLoop().RunUntilIdle();
748 EXPECT_EQ(1u, callback_data_.size()); 748 EXPECT_EQ(1u, callback_data_.size());
749 ASSERT_TRUE(callback_data_[1]); 749 ASSERT_TRUE(callback_data_[1]);
750 EXPECT_EQ(k10ByteData, *callback_data_[1]); 750 EXPECT_EQ(k10ByteData, *callback_data_[1]);
751 ResetCallbackData(); 751 ResetCallbackData();
752 } 752 }
753 753
754 } // namespace policy 754 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698