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

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

Issue 214047: Allow an entire InProcessBrowserTest subclass to configure the host resolver ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « no previous file | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 7
8 #include "net/base/mock_host_resolver.h" 8 #include "net/base/mock_host_resolver.h"
9 #include "net/url_request/url_request_unittest.h" 9 #include "net/url_request/url_request_unittest.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // needs to be deleted or not. 57 // needs to be deleted or not.
58 virtual bool ShouldDeleteProfile() { return true; } 58 virtual bool ShouldDeleteProfile() { return true; }
59 59
60 protected: 60 protected:
61 // Returns the browser created by CreateBrowser. 61 // Returns the browser created by CreateBrowser.
62 Browser* browser() const { return browser_; } 62 Browser* browser() const { return browser_; }
63 63
64 // Override this rather than TestBody. 64 // Override this rather than TestBody.
65 virtual void RunTestOnMainThread() = 0; 65 virtual void RunTestOnMainThread() = 0;
66 66
67 // We need these special methods because InProcessBrowserTest::SetUp is the
68 // bottom of the stack that winds up calling your test method, so it is not
69 // always an option to do what you want by overriding it and calling the
70 // superclass version.
71 //
72 // Override this for things you would normally override SetUp for. It will be
73 // called before your individual test fixture method is run, but after most
74 // of the overhead initialization has occured.
75 virtual void SetUpInProcessBrowserTestFixture() {}
76
77 // Override this for things you would normally override TearDown for.
78 virtual void TearDownInProcessBrowserTestFixture() {}
79
67 // Override this to add command line flags specific to your test. 80 // Override this to add command line flags specific to your test.
68 virtual void SetUpCommandLine(CommandLine* command_line) {} 81 virtual void SetUpCommandLine(CommandLine* command_line) {}
69 82
70 // Override this to add any custom cleanup code that needs to be done on the 83 // Override this to add any custom cleanup code that needs to be done on the
71 // main thread before the browser is torn down. 84 // main thread before the browser is torn down.
72 virtual void CleanUpOnMainThread() {} 85 virtual void CleanUpOnMainThread() {}
73 86
74 // Invoked when a test is not finishing in a timely manner. 87 // Invoked when a test is not finishing in a timely manner.
75 void TimedOut(); 88 void TimedOut();
76 89
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ 179 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\
167 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() 180 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread()
168 181
169 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\ 182 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\
170 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\ 183 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\
171 ::testing::internal::GetTypeId<test_fixture>()) 184 ::testing::internal::GetTypeId<test_fixture>())
172 185
173 #endif // defined(ALLOW_IN_PROC_BROWSER_TEST) 186 #endif // defined(ALLOW_IN_PROC_BROWSER_TEST)
174 187
175 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ 188 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/test/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698