OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "base/scoped_nsobject.h" | 5 #include "base/scoped_nsobject.h" |
6 #import "chrome/browser/autofill/autofill_credit_card_view_controller_mac.h" | 6 #import "chrome/browser/autofill/autofill_credit_card_sheet_controller_mac.h" |
7 #include "chrome/browser/autofill/credit_card.h" | 7 #include "chrome/browser/autofill/credit_card.h" |
8 #include "chrome/browser/cocoa/browser_test_helper.h" | 8 #include "chrome/browser/cocoa/browser_test_helper.h" |
9 #import "chrome/browser/cocoa/cocoa_test_helper.h" | 9 #import "chrome/browser/cocoa/cocoa_test_helper.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 typedef CocoaTest AutoFillCreditCardViewControllerTest; | 14 typedef CocoaTest AutoFillCreditCardSheetControllerTest; |
15 | 15 |
16 TEST(AutoFillCreditCardViewControllerTest, Basic) { | 16 TEST(AutoFillCreditCardSheetControllerTest, Basic) { |
17 // A basic test that creates a new instance and releases. | 17 // A basic test that creates a new instance and releases. |
18 // Aids valgrind leak detection. | 18 // Aids valgrind leak detection. |
19 CreditCard credit_card(ASCIIToUTF16("myCC"), 0); | 19 CreditCard credit_card(ASCIIToUTF16("myCC"), 0); |
20 scoped_nsobject<AutoFillCreditCardViewController> controller( | 20 scoped_nsobject<AutoFillCreditCardSheetController> controller( |
21 [[AutoFillCreditCardViewController alloc] | 21 [[AutoFillCreditCardSheetController alloc] |
22 initWithCreditCard:credit_card | 22 initWithCreditCard:credit_card |
23 disclosure:NSOffState | 23 mode:kAutoFillCreditCardAddMode |
24 controller:nil]); | 24 controller:nil]); |
25 EXPECT_TRUE(controller.get()); | 25 EXPECT_TRUE(controller.get()); |
26 } | 26 } |
27 | 27 |
28 } // namespace | 28 } // namespace |
| 29 |
OLD | NEW |