| 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/mac/sdk_forward_declarations.h" | 9 #include "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/constrained_window/constrained_window_custom_sh
eet.h" | 11 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" |
| 12 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" |
| 13 #import "testing/gtest_mac.h" | 13 #import "testing/gtest_mac.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 const int kSystemSheetReturnCode = 77; | 17 const int kSystemSheetReturnCode = 77; |
| 18 | 18 |
| 19 } // namespace | 19 } // namespace |
| 20 | 20 |
| 21 @interface ConstrainedWindowSystemSheetTest | 21 @interface ConstrainedWindowSystemSheetTest |
| 22 : NSObject <ConstrainedWindowSheet> { | 22 : NSObject <ConstrainedWindowSheet> { |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 [system_sheet setAlert:alert]; | 327 [system_sheet setAlert:alert]; |
| 328 | 328 |
| 329 EXPECT_FALSE([[alert window] isVisible]); | 329 EXPECT_FALSE([[alert window] isVisible]); |
| 330 [controller_ showSheet:system_sheet forParentView:active_tab_view_]; | 330 [controller_ showSheet:system_sheet forParentView:active_tab_view_]; |
| 331 EXPECT_TRUE([[alert window] isVisible]); | 331 EXPECT_TRUE([[alert window] isVisible]); |
| 332 | 332 |
| 333 [controller_ closeSheet:system_sheet]; | 333 [controller_ closeSheet:system_sheet]; |
| 334 EXPECT_FALSE([[alert window] isVisible]); | 334 EXPECT_FALSE([[alert window] isVisible]); |
| 335 EXPECT_EQ(kSystemSheetReturnCode, [system_sheet returnCode]); | 335 EXPECT_EQ(kSystemSheetReturnCode, [system_sheet returnCode]); |
| 336 } | 336 } |
| OLD | NEW |