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

Side by Side Diff: chrome/browser/prefs/pref_change_registrar_unittest.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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/policy_stubs.cc ('k') | chrome/browser/prefs/pref_member.h » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/prefs/pref_change_registrar.h" 5 #include "chrome/browser/prefs/pref_change_registrar.h"
6 #include "chrome/test/testing_pref_service.h" 6 #include "chrome/test/testing_pref_service.h"
7 #include "content/common/content_notification_types.h"
7 #include "content/common/notification_details.h" 8 #include "content/common/notification_details.h"
8 #include "content/common/notification_observer_mock.h" 9 #include "content/common/notification_observer_mock.h"
9 #include "content/common/notification_source.h" 10 #include "content/common/notification_source.h"
10 #include "content/common/notification_type.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 using testing::Mock; 14 using testing::Mock;
15 using testing::Eq; 15 using testing::Eq;
16 16
17 namespace { 17 namespace {
18 18
19 // A mock provider that allows us to capture pref observer changes. 19 // A mock provider that allows us to capture pref observer changes.
20 class MockPrefService : public TestingPrefService { 20 class MockPrefService : public TestingPrefService {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 RemovePrefObserver(Eq(std::string("test.pref.1")), observer())); 109 RemovePrefObserver(Eq(std::string("test.pref.1")), observer()));
110 EXPECT_CALL(*service(), 110 EXPECT_CALL(*service(),
111 RemovePrefObserver(Eq(std::string("test.pref.2")), observer())); 111 RemovePrefObserver(Eq(std::string("test.pref.2")), observer()));
112 registrar.RemoveAll(); 112 registrar.RemoveAll();
113 EXPECT_TRUE(registrar.IsEmpty()); 113 EXPECT_TRUE(registrar.IsEmpty());
114 114
115 // Explicitly check the expectations now to make sure that the RemoveAll 115 // Explicitly check the expectations now to make sure that the RemoveAll
116 // worked (rather than the registrar destructor doing the work). 116 // worked (rather than the registrar destructor doing the work).
117 Mock::VerifyAndClearExpectations(service()); 117 Mock::VerifyAndClearExpectations(service());
118 } 118 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_stubs.cc ('k') | chrome/browser/prefs/pref_member.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698