Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(838)

Side by Side Diff: ui/message_center/views/notification_view_unittest.cc

Issue 1975533002: Change ui::Event::time_stamp from TimeDelta to TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gesture recognizer tests Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 20 matching lines...) Expand all
31 #include "ui/views/layout/fill_layout.h" 31 #include "ui/views/layout/fill_layout.h"
32 #include "ui/views/test/views_test_base.h" 32 #include "ui/views/test/views_test_base.h"
33 #include "ui/views/test/widget_test.h" 33 #include "ui/views/test/widget_test.h"
34 #include "ui/views/widget/widget_delegate.h" 34 #include "ui/views/widget/widget_delegate.h"
35 35
36 namespace { 36 namespace {
37 37
38 std::unique_ptr<ui::GestureEvent> GenerateGestureEvent(ui::EventType type) { 38 std::unique_ptr<ui::GestureEvent> GenerateGestureEvent(ui::EventType type) {
39 ui::GestureEventDetails detail(type); 39 ui::GestureEventDetails detail(type);
40 std::unique_ptr<ui::GestureEvent> event( 40 std::unique_ptr<ui::GestureEvent> event(
41 new ui::GestureEvent(0, 0, 0, base::TimeDelta(), detail)); 41 new ui::GestureEvent(0, 0, 0, base::TimeTicks(), detail));
42 return event; 42 return event;
43 } 43 }
44 44
45 std::unique_ptr<ui::GestureEvent> GenerateGestureVerticalScrollUpdateEvent( 45 std::unique_ptr<ui::GestureEvent> GenerateGestureVerticalScrollUpdateEvent(
46 int dx) { 46 int dx) {
47 ui::GestureEventDetails detail(ui::ET_GESTURE_SCROLL_UPDATE, dx, 0); 47 ui::GestureEventDetails detail(ui::ET_GESTURE_SCROLL_UPDATE, dx, 0);
48 std::unique_ptr<ui::GestureEvent> event( 48 std::unique_ptr<ui::GestureEvent> event(
49 new ui::GestureEvent(0, 0, 0, base::TimeDelta(), detail)); 49 new ui::GestureEvent(0, 0, 0, base::TimeTicks(), detail));
50 return event; 50 return event;
51 } 51 }
52 52
53 } // anonymouse namespace 53 } // anonymouse namespace
54 54
55 namespace message_center { 55 namespace message_center {
56 56
57 // A test delegate used for tests that deal with the notification settings 57 // A test delegate used for tests that deal with the notification settings
58 // button. 58 // button.
59 class NotificationSettingsDelegate : public NotificationDelegate { 59 class NotificationSettingsDelegate : public NotificationDelegate {
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698