| 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/views/notification_view.h" | 5 #include "ui/message_center/views/notification_view.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "ui/views/layout/fill_layout.h" | 32 #include "ui/views/layout/fill_layout.h" |
| 33 #include "ui/views/test/views_test_base.h" | 33 #include "ui/views/test/views_test_base.h" |
| 34 #include "ui/views/test/widget_test.h" | 34 #include "ui/views/test/widget_test.h" |
| 35 #include "ui/views/widget/widget_delegate.h" | 35 #include "ui/views/widget/widget_delegate.h" |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 std::unique_ptr<ui::GestureEvent> GenerateGestureEvent(ui::EventType type) { | 39 std::unique_ptr<ui::GestureEvent> GenerateGestureEvent(ui::EventType type) { |
| 40 ui::GestureEventDetails detail(type); | 40 ui::GestureEventDetails detail(type); |
| 41 std::unique_ptr<ui::GestureEvent> event( | 41 std::unique_ptr<ui::GestureEvent> event( |
| 42 new ui::GestureEvent(0, 0, 0, base::TimeDelta(), detail)); | 42 new ui::GestureEvent(0, 0, 0, base::TimeTicks(), detail)); |
| 43 return event; | 43 return event; |
| 44 } | 44 } |
| 45 | 45 |
| 46 std::unique_ptr<ui::GestureEvent> GenerateGestureVerticalScrollUpdateEvent( | 46 std::unique_ptr<ui::GestureEvent> GenerateGestureVerticalScrollUpdateEvent( |
| 47 int dx) { | 47 int dx) { |
| 48 ui::GestureEventDetails detail(ui::ET_GESTURE_SCROLL_UPDATE, dx, 0); | 48 ui::GestureEventDetails detail(ui::ET_GESTURE_SCROLL_UPDATE, dx, 0); |
| 49 std::unique_ptr<ui::GestureEvent> event( | 49 std::unique_ptr<ui::GestureEvent> event( |
| 50 new ui::GestureEvent(0, 0, 0, base::TimeDelta(), detail)); | 50 new ui::GestureEvent(0, 0, 0, base::TimeTicks(), detail)); |
| 51 return event; | 51 return event; |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // anonymouse namespace | 54 } // anonymouse namespace |
| 55 | 55 |
| 56 namespace message_center { | 56 namespace message_center { |
| 57 | 57 |
| 58 // A test delegate used for tests that deal with the notification settings | 58 // A test delegate used for tests that deal with the notification settings |
| 59 // button. | 59 // button. |
| 60 class NotificationSettingsDelegate : public NotificationDelegate { | 60 class NotificationSettingsDelegate : public NotificationDelegate { |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 TEST_F(NotificationViewTest, Pinned) { | 701 TEST_F(NotificationViewTest, Pinned) { |
| 702 notification()->set_pinned(true); | 702 notification()->set_pinned(true); |
| 703 | 703 |
| 704 UpdateNotificationViews(); | 704 UpdateNotificationViews(); |
| 705 EXPECT_EQ(NULL, GetCloseButton()); | 705 EXPECT_EQ(NULL, GetCloseButton()); |
| 706 } | 706 } |
| 707 | 707 |
| 708 #endif // defined(OS_CHROMEOS) | 708 #endif // defined(OS_CHROMEOS) |
| 709 | 709 |
| 710 } // namespace message_center | 710 } // namespace message_center |
| OLD | NEW |