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

Side by Side Diff: chrome/browser/cocoa/find_bar_bridge_unittest.mm

Issue 334016: First set of unittest fixes. Many more to come ;-)... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/find_bar_controller.h" 5 #include "chrome/browser/find_bar_controller.h"
6 #include "chrome/browser/cocoa/cocoa_test_helper.h" 6 #include "chrome/browser/cocoa/cocoa_test_helper.h"
7 #include "chrome/browser/cocoa/find_bar_bridge.h" 7 #include "chrome/browser/cocoa/find_bar_bridge.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "testing/platform_test.h"
10 8
11 namespace { 9 namespace {
12 10
13 class FindBarBridgeTest : public PlatformTest { 11 class FindBarBridgeTest : public CocoaTest {
14 protected:
15 CocoaTestHelper helper_;
16 }; 12 };
17 13
18 TEST_F(FindBarBridgeTest, Creation) { 14 TEST_F(FindBarBridgeTest, Creation) {
19 // Make sure the FindBarBridge constructor doesn't crash and 15 // Make sure the FindBarBridge constructor doesn't crash and
20 // properly initializes its FindBarCocoaController. 16 // properly initializes its FindBarCocoaController.
21 FindBarBridge bridge; 17 FindBarBridge bridge;
22 EXPECT_TRUE(bridge.find_bar_cocoa_controller() != NULL); 18 EXPECT_TRUE(bridge.find_bar_cocoa_controller() != NULL);
23 } 19 }
24 20
25 TEST_F(FindBarBridgeTest, Accessors) { 21 TEST_F(FindBarBridgeTest, Accessors) {
26 // Get/SetFindBarController are virtual methods implemented in 22 // Get/SetFindBarController are virtual methods implemented in
27 // FindBarBridge, so we test them here. 23 // FindBarBridge, so we test them here.
28 FindBarBridge* bridge = new FindBarBridge(); 24 FindBarBridge* bridge = new FindBarBridge();
29 FindBarController controller(bridge); // takes ownership of |bridge|. 25 FindBarController controller(bridge); // takes ownership of |bridge|.
30 bridge->SetFindBarController(&controller); 26 bridge->SetFindBarController(&controller);
31 27
32 EXPECT_EQ(&controller, bridge->GetFindBarController()); 28 EXPECT_EQ(&controller, bridge->GetFindBarController());
33 } 29 }
34 } // namespace 30 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/extension_shelf_controller_unittest.mm ('k') | chrome/browser/cocoa/infobar_gradient_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698