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

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

Issue 178037: Make all of our unit tests be PlatformTests to get an autorelease pool.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/scoped_nsautorelease_pool.h" 7 #include "base/scoped_nsautorelease_pool.h"
8 #include "base/scoped_nsobject.h" 8 #include "base/scoped_nsobject.h"
9 #include "chrome/browser/cocoa/browser_test_helper.h" 9 #include "chrome/browser/cocoa/browser_test_helper.h"
10 #import "chrome/browser/cocoa/cocoa_test_helper.h" 10 #import "chrome/browser/cocoa/cocoa_test_helper.h"
11 #import "chrome/browser/cocoa/infobar_container_controller.h" 11 #import "chrome/browser/cocoa/infobar_container_controller.h"
12 #include "chrome/browser/cocoa/infobar_test_helper.h" 12 #include "chrome/browser/cocoa/infobar_test_helper.h"
13 #import "chrome/browser/cocoa/view_resizer_pong.h" 13 #import "chrome/browser/cocoa/view_resizer_pong.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "testing/platform_test.h"
15 16
16 namespace { 17 namespace {
17 18
18 class InfoBarContainerControllerTest : public testing::Test { 19 class InfoBarContainerControllerTest : public PlatformTest {
19 virtual void SetUp() { 20 virtual void SetUp() {
20 resizeDelegate_.reset([[ViewResizerPong alloc] init]); 21 resizeDelegate_.reset([[ViewResizerPong alloc] init]);
21 TabStripModel* model = browser_helper_.browser()->tabstrip_model(); 22 TabStripModel* model = browser_helper_.browser()->tabstrip_model();
22 controller_.reset([[InfoBarContainerController alloc] 23 controller_.reset([[InfoBarContainerController alloc]
23 initWithTabStripModel:model 24 initWithTabStripModel:model
24 resizeDelegate:resizeDelegate_.get()]); 25 resizeDelegate:resizeDelegate_.get()]);
25 } 26 }
26 27
27 public: 28 public:
28 // Order is very important here. We want the controller deleted 29 // Order is very important here. We want the controller deleted
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 94
94 [controller_ addInfoBar:&alertDelegate]; 95 [controller_ addInfoBar:&alertDelegate];
95 [controller_ addInfoBar:&linkDelegate]; 96 [controller_ addInfoBar:&linkDelegate];
96 [controller_ addInfoBar:&confirmDelegate]; 97 [controller_ addInfoBar:&confirmDelegate];
97 EXPECT_EQ(3U, [[view subviews] count]); 98 EXPECT_EQ(3U, [[view subviews] count]);
98 99
99 [controller_ removeAllInfoBars]; 100 [controller_ removeAllInfoBars];
100 EXPECT_EQ(0U, [[view subviews] count]); 101 EXPECT_EQ(0U, [[view subviews] count]);
101 } 102 }
102 } // namespace 103 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698