| 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_address_view_controller_mac.h" | 6 #import "chrome/browser/autofill/autofill_address_sheet_controller_mac.h" |
| 7 #include "chrome/browser/autofill/autofill_profile.h" | 7 #include "chrome/browser/autofill/autofill_profile.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 AutoFillAddressViewControllerTest; | 14 typedef CocoaTest AutoFillAddressSheetControllerTest; |
| 15 | 15 |
| 16 TEST(AutoFillAddressViewControllerTest, Basic) { | 16 TEST(AutoFillAddressSheetControllerTest, 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 AutoFillProfile profile(ASCIIToUTF16("Home"), 0); | 19 AutoFillProfile profile(ASCIIToUTF16("Home"), 0); |
| 20 scoped_nsobject<AutoFillAddressViewController> controller( | 20 scoped_nsobject<AutoFillAddressSheetController> controller( |
| 21 [[AutoFillAddressViewController alloc] | 21 [[AutoFillAddressSheetController alloc] |
| 22 initWithProfile:profile | 22 initWithProfile:profile |
| 23 disclosure:NSOffState | 23 mode:kAutoFillAddressAddMode]); |
| 24 controller:nil]); | |
| 25 EXPECT_TRUE(controller.get()); | 24 EXPECT_TRUE(controller.get()); |
| 26 } | 25 } |
| 27 | 26 |
| 28 } // namespace | 27 } // namespace |
| OLD | NEW |