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

Unified Diff: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm

Issue 1409223005: Change the password bubble on Mac so the columns are resized dynamically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the crash Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm
index 6cedc260bf8fa108810c22c779dd7e7d5aace887..3859954c51fb99f19c2b27c727aa53111fd65851 100644
--- a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm
@@ -9,6 +9,7 @@
#include "base/strings/utf_string_conversions.h"
#import "chrome/browser/ui/cocoa/passwords/manage_password_item_view_controller.h"
#include "chrome/browser/ui/cocoa/passwords/manage_passwords_controller_test.h"
+#import "chrome/browser/ui/cocoa/passwords/password_item_views.h"
#include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
#include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -60,7 +61,8 @@ TEST_F(ManagePasswordsBubbleManageViewControllerTest,
TEST_F(ManagePasswordsBubbleManageViewControllerTest,
ShouldShowNoPasswordsWhenNoPasswordsExistForSite) {
EXPECT_TRUE(model()->local_credentials().empty());
- EXPECT_EQ([NoPasswordsView class], [controller().contentView class]);
+ EXPECT_TRUE([controller() noPasswordsView]);
+ EXPECT_FALSE([controller() passwordsListController]);
}
TEST_F(ManagePasswordsBubbleManageViewControllerTest,
@@ -83,16 +85,15 @@ TEST_F(ManagePasswordsBubbleManageViewControllerTest,
// Check the view state.
EXPECT_FALSE(model()->local_credentials().empty());
- EXPECT_EQ([PasswordItemListView class], [controller().contentView class]);
- NSArray* items = base::mac::ObjCCastStrict<PasswordItemListView>(
- controller().contentView).itemViews;
+ ASSERT_TRUE([controller() passwordsListController]);
+ EXPECT_FALSE([controller() noPasswordsView]);
+ NSArray* items = [[controller() passwordsListController] itemViews];
EXPECT_EQ(2U, [items count]);
// Check the entry items.
for (ManagePasswordItemViewController* item in items) {
- ManagePasswordItemManageView* itemContent =
- base::mac::ObjCCastStrict<ManagePasswordItemManageView>(
- item.contentView);
+ ManagePasswordItemView* itemContent =
+ base::mac::ObjCCastStrict<ManagePasswordItemView>(item.contentView);
NSString* username = [itemContent.usernameField stringValue];
if ([username isEqualToString:@"username1"]) {
EXPECT_NSEQ(@"password1", [itemContent.passwordField stringValue]);

Powered by Google App Engine
This is Rietveld 408576698