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

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

Issue 974323002: Componentize autofill dialog common code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 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_notification_container.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_notification_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 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
10 #include "chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h" 9 #include "chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h"
10 #include "components/autofill/core/browser/ui/autofill_dialog_types.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #import "ui/gfx/test/ui_cocoa_test_helper.h" 12 #import "ui/gfx/test/ui_cocoa_test_helper.h"
13 13
14 namespace { 14 namespace {
15 15
16 class AutofillNotificationContainerTest : public ui::CocoaTest { 16 class AutofillNotificationContainerTest : public ui::CocoaTest {
17 public: 17 public:
18 virtual void SetUp() { 18 virtual void SetUp() {
19 CocoaTest::SetUp(); 19 CocoaTest::SetUp();
20 container_.reset([[AutofillNotificationContainer alloc] initWithDelegate: 20 container_.reset([[AutofillNotificationContainer alloc] initWithDelegate:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 autofill::DialogNotification::REQUIRED_ACTION, 52 autofill::DialogNotification::REQUIRED_ACTION,
53 base::ASCIIToUTF16("test"))); 53 base::ASCIIToUTF16("test")));
54 ASSERT_FALSE(notifications[1].HasArrow()); 54 ASSERT_FALSE(notifications[1].HasArrow());
55 [container_ setNotifications:notifications]; 55 [container_ setNotifications:notifications];
56 56
57 EXPECT_EQ(2U, [[[container_ view] subviews] count]); 57 EXPECT_EQ(2U, [[[container_ view] subviews] count]);
58 58
59 // Just to exercise code path. 59 // Just to exercise code path.
60 [container_ performLayout]; 60 [container_ performLayout];
61 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698