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

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

Issue 15701022: [Sync] Add support for sync Persistence Errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move bookmark change into separate patch Created 7 years, 5 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 | Annotate | Revision Log
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/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "base/prefs/testing_pref_store.h" 6 #include "base/prefs/testing_pref_store.h"
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "chrome/browser/policy/configuration_policy_provider_test.h" 8 #include "chrome/browser/policy/configuration_policy_provider_test.h"
9 #include "chrome/browser/policy/managed_mode_policy_provider.h" 9 #include "chrome/browser/policy/managed_mode_policy_provider.h"
10 #include "chrome/browser/policy/policy_bundle.h" 10 #include "chrome/browser/policy/policy_bundle.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 }; 60 };
61 61
62 MockSyncErrorFactory::MockSyncErrorFactory(syncer::ModelType type) 62 MockSyncErrorFactory::MockSyncErrorFactory(syncer::ModelType type)
63 : type_(type) {} 63 : type_(type) {}
64 64
65 MockSyncErrorFactory::~MockSyncErrorFactory() {} 65 MockSyncErrorFactory::~MockSyncErrorFactory() {}
66 66
67 syncer::SyncError MockSyncErrorFactory::CreateAndUploadError( 67 syncer::SyncError MockSyncErrorFactory::CreateAndUploadError(
68 const tracked_objects::Location& location, 68 const tracked_objects::Location& location,
69 const std::string& message) { 69 const std::string& message) {
70 return syncer::SyncError(location, message, type_); 70 return syncer::SyncError(location,
71 syncer::SyncError::DATATYPE_ERROR,
72 message,
73 type_);
71 } 74 }
72 75
73 class TestHarness : public PolicyProviderTestHarness { 76 class TestHarness : public PolicyProviderTestHarness {
74 public: 77 public:
75 TestHarness(); 78 TestHarness();
76 virtual ~TestHarness(); 79 virtual ~TestHarness();
77 80
78 static PolicyProviderTestHarness* Create(); 81 static PolicyProviderTestHarness* Create();
79 82
80 // PolicyProviderTestHarness implementation: 83 // PolicyProviderTestHarness implementation:
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 PolicyMap* policy_map = &expected_bundle.Get( 380 PolicyMap* policy_map = &expected_bundle.Get(
378 PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())); 381 PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()));
379 policy_map->Set(kPolicyKey, 382 policy_map->Set(kPolicyKey,
380 POLICY_LEVEL_MANDATORY, 383 POLICY_LEVEL_MANDATORY,
381 POLICY_SCOPE_USER, 384 POLICY_SCOPE_USER,
382 policy_value.DeepCopy()); 385 policy_value.DeepCopy());
383 EXPECT_TRUE(provider_.policies().Equals(expected_bundle)); 386 EXPECT_TRUE(provider_.policies().Equals(expected_bundle));
384 } 387 }
385 388
386 } // namespace policy 389 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/history/typed_url_syncable_service.cc ('k') | chrome/browser/prefs/pref_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698