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

Side by Side Diff: ui/views/controls/button/custom_button_unittest.cc

Issue 577833003: Revert of Clean up GestureEventDetails constructors and fix unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « ui/events/test/event_generator.cc ('k') | ui/views/controls/table/table_view_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/views/controls/button/custom_button.h" 5 #include "ui/views/controls/button/custom_button.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/aura/test/test_cursor_client.h" 8 #include "ui/aura/test/test_cursor_client.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/aura/window_event_dispatcher.h" 10 #include "ui/aura/window_event_dispatcher.h"
(...skipping 18 matching lines...) Expand all
29 : CustomButton(listener) { 29 : CustomButton(listener) {
30 } 30 }
31 31
32 virtual ~TestCustomButton() {} 32 virtual ~TestCustomButton() {}
33 33
34 private: 34 private:
35 DISALLOW_COPY_AND_ASSIGN(TestCustomButton); 35 DISALLOW_COPY_AND_ASSIGN(TestCustomButton);
36 }; 36 };
37 37
38 void PerformGesture(CustomButton* button, ui::EventType event_type) { 38 void PerformGesture(CustomButton* button, ui::EventType event_type) {
39 ui::GestureEventDetails gesture_details(event_type); 39 ui::GestureEventDetails gesture_details(event_type, 0, 0);
40 base::TimeDelta time_stamp = base::TimeDelta::FromMicroseconds(0); 40 base::TimeDelta time_stamp = base::TimeDelta::FromMicroseconds(0);
41 ui::GestureEvent gesture_event(0, 0, 0, time_stamp, gesture_details); 41 ui::GestureEvent gesture_event(0, 0, 0, time_stamp, gesture_details);
42 button->OnGestureEvent(&gesture_event); 42 button->OnGestureEvent(&gesture_event);
43 } 43 }
44 44
45 } // namespace 45 } // namespace
46 46
47 typedef ViewsTestBase CustomButtonTest; 47 typedef ViewsTestBase CustomButtonTest;
48 48
49 // Tests that hover state changes correctly when visiblity/enableness changes. 49 // Tests that hover state changes correctly when visiblity/enableness changes.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 EXPECT_FALSE(CustomButton::AsCustomButton(&label)); 162 EXPECT_FALSE(CustomButton::AsCustomButton(&label));
163 163
164 Link link(text); 164 Link link(text);
165 EXPECT_FALSE(CustomButton::AsCustomButton(&link)); 165 EXPECT_FALSE(CustomButton::AsCustomButton(&link));
166 166
167 Textfield textfield; 167 Textfield textfield;
168 EXPECT_FALSE(CustomButton::AsCustomButton(&textfield)); 168 EXPECT_FALSE(CustomButton::AsCustomButton(&textfield));
169 } 169 }
170 170
171 } // namespace views 171 } // namespace views
OLDNEW
« no previous file with comments | « ui/events/test/event_generator.cc ('k') | ui/views/controls/table/table_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698