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

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

Issue 387733004: Move sync/notifier to components/invalidation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (GN) Comment out dependency on internal target Created 6 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
« no previous file with comments | « chrome/browser/policy/cloud/cloud_policy_invalidator.cc ('k') | chrome/browser/sync/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/policy/cloud/cloud_policy_invalidator.h" 22 #include "chrome/browser/policy/cloud/cloud_policy_invalidator.h"
23 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 23 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
24 #include "components/policy/core/common/cloud/cloud_policy_core.h" 24 #include "components/policy/core/common/cloud/cloud_policy_core.h"
25 #include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h" 25 #include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h"
26 #include "components/policy/core/common/cloud/enterprise_metrics.h" 26 #include "components/policy/core/common/cloud/enterprise_metrics.h"
27 #include "components/policy/core/common/cloud/mock_cloud_policy_client.h" 27 #include "components/policy/core/common/cloud/mock_cloud_policy_client.h"
28 #include "components/policy/core/common/cloud/mock_cloud_policy_store.h" 28 #include "components/policy/core/common/cloud/mock_cloud_policy_store.h"
29 #include "components/policy/core/common/policy_types.h" 29 #include "components/policy/core/common/policy_types.h"
30 #include "policy/policy_constants.h" 30 #include "policy/policy_constants.h"
31 #include "policy/proto/device_management_backend.pb.h" 31 #include "policy/proto/device_management_backend.pb.h"
32 #include "sync/notifier/invalidation_util.h" 32 #include "sync/internal_api/public/base/invalidation_util.h"
33 #include "testing/gmock/include/gmock/gmock.h" 33 #include "testing/gmock/include/gmock/gmock.h"
34 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
35 35
36 namespace policy { 36 namespace policy {
37 37
38 class CloudPolicyInvalidatorTest : public testing::Test { 38 class CloudPolicyInvalidatorTest : public testing::Test {
39 protected: 39 protected:
40 // Policy objects which can be used in tests. 40 // Policy objects which can be used in tests.
41 enum PolicyObject { 41 enum PolicyObject {
42 POLICY_OBJECT_NONE, 42 POLICY_OBJECT_NONE,
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 942
943 // Verify that received invalidations metrics are correct. 943 // Verify that received invalidations metrics are correct.
944 EXPECT_EQ(1, GetInvalidationCount(POLICY_INVALIDATION_TYPE_NO_PAYLOAD)); 944 EXPECT_EQ(1, GetInvalidationCount(POLICY_INVALIDATION_TYPE_NO_PAYLOAD));
945 EXPECT_EQ(3, GetInvalidationCount(POLICY_INVALIDATION_TYPE_NORMAL)); 945 EXPECT_EQ(3, GetInvalidationCount(POLICY_INVALIDATION_TYPE_NORMAL));
946 EXPECT_EQ(2, 946 EXPECT_EQ(2,
947 GetInvalidationCount(POLICY_INVALIDATION_TYPE_NO_PAYLOAD_EXPIRED)); 947 GetInvalidationCount(POLICY_INVALIDATION_TYPE_NO_PAYLOAD_EXPIRED));
948 EXPECT_EQ(2, GetInvalidationCount(POLICY_INVALIDATION_TYPE_EXPIRED)); 948 EXPECT_EQ(2, GetInvalidationCount(POLICY_INVALIDATION_TYPE_EXPIRED));
949 } 949 }
950 950
951 } // namespace policy 951 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud/cloud_policy_invalidator.cc ('k') | chrome/browser/sync/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698