OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/cocoa/autofill/autofill_section_view.h" | 5 #import "chrome/browser/ui/cocoa/autofill/autofill_section_view.h" |
6 | 6 |
7 #include "base/mac/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "testing/gtest_mac.h" | 10 #include "testing/gtest_mac.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 TEST_F(AutofillSectionViewTest, MouseClicksAreForwarded) { | 154 TEST_F(AutofillSectionViewTest, MouseClicksAreForwarded) { |
155 base::scoped_nsobject<AutofillClickTestDelegate> delegate( | 155 base::scoped_nsobject<AutofillClickTestDelegate> delegate( |
156 [[AutofillClickTestDelegate alloc] init]); | 156 [[AutofillClickTestDelegate alloc] init]); |
157 [view_ setClickTarget:delegate]; | 157 [view_ setClickTarget:delegate]; |
158 | 158 |
159 NSEvent* down_event = | 159 NSEvent* down_event = |
160 cocoa_test_event_utils::LeftMouseDownAtPoint(NSMakePoint(5, 5)); | 160 cocoa_test_event_utils::LeftMouseDownAtPoint(NSMakePoint(5, 5)); |
161 ASSERT_FALSE([delegate didFire]); | 161 ASSERT_FALSE([delegate didFire]); |
162 [test_window() sendEvent:down_event]; | 162 [test_window() sendEvent:down_event]; |
163 EXPECT_TRUE([delegate didFire]); | 163 EXPECT_TRUE([delegate didFire]); |
164 } | 164 } |
OLD | NEW |