OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/message_center/notification_delegate.h" | 5 #include "ui/message_center/notification_delegate.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace message_center { | 13 namespace message_center { |
14 | 14 |
15 class NotificationDelegateTest : public testing::Test { | 15 class NotificationDelegateTest : public testing::Test { |
16 public: | 16 public: |
17 NotificationDelegateTest(); | 17 NotificationDelegateTest(); |
18 virtual ~NotificationDelegateTest(); | 18 ~NotificationDelegateTest() override; |
19 | 19 |
20 void ClickCallback(); | 20 void ClickCallback(); |
21 | 21 |
22 int GetClickedCallbackAndReset(); | 22 int GetClickedCallbackAndReset(); |
23 | 23 |
24 private: | 24 private: |
25 int callback_count_; | 25 int callback_count_; |
26 | 26 |
27 DISALLOW_COPY_AND_ASSIGN(NotificationDelegateTest); | 27 DISALLOW_COPY_AND_ASSIGN(NotificationDelegateTest); |
28 }; | 28 }; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 EXPECT_FALSE(delegate->HasClickedListener()); | 63 EXPECT_FALSE(delegate->HasClickedListener()); |
64 delegate->Click(); | 64 delegate->Click(); |
65 EXPECT_EQ(0, GetClickedCallbackAndReset()); | 65 EXPECT_EQ(0, GetClickedCallbackAndReset()); |
66 | 66 |
67 delegate->ButtonClick(0); | 67 delegate->ButtonClick(0); |
68 EXPECT_EQ(0, GetClickedCallbackAndReset()); | 68 EXPECT_EQ(0, GetClickedCallbackAndReset()); |
69 } | 69 } |
70 | 70 |
71 } | 71 } |
OLD | NEW |