OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ | 5 #ifndef CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ |
6 #define CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ | 6 #define CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
142 virtual bool CreateUserDataDirectory() WARN_UNUSED_RESULT; | 142 virtual bool CreateUserDataDirectory() WARN_UNUSED_RESULT; |
143 | 143 |
144 // This is invoked from main after browser_init/browser_main have completed. | 144 // This is invoked from main after browser_init/browser_main have completed. |
145 // This prepares for the test by creating a new browser, runs the test | 145 // This prepares for the test by creating a new browser, runs the test |
146 // (RunTestOnMainThread), quits the browsers and returns. | 146 // (RunTestOnMainThread), quits the browsers and returns. |
147 void RunTestOnMainThreadLoop(); | 147 void RunTestOnMainThreadLoop(); |
148 | 148 |
149 // Quits all open browsers and waits until there are no more browsers. | 149 // Quits all open browsers and waits until there are no more browsers. |
150 void QuitBrowsers(); | 150 void QuitBrowsers(); |
151 | 151 |
152 // Config commandlines that are common to InProcessBrowserTests. | |
153 void PrepareCommonInProcessBrowserTestCommandLine(CommandLine* arguments); | |
Paweł Hajdan Jr.
2010/11/11 10:15:25
nit: InProcessBrowserTest is already the class nam
| |
154 | |
152 // Browser created from CreateBrowser. | 155 // Browser created from CreateBrowser. |
153 Browser* browser_; | 156 Browser* browser_; |
154 | 157 |
155 // Testing server, started on demand. | 158 // Testing server, started on demand. |
156 net::TestServer test_server_; | 159 net::TestServer test_server_; |
157 | 160 |
158 // Whether this test requires the browser windows to be shown (interactive | 161 // Whether this test requires the browser windows to be shown (interactive |
159 // tests for example need the windows shown). | 162 // tests for example need the windows shown). |
160 bool show_window_; | 163 bool show_window_; |
161 | 164 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
214 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ | 217 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ |
215 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() | 218 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() |
216 | 219 |
217 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\ | 220 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\ |
218 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\ | 221 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\ |
219 ::testing::internal::GetTypeId<test_fixture>()) | 222 ::testing::internal::GetTypeId<test_fixture>()) |
220 | 223 |
221 #endif // defined(ALLOW_IN_PROC_BROWSER_TEST) | 224 #endif // defined(ALLOW_IN_PROC_BROWSER_TEST) |
222 | 225 |
223 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ | 226 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ |
OLD | NEW |