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

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

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/prefs/pref_service.h"
13 #include "base/run_loop.h" 12 #include "base/run_loop.h"
14 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
15 #include "base/time/time.h" 14 #include "base/time/time.h"
16 #include "build/build_config.h" 15 #include "build/build_config.h"
17 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/chrome_notification_types.h" 17 #include "chrome/browser/chrome_notification_types.h"
19 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" 18 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
20 #include "chrome/browser/policy/profile_policy_connector.h" 19 #include "chrome/browser/policy/profile_policy_connector.h"
21 #include "chrome/browser/policy/profile_policy_connector_factory.h" 20 #include "chrome/browser/policy/profile_policy_connector_factory.h"
22 #include "chrome/browser/policy/test/local_policy_test_server.h" 21 #include "chrome/browser/policy/test/local_policy_test_server.h"
23 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
24 #include "chrome/browser/ui/browser.h" 23 #include "chrome/browser/ui/browser.h"
25 #include "chrome/test/base/in_process_browser_test.h" 24 #include "chrome/test/base/in_process_browser_test.h"
26 #include "components/invalidation/impl/fake_invalidation_service.h" 25 #include "components/invalidation/impl/fake_invalidation_service.h"
27 #include "components/invalidation/impl/profile_invalidation_provider.h" 26 #include "components/invalidation/impl/profile_invalidation_provider.h"
28 #include "components/invalidation/public/invalidation.h" 27 #include "components/invalidation/public/invalidation.h"
29 #include "components/invalidation/public/invalidation_service.h" 28 #include "components/invalidation/public/invalidation_service.h"
30 #include "components/keyed_service/core/keyed_service.h" 29 #include "components/keyed_service/core/keyed_service.h"
31 #include "components/policy/core/browser/browser_policy_connector.h" 30 #include "components/policy/core/browser/browser_policy_connector.h"
32 #include "components/policy/core/common/cloud/cloud_policy_client.h" 31 #include "components/policy/core/common/cloud/cloud_policy_client.h"
33 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 32 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
34 #include "components/policy/core/common/cloud/mock_cloud_policy_client.h" 33 #include "components/policy/core/common/cloud/mock_cloud_policy_client.h"
35 #include "components/policy/core/common/external_data_fetcher.h" 34 #include "components/policy/core/common/external_data_fetcher.h"
36 #include "components/policy/core/common/policy_map.h" 35 #include "components/policy/core/common/policy_map.h"
37 #include "components/policy/core/common/policy_service.h" 36 #include "components/policy/core/common/policy_service.h"
38 #include "components/policy/core/common/policy_switches.h" 37 #include "components/policy/core/common/policy_switches.h"
39 #include "components/policy/core/common/policy_test_utils.h" 38 #include "components/policy/core/common/policy_test_utils.h"
40 #include "components/policy/core/common/policy_types.h" 39 #include "components/policy/core/common/policy_types.h"
40 #include "components/prefs/pref_service.h"
41 #include "content/public/browser/notification_service.h" 41 #include "content/public/browser/notification_service.h"
42 #include "content/public/browser/notification_source.h" 42 #include "content/public/browser/notification_source.h"
43 #include "content/public/test/test_utils.h" 43 #include "content/public/test/test_utils.h"
44 #include "net/url_request/url_request_context_getter.h" 44 #include "net/url_request/url_request_context_getter.h"
45 #include "policy/policy_constants.h" 45 #include "policy/policy_constants.h"
46 #include "policy/proto/chrome_settings.pb.h" 46 #include "policy/proto/chrome_settings.pb.h"
47 #include "policy/proto/cloud_policy.pb.h" 47 #include "policy/proto/cloud_policy.pb.h"
48 #include "policy/proto/device_management_backend.pb.h" 48 #include "policy/proto/device_management_backend.pb.h"
49 #include "testing/gmock/include/gmock/gmock.h" 49 #include "testing/gmock/include/gmock/gmock.h"
50 #include "testing/gtest/include/gtest/gtest.h" 50 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 526
527 // They should now serialize to the same bytes. 527 // They should now serialize to the same bytes.
528 std::string chrome_settings_serialized; 528 std::string chrome_settings_serialized;
529 std::string cloud_policy_serialized; 529 std::string cloud_policy_serialized;
530 ASSERT_TRUE(chrome_settings.SerializeToString(&chrome_settings_serialized)); 530 ASSERT_TRUE(chrome_settings.SerializeToString(&chrome_settings_serialized));
531 ASSERT_TRUE(cloud_policy.SerializeToString(&cloud_policy_serialized)); 531 ASSERT_TRUE(cloud_policy.SerializeToString(&cloud_policy_serialized));
532 EXPECT_EQ(chrome_settings_serialized, cloud_policy_serialized); 532 EXPECT_EQ(chrome_settings_serialized, cloud_policy_serialized);
533 } 533 }
534 534
535 } // namespace policy 535 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugins_resource_service.cc ('k') | chrome/browser/policy/cloud/user_policy_signin_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698