| 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 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
| 8 #import "base/mac/scoped_nsobject.h" | 8 #import "base/mac/scoped_nsobject.h" |
| 9 #import "base/mac/scoped_objc_class_swizzler.h" | 9 #import "base/mac/scoped_objc_class_swizzler.h" |
| 10 #import "base/mac/sdk_forward_declarations.h" | 10 #import "base/mac/sdk_forward_declarations.h" |
| 11 #include "base/macros.h" |
| 11 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 12 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
| 12 #import "chrome/browser/ui/cocoa/info_bubble_view.h" | 13 #import "chrome/browser/ui/cocoa/info_bubble_view.h" |
| 13 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 14 #import "chrome/browser/ui/cocoa/info_bubble_window.h" |
| 14 #import "ui/events/test/cocoa_test_event_utils.h" | 15 #import "ui/events/test/cocoa_test_event_utils.h" |
| 15 | 16 |
| 16 namespace { | 17 namespace { |
| 17 const CGFloat kBubbleWindowWidth = 100; | 18 const CGFloat kBubbleWindowWidth = 100; |
| 18 const CGFloat kBubbleWindowHeight = 50; | 19 const CGFloat kBubbleWindowHeight = 50; |
| 19 const CGFloat kAnchorPointX = 400; | 20 const CGFloat kAnchorPointX = 400; |
| 20 const CGFloat kAnchorPointY = 300; | 21 const CGFloat kAnchorPointY = 300; |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 | 460 |
| 460 // Post the "resign key" notification for another window. | 461 // Post the "resign key" notification for another window. |
| 461 NSNotification* notif = | 462 NSNotification* notif = |
| 462 [NSNotification notificationWithName:NSWindowDidResignKeyNotification | 463 [NSNotification notificationWithName:NSWindowDidResignKeyNotification |
| 463 object:test_window()]; | 464 object:test_window()]; |
| 464 [[NSNotificationCenter defaultCenter] postNotification:notif]; | 465 [[NSNotificationCenter defaultCenter] postNotification:notif]; |
| 465 | 466 |
| 466 EXPECT_TRUE([bubble_window_ isVisible]); | 467 EXPECT_TRUE([bubble_window_ isVisible]); |
| 467 g_key_window = nil; | 468 g_key_window = nil; |
| 468 } | 469 } |
| OLD | NEW |