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

Unified Diff: chrome/test/testing_browser_process.cc

Issue 7601006: GTTF: Use a fresh TestingBrowserProcess for each test, part #5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/base/in_process_browser_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/testing_browser_process.cc
===================================================================
--- chrome/test/testing_browser_process.cc (revision 96265)
+++ chrome/test/testing_browser_process.cc (working copy)
@@ -269,6 +269,11 @@
}
ScopedTestingBrowserProcess::ScopedTestingBrowserProcess() {
+#if defined(OS_WIN)
+ // This is not really Windows-specific, the transition is just being done
+ // in stages, and Windows is first. See below for more info.
+ DCHECK(!g_browser_process);
+#else
// TODO(phajdan.jr): Temporary, for http://crbug.com/61062.
// ChromeTestSuite sets up a global TestingBrowserProcess
// for all tests. We need to get rid of it, because it contains
@@ -276,7 +281,7 @@
// per thread.
DCHECK(g_browser_process);
delete g_browser_process;
-
+#endif
browser_process_.reset(new TestingBrowserProcess);
g_browser_process = browser_process_.get();
}
@@ -284,9 +289,15 @@
ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() {
DCHECK_EQ(browser_process_.get(), g_browser_process);
+#if defined(OS_WIN)
+ // This is not really Windows-specific, the transition is just being done
+ // in stages, and Windows is first. See below for more info.
+ g_browser_process = NULL;
+#else
// TODO(phajdan.jr): Temporary, for http://crbug.com/61062.
// After the transition is over, we should just
// reset |g_browser_process| to NULL.
browser_process_.reset();
g_browser_process = new TestingBrowserProcess();
+#endif
}
« no previous file with comments | « chrome/test/base/in_process_browser_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698