Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Side by Side Diff: chrome/browser/ui/cocoa/passwords/passwords_bubble_controller_unittest.mm

Issue 1637043002: Don't try to use ManagePasswordsBubbleModel if the password bubble was closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698