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

Side by Side Diff: content/public/test/browser_test.h

Issue 10803026: Get content_browsertest working. I've added a simple test for now, and will convert the tests in sr… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: get it working on mac + linux, fix unittests crash, and fix unittest link error and add missing dep… Created 8 years, 5 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 | « content/content_tests.gypi ('k') | content/public/test/browser_test_utils.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_TEST_BROWSER_TEST_H_ 5 #ifndef CONTENT_TEST_BROWSER_TEST_H_
6 #define CONTENT_TEST_BROWSER_TEST_H_ 6 #define CONTENT_TEST_BROWSER_TEST_H_
7 7
8 // We only want to use InProcessBrowserTest in test targets which properly 8 // We only want to use InProcessBrowserTest in test targets which properly
9 // isolate each test case by running each test in a separate process. 9 // isolate each test case by running each test in a separate process.
10 // This way if a test hangs the test launcher can reliably terminate it. 10 // This way if a test hangs the test launcher can reliably terminate it.
11 // 11 //
12 // InProcessBrowserTest cannot be run more than once in the same address space 12 // InProcessBrowserTest cannot be run more than once in the same address space
13 // anyway - otherwise the second test crashes. 13 // anyway - otherwise the second test crashes.
14 #if defined(HAS_OUT_OF_PROC_TEST_RUNNER) 14 #if defined(HAS_OUT_OF_PROC_TEST_RUNNER)
15 15
16 #if defined(BROWSER_TESTS_HEADER_OVERRIDE)
17 #include BROWSER_TESTS_HEADER_OVERRIDE
18 #else
19 #include "content/test/content_browser_test.h"
20 typedef ContentBrowserTest InProcessBrowserTest;
21 #endif
22
23 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
24 17
25 #define IN_PROC_BROWSER_TEST_(test_case_name, test_name, parent_class,\ 18 #define IN_PROC_BROWSER_TEST_(test_case_name, test_name, parent_class,\
26 parent_id)\ 19 parent_id)\
27 class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\ 20 class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\
28 public:\ 21 public:\
29 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\ 22 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\
30 protected:\ 23 protected:\
31 virtual void RunTestOnMainThread() OVERRIDE;\ 24 virtual void RunTestOnMainThread() OVERRIDE;\
32 private:\ 25 private:\
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ 68 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
76 }; \ 69 }; \
77 int GTEST_TEST_CLASS_NAME_(test_case_name, \ 70 int GTEST_TEST_CLASS_NAME_(test_case_name, \
78 test_name)::gtest_registering_dummy_ = \ 71 test_name)::gtest_registering_dummy_ = \
79 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \ 72 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
80 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() 73 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread()
81 74
82 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER) 75 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER)
83 76
84 #endif // CONTENT_TEST_BROWSER_TEST_H_ 77 #endif // CONTENT_TEST_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/test/browser_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698