| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/autofill/autofill_bubble_controller.h" | 5 #import "chrome/browser/ui/cocoa/autofill/autofill_bubble_controller.h" | 
| 6 | 6 | 
| 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 7 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" | 
| 8 #include "chrome/browser/ui/cocoa/run_loop_testing.h" | 8 #include "chrome/browser/ui/cocoa/test/run_loop_testing.h" | 
| 9 | 9 | 
| 10 class AutofillBubbleControllerTest : public CocoaTest { | 10 class AutofillBubbleControllerTest : public CocoaTest { | 
| 11 }; | 11 }; | 
| 12 | 12 | 
| 13 TEST_F(AutofillBubbleControllerTest, ShowAndClose) { | 13 TEST_F(AutofillBubbleControllerTest, ShowAndClose) { | 
| 14   AutofillBubbleController* controller = | 14   AutofillBubbleController* controller = | 
| 15       [[AutofillBubbleController alloc] initWithParentWindow:test_window() | 15       [[AutofillBubbleController alloc] initWithParentWindow:test_window() | 
| 16                                                           message:@"test msg"]; | 16                                                           message:@"test msg"]; | 
| 17   EXPECT_FALSE([[controller window] isVisible]); | 17   EXPECT_FALSE([[controller window] isVisible]); | 
| 18 | 18 | 
| 19   [controller showWindow:nil]; | 19   [controller showWindow:nil]; | 
| 20   EXPECT_TRUE([[controller window] isVisible]); | 20   EXPECT_TRUE([[controller window] isVisible]); | 
| 21 | 21 | 
| 22   // Close will self-delete, but all pending messages must be processed so the | 22   // Close will self-delete, but all pending messages must be processed so the | 
| 23   // deallocation happens. | 23   // deallocation happens. | 
| 24   [controller close]; | 24   [controller close]; | 
| 25   chrome::testing::NSRunLoopRunAllPending(); | 25   chrome::testing::NSRunLoopRunAllPending(); | 
| 26 } | 26 } | 
| OLD | NEW | 
|---|