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

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

Issue 23674004: [rAC, OSX] Add overlay shield for interstitials/waits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes, next round. Created 7 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "chrome/browser/ui/cocoa/autofill/autofill_overlay_controller.h"
6
7 #include "base/mac/scoped_nsobject.h"
8 #include "chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h"
9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "testing/gtest_mac.h"
12 #import "ui/base/test/ui_cocoa_test_helper.h"
13
14 namespace {
15
16 class AutofillOverlayControllerTest : public ui::CocoaTest {
17 public:
18 virtual void SetUp() {
19 CocoaTest::SetUp();
20 controller_.reset(
21 [[AutofillOverlayController alloc] initWithDelegate:&delegate_]);
22 [[test_window() contentView] addSubview:[controller_ view]];
23 }
24
25 protected:
26 base::scoped_nsobject<AutofillOverlayController> controller_;
27 testing::NiceMock<autofill::MockAutofillDialogViewDelegate> delegate_;
28 };
29
30 } // namespace
31
32 TEST_VIEW(AutofillOverlayControllerTest, [controller_ view])
33
34 TEST_F(AutofillOverlayControllerTest, Subviews) {
35 NSView* view = [controller_ view];
36 ASSERT_EQ(1U, [[view subviews] count]);
37
38 EXPECT_TRUE([view isKindOfClass:[NSBox class]]);
39 EXPECT_TRUE([[[view subviews] objectAtIndex:0] isMemberOfClass:
40 [NSView class]]);
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698