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

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

Issue 82933002: [rAc OSX] Simplify the overlay controller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update unit tests Created 7 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_overlay_controller.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.h"
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h" 8 #include "chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 15 matching lines...) Expand all
26 base::scoped_nsobject<AutofillOverlayController> controller_; 26 base::scoped_nsobject<AutofillOverlayController> controller_;
27 testing::NiceMock<autofill::MockAutofillDialogViewDelegate> delegate_; 27 testing::NiceMock<autofill::MockAutofillDialogViewDelegate> delegate_;
28 }; 28 };
29 29
30 } // namespace 30 } // namespace
31 31
32 TEST_VIEW(AutofillOverlayControllerTest, [controller_ view]) 32 TEST_VIEW(AutofillOverlayControllerTest, [controller_ view])
33 33
34 TEST_F(AutofillOverlayControllerTest, Subviews) { 34 TEST_F(AutofillOverlayControllerTest, Subviews) {
35 NSView* view = [controller_ view]; 35 NSView* view = [controller_ view];
36 ASSERT_EQ(1U, [[view subviews] count]); 36 EXPECT_TRUE([view isKindOfClass:[NSBox class]]);
37 37
38 EXPECT_TRUE([view isKindOfClass:[NSBox class]]); 38 ASSERT_EQ(2U, [[view subviews] count]);
39 EXPECT_TRUE([[[view subviews] objectAtIndex:0] isMemberOfClass: 39 EXPECT_TRUE(
40 [NSView class]]); 40 [[[view subviews] objectAtIndex:0] isKindOfClass:[NSView class]]);
41 EXPECT_TRUE(
42 [[[view subviews] objectAtIndex:0] conformsToProtocol:
43 @protocol(AutofillLayout)]);
44 EXPECT_TRUE(
45 [[[view subviews] objectAtIndex:1] isMemberOfClass:[NSImageView class]]);
41 } 46 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698