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 "base/prefs/public/pref_change_registrar.h" |
5 #include "chrome/common/chrome_notification_types.h" | 6 #include "chrome/common/chrome_notification_types.h" |
6 #include "chrome/common/pref_names.h" | 7 #include "chrome/common/pref_names.h" |
7 #include "chrome/browser/api/prefs/pref_change_registrar.h" | |
8 #include "chrome/test/base/testing_pref_service.h" | 8 #include "chrome/test/base/testing_pref_service.h" |
9 #include "content/public/browser/notification_details.h" | 9 #include "content/public/browser/notification_details.h" |
10 #include "content/public/browser/notification_source.h" | 10 #include "content/public/browser/notification_source.h" |
11 #include "content/public/browser/notification_types.h" | 11 #include "content/public/browser/notification_types.h" |
12 #include "content/public/test/mock_notification_observer.h" | 12 #include "content/public/test/mock_notification_observer.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 using testing::Mock; | 16 using testing::Mock; |
17 using testing::Eq; | 17 using testing::Eq; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 PrefNameDetails(prefs::kHomePageIsNewTabPage))); | 198 PrefNameDetails(prefs::kHomePageIsNewTabPage))); |
199 pref_service_->SetUserPref(prefs::kHomePageIsNewTabPage, | 199 pref_service_->SetUserPref(prefs::kHomePageIsNewTabPage, |
200 Value::CreateBooleanValue(true)); | 200 Value::CreateBooleanValue(true)); |
201 Mock::VerifyAndClearExpectations(&observer); | 201 Mock::VerifyAndClearExpectations(&observer); |
202 | 202 |
203 EXPECT_CALL(observer, Observe(_, _, _)).Times(0); | 203 EXPECT_CALL(observer, Observe(_, _, _)).Times(0); |
204 pref_service_->SetUserPref(prefs::kApplicationLocale, | 204 pref_service_->SetUserPref(prefs::kApplicationLocale, |
205 Value::CreateStringValue("en_US.utf8")); | 205 Value::CreateStringValue("en_US.utf8")); |
206 Mock::VerifyAndClearExpectations(&observer); | 206 Mock::VerifyAndClearExpectations(&observer); |
207 } | 207 } |
OLD | NEW |