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

Side by Side Diff: chrome/browser/cocoa/find_bar_view_unittest.mm

Issue 2769014: Mac/clang: Possibly contentious changes. (Closed)
Patch Set: comments2 Created 10 years, 6 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/scoped_nsobject.h" 7 #include "base/scoped_nsobject.h"
8 #import "chrome/browser/cocoa/cocoa_test_helper.h" 8 #import "chrome/browser/cocoa/cocoa_test_helper.h"
9 #import "chrome/browser/cocoa/find_bar_view.h" 9 #import "chrome/browser/cocoa/find_bar_view.h"
10 #include "chrome/browser/cocoa/test_event_utils.h" 10 #include "chrome/browser/cocoa/test_event_utils.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/platform_test.h" 12 #include "testing/platform_test.h"
13 13
14 @interface MouseDownViewPong : NSView { 14 @interface MouseDownViewPong : NSView {
15 BOOL pong_; 15 BOOL pong_;
16 } 16 }
17 @property(assign) BOOL pong; 17 @property (nonatomic, assign) BOOL pong;
18 @end 18 @end
19 19
20 @implementation MouseDownViewPong 20 @implementation MouseDownViewPong
21 @synthesize pong = pong_; 21 @synthesize pong = pong_;
22 - (void)mouseDown:(NSEvent*)event { 22 - (void)mouseDown:(NSEvent*)event {
23 pong_ = YES; 23 pong_ = YES;
24 } 24 }
25 @end 25 @end
26 26
27 27
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // a few pixels from the lower left corner of the window, which places it in 81 // a few pixels from the lower left corner of the window, which places it in
82 // the transparent area surrounding the findbar. 82 // the transparent area surrounding the findbar.
83 NSPoint pointInTransparentArea = NSMakePoint(2, 2); 83 NSPoint pointInTransparentArea = NSMakePoint(2, 2);
84 [pongView setPong:NO]; 84 [pongView setPong:NO];
85 [test_window() 85 [test_window()
86 sendEvent:test_event_utils::LeftMouseDownAtPoint(pointInTransparentArea)]; 86 sendEvent:test_event_utils::LeftMouseDownAtPoint(pointInTransparentArea)];
87 // Click is ignored by findbar, passed through to underlying view. 87 // Click is ignored by findbar, passed through to underlying view.
88 EXPECT_TRUE([pongView pong]); 88 EXPECT_TRUE([pongView pong]);
89 } 89 }
90 } // namespace 90 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698