| OLD | NEW |
| 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/bridged_native_widget.h" | 5 #import "ui/views/cocoa/bridged_native_widget.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #import "base/mac/mac_util.h" | 9 #import "base/mac/mac_util.h" |
| 10 #import "base/mac/sdk_forward_declarations.h" | 10 #import "base/mac/sdk_forward_declarations.h" |
| 11 #include "base/macros.h" |
| 12 #include "ui/base/hit_test.h" |
| 11 #import "ui/base/test/nswindow_fullscreen_notification_waiter.h" | 13 #import "ui/base/test/nswindow_fullscreen_notification_waiter.h" |
| 12 #include "ui/base/hit_test.h" | |
| 13 #import "ui/base/test/windowed_nsnotification_observer.h" | 14 #import "ui/base/test/windowed_nsnotification_observer.h" |
| 14 #import "ui/events/test/cocoa_test_event_utils.h" | 15 #import "ui/events/test/cocoa_test_event_utils.h" |
| 15 #include "ui/views/test/widget_test.h" | 16 #include "ui/views/test/widget_test.h" |
| 16 #include "ui/views/window/native_frame_view.h" | 17 #include "ui/views/window/native_frame_view.h" |
| 17 | 18 |
| 18 namespace views { | 19 namespace views { |
| 19 namespace test { | 20 namespace test { |
| 20 | 21 |
| 21 class BridgedNativeWidgetUITest : public test::WidgetTest { | 22 class BridgedNativeWidgetUITest : public test::WidgetTest { |
| 22 public: | 23 public: |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 NSEvent* mouse_up = cocoa_test_event_utils::MouseEventAtPointInWindow( | 461 NSEvent* mouse_up = cocoa_test_event_utils::MouseEventAtPointInWindow( |
| 461 NSMakePoint(30, 30), NSLeftMouseUp, window, 0); | 462 NSMakePoint(30, 30), NSLeftMouseUp, window, 0); |
| 462 CGEventPost(kCGSessionEventTap, [mouse_up CGEvent]); | 463 CGEventPost(kCGSessionEventTap, [mouse_up CGEvent]); |
| 463 WaitForEvent(NSLeftMouseUpMask); | 464 WaitForEvent(NSLeftMouseUpMask); |
| 464 EXPECT_EQ(120, [window frame].origin.x); | 465 EXPECT_EQ(120, [window frame].origin.x); |
| 465 } | 466 } |
| 466 } | 467 } |
| 467 | 468 |
| 468 } // namespace test | 469 } // namespace test |
| 469 } // namespace views | 470 } // namespace views |
| OLD | NEW |