OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/test/testing_browser_process_test.h" | 5 #include "chrome/test/base/testing_browser_process_test.h" |
6 #include "content/common/notification_observer.h" | 6 #include "content/common/notification_observer.h" |
7 #include "content/common/notification_registrar.h" | 7 #include "content/common/notification_registrar.h" |
8 #include "content/common/notification_service.h" | 8 #include "content/common/notification_service.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 // Bogus class to act as a NotificationSource for the messages. | 13 // Bogus class to act as a NotificationSource for the messages. |
14 class TestSource {}; | 14 class TestSource {}; |
15 | 15 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 EXPECT_EQ(3, idle_test_source.notification_count()); | 156 EXPECT_EQ(3, idle_test_source.notification_count()); |
157 | 157 |
158 registrar_.Remove(&idle_test_source, content::NOTIFICATION_ALL, | 158 registrar_.Remove(&idle_test_source, content::NOTIFICATION_ALL, |
159 Source<TestSource>(&test_source)); | 159 Source<TestSource>(&test_source)); |
160 | 160 |
161 service->Notify(content::NOTIFICATION_IDLE, | 161 service->Notify(content::NOTIFICATION_IDLE, |
162 Source<TestSource>(&test_source), | 162 Source<TestSource>(&test_source), |
163 NotificationService::NoDetails()); | 163 NotificationService::NoDetails()); |
164 EXPECT_EQ(3, idle_test_source.notification_count()); | 164 EXPECT_EQ(3, idle_test_source.notification_count()); |
165 } | 165 } |
OLD | NEW |