summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-27 19:34:25 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-27 19:34:25 +0000
commit78f42aaf7c2146cf86f2d0c8880467a037372f22 (patch)
tree5f85adaa515de386fc9628e085fd31cde690c38c /chrome/test
parent26fafd6ab357e619660d43e178868d6a11d45cc3 (diff)
downloadchromium_src-78f42aaf7c2146cf86f2d0c8880467a037372f22.zip
chromium_src-78f42aaf7c2146cf86f2d0c8880467a037372f22.tar.gz
chromium_src-78f42aaf7c2146cf86f2d0c8880467a037372f22.tar.bz2
Only allow in-process tests in few binaries.
And it is not the final set. The main goal of this patch is to prevent further regressions. TEST=none BUG=none Review URL: http://codereview.chromium.org/173547 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24644 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/in_process_browser_test.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/test/in_process_browser_test.h b/chrome/test/in_process_browser_test.h
index f229277..ac7139c 100644
--- a/chrome/test/in_process_browser_test.h
+++ b/chrome/test/in_process_browser_test.h
@@ -131,6 +131,11 @@ class InProcessBrowserTest : public testing::Test {
DISALLOW_COPY_AND_ASSIGN(InProcessBrowserTest);
};
+// We only want to use IN_PROC_BROWSER_TEST in binaries which will properly
+// isolate each test case. Otherwise hard-to-debug, possibly intermittent
+// crashes caused by carrying state in singletons are very likely.
+#if defined(ALLOW_IN_PROC_BROWSER_TEST)
+
#define IN_PROC_BROWSER_TEST_(test_case_name, test_name, parent_class,\
parent_id)\
class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\
@@ -160,4 +165,6 @@ void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread()
IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\
::testing::internal::GetTypeId<test_fixture>())
+#endif // defined(ALLOW_IN_PROC_BROWSER_TEST)
+
#endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_