| OLD | NEW |
| 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/api/prefs/pref_change_registrar.h" |
| 6 #include "chrome/test/base/testing_pref_service.h" | 6 #include "chrome/test/base/testing_pref_service.h" |
| 7 #include "content/public/browser/notification_details.h" | 7 #include "content/public/browser/notification_details.h" |
| 8 #include "content/public/browser/notification_source.h" | 8 #include "content/public/browser/notification_source.h" |
| 9 #include "content/public/browser/notification_types.h" | 9 #include "content/public/browser/notification_types.h" |
| 10 #include "content/public/test/mock_notification_observer.h" | 10 #include "content/public/test/mock_notification_observer.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; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 RemovePrefObserver(Eq(std::string("test.pref.1")), observer())); | 111 RemovePrefObserver(Eq(std::string("test.pref.1")), observer())); |
| 112 EXPECT_CALL(*service(), | 112 EXPECT_CALL(*service(), |
| 113 RemovePrefObserver(Eq(std::string("test.pref.2")), observer())); | 113 RemovePrefObserver(Eq(std::string("test.pref.2")), observer())); |
| 114 registrar.RemoveAll(); | 114 registrar.RemoveAll(); |
| 115 EXPECT_TRUE(registrar.IsEmpty()); | 115 EXPECT_TRUE(registrar.IsEmpty()); |
| 116 | 116 |
| 117 // Explicitly check the expectations now to make sure that the RemoveAll | 117 // Explicitly check the expectations now to make sure that the RemoveAll |
| 118 // worked (rather than the registrar destructor doing the work). | 118 // worked (rather than the registrar destructor doing the work). |
| 119 Mock::VerifyAndClearExpectations(service()); | 119 Mock::VerifyAndClearExpectations(service()); |
| 120 } | 120 } |
| OLD | NEW |