| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base_bubble_controller.h" | 5 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| 6 | 6 |
| 7 #import "base/mac/scoped_nsobject.h" | 7 #import "base/mac/scoped_nsobject.h" |
| 8 #import "base/mac/scoped_objc_class_swizzler.h" | 8 #import "base/mac/scoped_objc_class_swizzler.h" |
| 9 #import "base/mac/sdk_forward_declarations.h" | 9 #import "base/mac/sdk_forward_declarations.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | |
| 12 #import "chrome/browser/ui/cocoa/info_bubble_view.h" | 11 #import "chrome/browser/ui/cocoa/info_bubble_view.h" |
| 13 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 12 #import "chrome/browser/ui/cocoa/info_bubble_window.h" |
| 13 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" |
| 14 #import "ui/events/test/cocoa_test_event_utils.h" | 14 #import "ui/events/test/cocoa_test_event_utils.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 const CGFloat kBubbleWindowWidth = 100; | 17 const CGFloat kBubbleWindowWidth = 100; |
| 18 const CGFloat kBubbleWindowHeight = 50; | 18 const CGFloat kBubbleWindowHeight = 50; |
| 19 const CGFloat kAnchorPointX = 400; | 19 const CGFloat kAnchorPointX = 400; |
| 20 const CGFloat kAnchorPointY = 300; | 20 const CGFloat kAnchorPointY = 300; |
| 21 | 21 |
| 22 NSWindow* g_key_window = nil; | 22 NSWindow* g_key_window = nil; |
| 23 } // namespace | 23 } // namespace |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 | 443 |
| 444 // Post the "resign key" notification for another window. | 444 // Post the "resign key" notification for another window. |
| 445 NSNotification* notif = | 445 NSNotification* notif = |
| 446 [NSNotification notificationWithName:NSWindowDidResignKeyNotification | 446 [NSNotification notificationWithName:NSWindowDidResignKeyNotification |
| 447 object:test_window()]; | 447 object:test_window()]; |
| 448 [[NSNotificationCenter defaultCenter] postNotification:notif]; | 448 [[NSNotificationCenter defaultCenter] postNotification:notif]; |
| 449 | 449 |
| 450 EXPECT_TRUE([bubble_window_ isVisible]); | 450 EXPECT_TRUE([bubble_window_ isVisible]); |
| 451 g_key_window = nil; | 451 g_key_window = nil; |
| 452 } | 452 } |
| OLD | NEW |