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

Side by Side Diff: components/mus/common/event_param_traits_unittest.cc

Issue 1773813004: Fix flag comparison in event_param_traits_unittest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | 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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 "components/mus/common/event_param_traits.h" 5 #include "components/mus/common/event_param_traits.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
10 #include "ipc/ipc_param_traits.h" 10 #include "ipc/ipc_param_traits.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 case EventType::ET_GESTURE_SWIPE: 80 case EventType::ET_GESTURE_SWIPE:
81 case EventType::ET_GESTURE_TAP_UNCONFIRMED: 81 case EventType::ET_GESTURE_TAP_UNCONFIRMED:
82 case EventType::ET_GESTURE_DOUBLE_TAP: 82 case EventType::ET_GESTURE_DOUBLE_TAP:
83 Compare(CAST_EVENT(GestureEvent, a), CAST_EVENT(GestureEvent, b)); 83 Compare(CAST_EVENT(GestureEvent, a), CAST_EVENT(GestureEvent, b));
84 break; 84 break;
85 case EventType::ET_SCROLL: 85 case EventType::ET_SCROLL:
86 Compare(CAST_EVENT(ScrollEvent, a), CAST_EVENT(ScrollEvent, b)); 86 Compare(CAST_EVENT(ScrollEvent, a), CAST_EVENT(ScrollEvent, b));
87 break; 87 break;
88 case EventType::ET_SCROLL_FLING_START: 88 case EventType::ET_SCROLL_FLING_START:
89 case EventType::ET_SCROLL_FLING_CANCEL: 89 case EventType::ET_SCROLL_FLING_CANCEL:
90 ASSERT_EQ(!!a->flags() & MouseEventFlags::EF_FROM_TOUCH, 90 ASSERT_EQ(a->flags() & MouseEventFlags::EF_FROM_TOUCH,
91 !!b->flags() & MouseEventFlags::EF_FROM_TOUCH); 91 b->flags() & MouseEventFlags::EF_FROM_TOUCH);
92 if (a->flags() & MouseEventFlags::EF_FROM_TOUCH) { 92 if (a->flags() & MouseEventFlags::EF_FROM_TOUCH) {
93 Compare(CAST_EVENT(GestureEvent, a), CAST_EVENT(GestureEvent, b)); 93 Compare(CAST_EVENT(GestureEvent, a), CAST_EVENT(GestureEvent, b));
94 } else { 94 } else {
95 Compare(CAST_EVENT(MouseEvent, a), CAST_EVENT(MouseEvent, b)); 95 Compare(CAST_EVENT(MouseEvent, a), CAST_EVENT(MouseEvent, b));
96 } 96 }
97 break; 97 break;
98 case EventType::ET_CANCEL_MODE: 98 case EventType::ET_CANCEL_MODE:
99 Compare(CAST_EVENT(CancelModeEvent, a), CAST_EVENT(CancelModeEvent, b)); 99 Compare(CAST_EVENT(CancelModeEvent, a), CAST_EVENT(CancelModeEvent, b));
100 break; 100 break;
101 default: 101 default:
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 #undef MIN 459 #undef MIN
460 #undef MAX 460 #undef MAX
461 #undef IMIN 461 #undef IMIN
462 #undef IMAX 462 #undef IMAX
463 #undef FMIN 463 #undef FMIN
464 #undef FMAX 464 #undef FMAX
465 #undef FNAN 465 #undef FNAN
466 466
467 } // namespace 467 } // namespace
468 } // namespace ui 468 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698