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

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

Issue 214047: Allow an entire InProcessBrowserTest subclass to configure the host resolver ... (Closed) Base URL: svn://chrome-svn/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
« no previous file with comments | « chrome/test/in_process_browser_test.h ('k') | chrome/test/live_sync/live_bookmarks_sync_test.h » ('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/in_process_browser_test.h" 5 #include "chrome/test/in_process_browser_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // Something inside the browser does this lookup implicitly. Make it fail 134 // Something inside the browser does this lookup implicitly. Make it fail
135 // to avoid external dependency. It won't break the tests. 135 // to avoid external dependency. It won't break the tests.
136 host_resolver_->AddSimulatedFailure("*.google.com"); 136 host_resolver_->AddSimulatedFailure("*.google.com");
137 137
138 // See http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol 138 // See http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol
139 // We don't want the test code to use it. 139 // We don't want the test code to use it.
140 host_resolver_->AddSimulatedFailure("wpad"); 140 host_resolver_->AddSimulatedFailure("wpad");
141 141
142 net::ScopedDefaultHostResolverProc scoped_host_resolver_proc( 142 net::ScopedDefaultHostResolverProc scoped_host_resolver_proc(
143 host_resolver_.get()); 143 host_resolver_.get());
144
145 SetUpInProcessBrowserTestFixture();
144 BrowserMain(params); 146 BrowserMain(params);
147 TearDownInProcessBrowserTestFixture();
145 } 148 }
146 149
147 void InProcessBrowserTest::TearDown() { 150 void InProcessBrowserTest::TearDown() {
148 // Reinstall testing browser process. 151 // Reinstall testing browser process.
149 delete g_browser_process; 152 delete g_browser_process;
150 g_browser_process = new TestingBrowserProcess(); 153 g_browser_process = new TestingBrowserProcess();
151 154
152 browser_shutdown::delete_resources_on_shutdown = true; 155 browser_shutdown::delete_resources_on_shutdown = true;
153 156
154 #if defined(WIN) 157 #if defined(WIN)
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 NewRunnableMethod(this, &InProcessBrowserTest::TimedOut), 254 NewRunnableMethod(this, &InProcessBrowserTest::TimedOut),
252 kSubsequentTimeoutInMS); 255 kSubsequentTimeoutInMS);
253 256
254 MessageLoopForUI::current()->Quit(); 257 MessageLoopForUI::current()->Quit();
255 } 258 }
256 259
257 void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) { 260 void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) {
258 DCHECK_GT(timeout_value, 0); 261 DCHECK_GT(timeout_value, 0);
259 initial_timeout_ = timeout_value; 262 initial_timeout_ = timeout_value;
260 } 263 }
OLDNEW
« no previous file with comments | « chrome/test/in_process_browser_test.h ('k') | chrome/test/live_sync/live_bookmarks_sync_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698