OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | |
8 | 7 |
9 // We only want to use InProcessBrowserTest in test targets which properly | 8 // We only want to use InProcessBrowserTest in test targets which properly |
10 // 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. |
11 // 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. |
12 // | 11 // |
13 // 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 |
14 // anyway - otherwise the second test crashes. | 13 // anyway - otherwise the second test crashes. |
15 #if defined(HAS_OUT_OF_PROC_TEST_RUNNER) | 14 #if defined(HAS_OUT_OF_PROC_TEST_RUNNER) |
16 | 15 |
17 #if defined(BROWSER_TESTS_HEADER_OVERRIDE) | 16 #if defined(BROWSER_TESTS_HEADER_OVERRIDE) |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ | 75 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ |
77 }; \ | 76 }; \ |
78 int GTEST_TEST_CLASS_NAME_(test_case_name, \ | 77 int GTEST_TEST_CLASS_NAME_(test_case_name, \ |
79 test_name)::gtest_registering_dummy_ = \ | 78 test_name)::gtest_registering_dummy_ = \ |
80 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \ | 79 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \ |
81 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() | 80 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() |
82 | 81 |
83 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER) | 82 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER) |
84 | 83 |
85 #endif // CONTENT_TEST_BROWSER_TEST_H_ | 84 #endif // CONTENT_TEST_BROWSER_TEST_H_ |
OLD | NEW |