Chromium Code Reviews| Index: chrome/browser/ui/cocoa/autofill/autofill_details_container_unittest.mm |
| diff --git a/chrome/browser/ui/cocoa/autofill/autofill_details_container_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_details_container_unittest.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..184f17d91f7ab06477a3d029b2f214ed8a51f221 |
| --- /dev/null |
| +++ b/chrome/browser/ui/cocoa/autofill/autofill_details_container_unittest.mm |
| @@ -0,0 +1,37 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#import "chrome/browser/ui/cocoa/autofill/autofill_details_container.h" |
| + |
| +#include "base/memory/scoped_nsobject.h" |
| +#include "chrome/browser/ui/autofill/mock_autofill_dialog_controller.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| +#include "testing/platform_test.h" |
| +#import "ui/base/test/ui_cocoa_test_helper.h" |
| + |
| +namespace { |
| + |
| +class AutofillDetailsContainerTest : public ui::CocoaTest { |
| + public: |
| + virtual void SetUp() { |
|
sail
2013/05/01 17:12:36
Could do this in the constructor too (like your ot
groby-ooo-7-16
2013/05/01 20:37:44
Done.
|
| + CocoaTest::SetUp(); |
| + container_.reset([[AutofillDetailsContainer alloc] initWithController: |
| + &controller_]); |
| + [[test_window() contentView] addSubview:[container_ view]]; |
| + } |
| + |
| + protected: |
| + scoped_nsobject<AutofillDetailsContainer> container_; |
| + testing::NiceMock<autofill::MockAutofillDialogController> controller_; |
| +}; |
| + |
| +} // namespace |
| + |
| +TEST_VIEW(AutofillDetailsContainerTest, [container_ view]) |
| + |
| +TEST_F(AutofillDetailsContainerTest, BasicProperties) { |
| + EXPECT_GT([[[container_ view] subviews] count], 0U); |
| + EXPECT_GT(NSHeight([[container_ view] frame]), 0); |
| + EXPECT_GT(NSWidth([[container_ view] frame]), 0); |
| +} |