Refactor management of overview window copy lifetime into a separate class.
[chromium-blink-merge.git] / content / renderer / active_notification_tracker_unittest.cc
blob714a0d110e43045bf35133eceffa354efa023093
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
3 // found in the LICENSE file.
5 #include "content/renderer/active_notification_tracker.h"
6 #include "testing/gtest/include/gtest/gtest.h"
8 namespace content {
10 TEST(ActiveNotificationTrackerTest, TestLookupAndClear) {
11 ActiveNotificationTracker tracker;
13 WebKit::WebNotification notification1;
14 int id1 = tracker.RegisterNotification(notification1);
16 WebKit::WebNotification notification2;
17 int id2 = tracker.RegisterNotification(notification2);
19 WebKit::WebNotification result;
20 tracker.GetNotification(id1, &result);
21 EXPECT_TRUE(result == notification1);
23 tracker.GetNotification(id2, &result);
24 EXPECT_TRUE(result == notification2);
26 tracker.Clear();
29 } // namespace content