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_sheet_con
troller.h" | 5 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con
troller.h" |
6 | 6 |
7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
8 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" | 8 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" |
9 #import "testing/gtest_mac.h" | 9 #import "testing/gtest_mac.h" |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 - (void)pulseSheet { | 50 - (void)pulseSheet { |
51 } | 51 } |
52 | 52 |
53 - (void)makeSheetKeyAndOrderFront { | 53 - (void)makeSheetKeyAndOrderFront { |
54 } | 54 } |
55 | 55 |
56 - (void)updateSheetPosition { | 56 - (void)updateSheetPosition { |
57 } | 57 } |
58 | 58 |
| 59 - (void)resizeWithNewSize:(NSSize)size { |
| 60 // NOOP |
| 61 } |
| 62 |
59 - (NSWindow*)sheetWindow { | 63 - (NSWindow*)sheetWindow { |
60 return [alert_ window]; | 64 return [alert_ window]; |
61 } | 65 } |
62 | 66 |
63 - (void)alertDidEnd:(NSAlert *)alert | 67 - (void)alertDidEnd:(NSAlert *)alert |
64 returnCode:(NSInteger)returnCode | 68 returnCode:(NSInteger)returnCode |
65 ctxInfo:(void *)contextInfo { | 69 ctxInfo:(void *)contextInfo { |
66 returnCode_ = returnCode; | 70 returnCode_ = returnCode; |
67 } | 71 } |
68 | 72 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 [system_sheet setAlert:alert]; | 307 [system_sheet setAlert:alert]; |
304 | 308 |
305 EXPECT_FALSE([[alert window] isVisible]); | 309 EXPECT_FALSE([[alert window] isVisible]); |
306 [controller_ showSheet:system_sheet forParentView:active_tab_view_]; | 310 [controller_ showSheet:system_sheet forParentView:active_tab_view_]; |
307 EXPECT_TRUE([[alert window] isVisible]); | 311 EXPECT_TRUE([[alert window] isVisible]); |
308 | 312 |
309 [controller_ closeSheet:system_sheet]; | 313 [controller_ closeSheet:system_sheet]; |
310 EXPECT_FALSE([[alert window] isVisible]); | 314 EXPECT_FALSE([[alert window] isVisible]); |
311 EXPECT_EQ(kSystemSheetReturnCode, [system_sheet returnCode]); | 315 EXPECT_EQ(kSystemSheetReturnCode, [system_sheet returnCode]); |
312 } | 316 } |
OLD | NEW |