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

Side by Side Diff: chrome/test/in_process_browser_test.h

Issue 4947002: Mac: Let browser_tests run in bundled mode for their whole lifetime. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: test Created 10 years, 1 month 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 | « chrome/common/pepper_plugin_registry.cc ('k') | chrome/test/in_process_browser_test.cc » ('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) 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 virtual void TearDownInProcessBrowserTestFixture() {} 103 virtual void TearDownInProcessBrowserTestFixture() {}
104 104
105 // Override this to add command line flags specific to your test. 105 // Override this to add command line flags specific to your test.
106 virtual void SetUpCommandLine(CommandLine* command_line) {} 106 virtual void SetUpCommandLine(CommandLine* command_line) {}
107 107
108 // Override this to add any custom cleanup code that needs to be done on the 108 // Override this to add any custom cleanup code that needs to be done on the
109 // main thread before the browser is torn down. 109 // main thread before the browser is torn down.
110 virtual void CleanUpOnMainThread() {} 110 virtual void CleanUpOnMainThread() {}
111 111
112 // Returns the testing server. Guaranteed to be non-NULL. 112 // Returns the testing server. Guaranteed to be non-NULL.
113 net::TestServer* test_server() { return &test_server_; } 113 net::TestServer* test_server() { return test_server_.get(); }
114 114
115 // Creates a browser with a single tab (about:blank), waits for the tab to 115 // Creates a browser with a single tab (about:blank), waits for the tab to
116 // finish loading and shows the browser. 116 // finish loading and shows the browser.
117 // 117 //
118 // This is invoked from Setup. 118 // This is invoked from Setup.
119 virtual Browser* CreateBrowser(Profile* profile); 119 virtual Browser* CreateBrowser(Profile* profile);
120 120
121 // Creates a browser for a popup window with a single tab (about:blank), waits 121 // Creates a browser for a popup window with a single tab (about:blank), waits
122 // for the tab to finish loading, and shows the browser. 122 // for the tab to finish loading, and shows the browser.
123 Browser* CreateBrowserForPopup(Profile* profile); 123 Browser* CreateBrowserForPopup(Profile* profile);
(...skipping 22 matching lines...) Expand all
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 // Browser created from CreateBrowser. 152 // Browser created from CreateBrowser.
153 Browser* browser_; 153 Browser* browser_;
154 154
155 // Testing server, started on demand. 155 // Testing server, started on demand.
156 net::TestServer test_server_; 156 scoped_ptr<net::TestServer> test_server_;
157 157
158 // Whether this test requires the browser windows to be shown (interactive 158 // Whether this test requires the browser windows to be shown (interactive
159 // tests for example need the windows shown). 159 // tests for example need the windows shown).
160 bool show_window_; 160 bool show_window_;
161 161
162 // Whether the JavaScript can access the DOMAutomationController (a JS object 162 // Whether the JavaScript can access the DOMAutomationController (a JS object
163 // that can send messages back to the browser). 163 // that can send messages back to the browser).
164 bool dom_automation_enabled_; 164 bool dom_automation_enabled_;
165 165
166 // Whether this test requires the TabCloseableStateWatcher. 166 // Whether this test requires the TabCloseableStateWatcher.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ 214 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\
215 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() 215 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread()
216 216
217 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\ 217 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\
218 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\ 218 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\
219 ::testing::internal::GetTypeId<test_fixture>()) 219 ::testing::internal::GetTypeId<test_fixture>())
220 220
221 #endif // defined(ALLOW_IN_PROC_BROWSER_TEST) 221 #endif // defined(ALLOW_IN_PROC_BROWSER_TEST)
222 222
223 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ 223 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « chrome/common/pepper_plugin_registry.cc ('k') | chrome/test/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698