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

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

Issue 150213: Add a ExtensionBrowserTest base class (Closed)
Patch Set: added timeouts fixed other tests Created 11 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
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/url_request/url_request_unittest.h" 8 #include "net/url_request/url_request_unittest.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 protected: 55 protected:
56 // Returns the browser created by CreateBrowser. 56 // Returns the browser created by CreateBrowser.
57 Browser* browser() const { return browser_; } 57 Browser* browser() const { return browser_; }
58 58
59 // Override this rather than TestBody. 59 // Override this rather than TestBody.
60 virtual void RunTestOnMainThread() = 0; 60 virtual void RunTestOnMainThread() = 0;
61 61
62 // Override this to add command line flags specific to your test. 62 // Override this to add command line flags specific to your test.
63 virtual void SetUpCommandLine(CommandLine* command_line) {} 63 virtual void SetUpCommandLine(CommandLine* command_line) {}
64 64
65 // Override this to add any custom cleanup code that needs to be done on the
66 // main thread before the browser is torn down.
67 virtual void CleanUpOnMainThread() {}
68
65 // Allows subclasses to configure the host mapper. By default this blocks 69 // Allows subclasses to configure the host mapper. By default this blocks
66 // requests to google.com as Chrome pings that on startup and we don't want to 70 // requests to google.com as Chrome pings that on startup and we don't want to
67 // do that during testing. 71 // do that during testing.
68 virtual void ConfigureHostMapper(net::RuleBasedHostMapper* host_mapper); 72 virtual void ConfigureHostMapper(net::RuleBasedHostMapper* host_mapper);
69 73
70 // Invoked when a test is not finishing in a timely manner. 74 // Invoked when a test is not finishing in a timely manner.
71 void TimedOut(); 75 void TimedOut();
72 76
73 // Starts an HTTP server. 77 // Starts an HTTP server.
74 HTTPTestServer* StartHTTPServer(); 78 HTTPTestServer* StartHTTPServer();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 parent_class::TearDownTestCase, \ 144 parent_class::TearDownTestCase, \
141 new ::testing::internal::TestFactoryImpl<\ 145 new ::testing::internal::TestFactoryImpl<\
142 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ 146 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\
143 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() 147 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread()
144 148
145 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\ 149 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\
146 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\ 150 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\
147 ::testing::internal::GetTypeId<test_fixture>()) 151 ::testing::internal::GetTypeId<test_fixture>())
148 152
149 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ 153 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698