Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #import "chrome/browser/ui/cocoa/autofill/autofill_error_bubble_controller.h" | |
| 6 | |
| 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | |
| 8 #include "chrome/browser/ui/cocoa/run_loop_testing.h" | |
| 9 | |
| 10 class AutofillErrorBubbleControllerTest : public CocoaTest { | |
| 11 }; | |
| 12 | |
| 13 TEST_F(AutofillErrorBubbleControllerTest, ShowAndClose) { | |
| 14 AutofillErrorBubbleController* controller = | |
| 15 [[AutofillErrorBubbleController alloc] initWithParentWindow:test_window() | |
| 16 message:@"test msg"]; | |
| 17 EXPECT_FALSE([[controller window] isVisible]); | |
| 18 | |
| 19 [controller showWindow:nil]; | |
| 20 EXPECT_TRUE([[controller window] isVisible]); | |
| 21 | |
| 22 // Close will self-delete, but all pending messages must be processed so the | |
| 23 // deallocation happens. | |
| 24 [controller close]; | |
| 25 chrome::testing::NSRunLoopRunAllPending(); | |
| 26 } | |
| 27 | |
|
Robert Sesek
2013/11/05 01:43:26
nit: extra blank
groby-ooo-7-16
2013/11/05 01:51:53
Done.
| |
| OLD | NEW |