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

Side by Side Diff: chrome/test/browser_with_test_window_test.cc

Issue 6532034: GTTF: Use a fresh TestingBrowserProcess for each test, part #2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 10 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
« no previous file with comments | « chrome/test/browser_with_test_window_test.h ('k') | third_party/cld/cld.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/test/browser_with_test_window_test.h" 5 #include "chrome/test/browser_with_test_window_test.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <ole2.h> 8 #include <ole2.h>
9 #endif // defined(OS_WIN) 9 #endif // defined(OS_WIN)
10 10
(...skipping 11 matching lines...) Expand all
22 BrowserWithTestWindowTest::BrowserWithTestWindowTest() 22 BrowserWithTestWindowTest::BrowserWithTestWindowTest()
23 : ui_thread_(BrowserThread::UI, message_loop()), 23 : ui_thread_(BrowserThread::UI, message_loop()),
24 rph_factory_(), 24 rph_factory_(),
25 rvh_factory_(&rph_factory_) { 25 rvh_factory_(&rph_factory_) {
26 #if defined(OS_WIN) 26 #if defined(OS_WIN)
27 OleInitialize(NULL); 27 OleInitialize(NULL);
28 #endif 28 #endif
29 } 29 }
30 30
31 void BrowserWithTestWindowTest::SetUp() { 31 void BrowserWithTestWindowTest::SetUp() {
32 TestingBrowserProcessTest::SetUp();
33
32 // NOTE: I have a feeling we're going to want virtual methods for creating 34 // NOTE: I have a feeling we're going to want virtual methods for creating
33 // these, as such they're in SetUp instead of the constructor. 35 // these, as such they're in SetUp instead of the constructor.
34 profile_.reset(new TestingProfile()); 36 profile_.reset(new TestingProfile());
35 browser_.reset(new Browser(Browser::TYPE_NORMAL, profile())); 37 browser_.reset(new Browser(Browser::TYPE_NORMAL, profile()));
36 window_.reset(new TestBrowserWindow(browser())); 38 window_.reset(new TestBrowserWindow(browser()));
37 browser_->set_window(window_.get()); 39 browser_->set_window(window_.get());
38 } 40 }
39 41
40 BrowserWithTestWindowTest::~BrowserWithTestWindowTest() { 42 BrowserWithTestWindowTest::~BrowserWithTestWindowTest() {
41 // Make sure we close all tabs, otherwise Browser isn't happy in its 43 // Make sure we close all tabs, otherwise Browser isn't happy in its
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 void BrowserWithTestWindowTest::NavigateAndCommit( 98 void BrowserWithTestWindowTest::NavigateAndCommit(
97 NavigationController* controller, 99 NavigationController* controller,
98 const GURL& url) { 100 const GURL& url) {
99 controller->LoadURL(url, GURL(), PageTransition::LINK); 101 controller->LoadURL(url, GURL(), PageTransition::LINK);
100 CommitPendingLoad(controller); 102 CommitPendingLoad(controller);
101 } 103 }
102 104
103 void BrowserWithTestWindowTest::NavigateAndCommitActiveTab(const GURL& url) { 105 void BrowserWithTestWindowTest::NavigateAndCommitActiveTab(const GURL& url) {
104 NavigateAndCommit(&browser()->GetSelectedTabContents()->controller(), url); 106 NavigateAndCommit(&browser()->GetSelectedTabContents()->controller(), url);
105 } 107 }
OLDNEW
« no previous file with comments | « chrome/test/browser_with_test_window_test.h ('k') | third_party/cld/cld.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698