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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_details_container_unittest.mm

Issue 21692002: Rename AutofillDialogController to AutofillDialogViewDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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_details_container.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_details_container.h"
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h" 9 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h"
10 #include "chrome/browser/ui/autofill/mock_autofill_dialog_controller.h" 10 #include "chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/platform_test.h" 12 #include "testing/platform_test.h"
13 #import "ui/base/test/ui_cocoa_test_helper.h" 13 #import "ui/base/test/ui_cocoa_test_helper.h"
14 14
15 namespace { 15 namespace {
16 16
17 class AutofillDetailsContainerTest : public ui::CocoaTest { 17 class AutofillDetailsContainerTest : public ui::CocoaTest {
18 public: 18 public:
19 AutofillDetailsContainerTest() { 19 AutofillDetailsContainerTest() {
20 container_.reset([[AutofillDetailsContainer alloc] initWithController: 20 container_.reset([[AutofillDetailsContainer alloc] initWithController:
21 &controller_]); 21 &controller_]);
22 [[test_window() contentView] addSubview:[container_ view]]; 22 [[test_window() contentView] addSubview:[container_ view]];
23 } 23 }
24 24
25 protected: 25 protected:
26 base::scoped_nsobject<AutofillDetailsContainer> container_; 26 base::scoped_nsobject<AutofillDetailsContainer> container_;
27 testing::NiceMock<autofill::MockAutofillDialogController> controller_; 27 testing::NiceMock<autofill::MockAutofillDialogViewDelegate> controller_;
groby-ooo-7-16 2013/08/02 20:22:21 delegate_
28 }; 28 };
29 29
30 } // namespace 30 } // namespace
31 31
32 TEST_VIEW(AutofillDetailsContainerTest, [container_ view]) 32 TEST_VIEW(AutofillDetailsContainerTest, [container_ view])
33 33
34 TEST_F(AutofillDetailsContainerTest, BasicProperties) { 34 TEST_F(AutofillDetailsContainerTest, BasicProperties) {
35 EXPECT_TRUE([[container_ view] isKindOfClass:[NSScrollView class]]); 35 EXPECT_TRUE([[container_ view] isKindOfClass:[NSScrollView class]]);
36 EXPECT_GT([[[container_ view] subviews] count], 0U); 36 EXPECT_GT([[[container_ view] subviews] count], 0U);
37 37
(...skipping 23 matching lines...) Expand all
61 61
62 EXPECT_CALL(controller_, InputsAreValid(_, _, VALIDATE_FINAL)) 62 EXPECT_CALL(controller_, InputsAreValid(_, _, VALIDATE_FINAL))
63 .Times(4) 63 .Times(4)
64 .WillOnce(Return(validity)) 64 .WillOnce(Return(validity))
65 .WillOnce(Return(validity)) 65 .WillOnce(Return(validity))
66 .WillOnce(Return(invalid)) 66 .WillOnce(Return(invalid))
67 .WillOnce(Return(validity)); 67 .WillOnce(Return(validity));
68 68
69 EXPECT_FALSE([container_ validate]); 69 EXPECT_FALSE([container_ validate]);
70 } 70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698