| 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/constrained_window/constrained_window_alert.h" | 5 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.h" |
| 6 |
| 6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
| 7 #import "testing/gtest_mac.h" | 8 #import "testing/gtest_mac.h" |
| 8 | 9 |
| 9 class ConstrainedWindowAlertTest : public CocoaTest { | 10 class ConstrainedWindowAlertTest : public CocoaTest { |
| 10 }; | 11 }; |
| 11 | 12 |
| 12 @interface ConstrainedWindowAlertTestTarget : NSObject { | 13 @interface ConstrainedWindowAlertTestTarget : NSObject { |
| 13 @private | 14 @private |
| 14 int linkClickedCount_; | 15 int linkClickedCount_; |
| 15 } | 16 } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 [alert layout]; | 94 [alert layout]; |
| 94 NSRect window_rect = [[alert window] frame]; | 95 NSRect window_rect = [[alert window] frame]; |
| 95 | 96 |
| 96 EXPECT_GT(NSHeight(window_rect), NSHeight(initial_window_rect)); | 97 EXPECT_GT(NSHeight(window_rect), NSHeight(initial_window_rect)); |
| 97 | 98 |
| 98 [[alert window] makeKeyAndOrderFront:nil]; | 99 [[alert window] makeKeyAndOrderFront:nil]; |
| 99 | 100 |
| 100 [[alert linkView] performClick:nil]; | 101 [[alert linkView] performClick:nil]; |
| 101 EXPECT_EQ(1, [target linkClickedCount]); | 102 EXPECT_EQ(1, [target linkClickedCount]); |
| 102 } | 103 } |
| OLD | NEW |