OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.h" | 5 #include "chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 [[controller() currentController] class]); | 74 [[controller() currentController] class]); |
75 } | 75 } |
76 | 76 |
77 TEST_F(ManagePasswordsBubbleControllerTest, | 77 TEST_F(ManagePasswordsBubbleControllerTest, |
78 PendingStateShouldHaveUpdatePendingView) { | 78 PendingStateShouldHaveUpdatePendingView) { |
79 SetUpUpdatePendingState(false); | 79 SetUpUpdatePendingState(false); |
80 EXPECT_EQ([UpdatePendingPasswordViewController class], | 80 EXPECT_EQ([UpdatePendingPasswordViewController class], |
81 [[controller() currentController] class]); | 81 [[controller() currentController] class]); |
82 } | 82 } |
83 | 83 |
| 84 TEST_F(ManagePasswordsBubbleControllerTest, ClearModelOnClose) { |
| 85 SetUpUpdatePendingState(false); |
| 86 EXPECT_TRUE(controller().model); |
| 87 [controller() close]; |
| 88 EXPECT_FALSE(controller().model); |
| 89 } |
| 90 |
84 } // namespace | 91 } // namespace |
OLD | NEW |