| 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 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 10 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 - (void)pulseSheet { | 53 - (void)pulseSheet { |
| 54 } | 54 } |
| 55 | 55 |
| 56 - (void)makeSheetKeyAndOrderFront { | 56 - (void)makeSheetKeyAndOrderFront { |
| 57 } | 57 } |
| 58 | 58 |
| 59 - (void)updateSheetPosition { | 59 - (void)updateSheetPosition { |
| 60 } | 60 } |
| 61 | 61 |
| 62 - (void)resizeWithNewSize:(NSSize)size { | |
| 63 // NOOP | |
| 64 } | |
| 65 | |
| 66 - (NSWindow*)sheetWindow { | 62 - (NSWindow*)sheetWindow { |
| 67 return [alert_ window]; | 63 return [alert_ window]; |
| 68 } | 64 } |
| 69 | 65 |
| 70 - (void)alertDidEnd:(NSAlert *)alert | 66 - (void)alertDidEnd:(NSAlert *)alert |
| 71 returnCode:(NSInteger)returnCode | 67 returnCode:(NSInteger)returnCode |
| 72 ctxInfo:(void *)contextInfo { | 68 ctxInfo:(void *)contextInfo { |
| 73 returnCode_ = returnCode; | 69 returnCode_ = returnCode; |
| 74 } | 70 } |
| 75 | 71 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 [system_sheet setAlert:alert]; | 306 [system_sheet setAlert:alert]; |
| 311 | 307 |
| 312 EXPECT_FALSE([[alert window] isVisible]); | 308 EXPECT_FALSE([[alert window] isVisible]); |
| 313 [controller_ showSheet:system_sheet forParentView:active_tab_view_]; | 309 [controller_ showSheet:system_sheet forParentView:active_tab_view_]; |
| 314 EXPECT_TRUE([[alert window] isVisible]); | 310 EXPECT_TRUE([[alert window] isVisible]); |
| 315 | 311 |
| 316 [controller_ closeSheet:system_sheet]; | 312 [controller_ closeSheet:system_sheet]; |
| 317 EXPECT_FALSE([[alert window] isVisible]); | 313 EXPECT_FALSE([[alert window] isVisible]); |
| 318 EXPECT_EQ(kSystemSheetReturnCode, [system_sheet returnCode]); | 314 EXPECT_EQ(kSystemSheetReturnCode, [system_sheet returnCode]); |
| 319 } | 315 } |
| OLD | NEW |