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

Unified Diff: chrome/browser/cocoa/find_bar_cocoa_controller_unittest.mm

Issue 402066: Moved a whole pile of unittests over to CocoaTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/event_utils_unittest.mm ('k') | chrome/browser/cocoa/find_bar_view_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/find_bar_cocoa_controller_unittest.mm
===================================================================
--- chrome/browser/cocoa/find_bar_cocoa_controller_unittest.mm (revision 32421)
+++ chrome/browser/cocoa/find_bar_cocoa_controller_unittest.mm (working copy)
@@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import <Cocoa/Cocoa.h>
-
-#include "base/scoped_ptr.h"
-#include "base/scoped_nsobject.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/browser_window.h"
@@ -40,22 +36,20 @@
namespace {
-class FindBarCocoaControllerTest : public PlatformTest {
+class FindBarCocoaControllerTest : public CocoaTest {
public:
virtual void SetUp() {
- PlatformTest::SetUp();
-
- // TODO(rohitrao): We don't really need to do this once per test.
- // Consider moving it to SetUpTestCase().
+ CocoaTest::SetUp();
controller_.reset([[FindBarCocoaController alloc] init]);
- [helper_.contentView() addSubview:[controller_ view]];
+ [[test_window() contentView] addSubview:[controller_ view]];
}
protected:
- CocoaTestHelper helper_;
scoped_nsobject<FindBarCocoaController> controller_;
};
+TEST_VIEW(FindBarCocoaControllerTest, [controller_ view])
+
TEST_F(FindBarCocoaControllerTest, ShowAndHide) {
NSView* findBarView = [controller_ findBarView];
@@ -105,7 +99,7 @@
TEST_F(FindBarCocoaControllerTest, FindTextIsGlobal) {
scoped_nsobject<FindBarCocoaController> otherController(
[[FindBarCocoaController alloc] init]);
- [helper_.contentView() addSubview:[otherController view]];
+ [[test_window() contentView] addSubview:[otherController view]];
// Setting the text in one controller should update the other controller's
// text as well.
« no previous file with comments | « chrome/browser/cocoa/event_utils_unittest.mm ('k') | chrome/browser/cocoa/find_bar_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698