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

Side by Side Diff: ui/views/cocoa/cocoa_mouse_capture_unittest.mm

Issue 1543173002: Switch to standard integer types in ui/views/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 #import "ui/views/cocoa/cocoa_mouse_capture.h" 5 #import "ui/views/cocoa/cocoa_mouse_capture.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #import "base/mac/scoped_nsobject.h" 9 #import "base/mac/scoped_nsobject.h"
10 #include "base/macros.h"
10 #import "ui/events/test/cocoa_test_event_utils.h" 11 #import "ui/events/test/cocoa_test_event_utils.h"
11 #import "ui/gfx/test/ui_cocoa_test_helper.h" 12 #import "ui/gfx/test/ui_cocoa_test_helper.h"
12 #import "ui/views/cocoa/cocoa_mouse_capture_delegate.h" 13 #import "ui/views/cocoa/cocoa_mouse_capture_delegate.h"
13 14
14 // Simple test view that counts calls to -[NSView mouseDown:]. 15 // Simple test view that counts calls to -[NSView mouseDown:].
15 @interface CocoaMouseCaptureTestView : NSView { 16 @interface CocoaMouseCaptureTestView : NSView {
16 @private 17 @private
17 int mouseDownCount_; 18 int mouseDownCount_;
18 } 19 }
19 @property(readonly, nonatomic) int mouseDownCount; 20 @property(readonly, nonatomic) int mouseDownCount;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 EXPECT_EQ(1, [view mouseDownCount]); 119 EXPECT_EQ(1, [view mouseDownCount]);
119 EXPECT_EQ(1, capture.event_count()); 120 EXPECT_EQ(1, capture.event_count());
120 } 121 }
121 122
122 // After the capture goes away, events should be received again. 123 // After the capture goes away, events should be received again.
123 [NSApp sendEvent:click.first]; 124 [NSApp sendEvent:click.first];
124 EXPECT_EQ(2, [view mouseDownCount]); 125 EXPECT_EQ(2, [view mouseDownCount]);
125 } 126 }
126 127
127 } // namespace views 128 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698