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 "content/renderer/active_notification_tracker.h" | 5 #include "content/renderer/active_notification_tracker.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
7 | 7 |
8 namespace content { | 8 namespace content { |
9 | 9 |
10 TEST(ActiveNotificationTrackerTest, TestLookupAndClear) { | 10 TEST(ActiveNotificationTrackerTest, TestLookupAndClear) { |
11 ActiveNotificationTracker tracker; | 11 ActiveNotificationTracker tracker; |
12 | 12 |
13 WebKit::WebNotification notification1; | 13 blink::WebNotification notification1; |
14 int id1 = tracker.RegisterNotification(notification1); | 14 int id1 = tracker.RegisterNotification(notification1); |
15 | 15 |
16 WebKit::WebNotification notification2; | 16 blink::WebNotification notification2; |
17 int id2 = tracker.RegisterNotification(notification2); | 17 int id2 = tracker.RegisterNotification(notification2); |
18 | 18 |
19 WebKit::WebNotification result; | 19 blink::WebNotification result; |
20 tracker.GetNotification(id1, &result); | 20 tracker.GetNotification(id1, &result); |
21 EXPECT_TRUE(result == notification1); | 21 EXPECT_TRUE(result == notification1); |
22 | 22 |
23 tracker.GetNotification(id2, &result); | 23 tracker.GetNotification(id2, &result); |
24 EXPECT_TRUE(result == notification2); | 24 EXPECT_TRUE(result == notification2); |
25 | 25 |
26 tracker.Clear(); | 26 tracker.Clear(); |
27 } | 27 } |
28 | 28 |
29 } // namespace content | 29 } // namespace content |
OLD | NEW |