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

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

Issue 151158: Adding time-out to browser tests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
« no previous file with comments | « base/message_loop.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) 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Allows subclasses to configure the host mapper. By default this blocks 65 // 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 66 // requests to google.com as Chrome pings that on startup and we don't want to
67 // do that during testing. 67 // do that during testing.
68 virtual void ConfigureHostMapper(net::RuleBasedHostMapper* host_mapper); 68 virtual void ConfigureHostMapper(net::RuleBasedHostMapper* host_mapper);
69 69
70 // Invoked when a test is not finishing in a timely manner.
71 void TimedOut();
72
70 // Starts an HTTP server. 73 // Starts an HTTP server.
71 HTTPTestServer* StartHTTPServer(); 74 HTTPTestServer* StartHTTPServer();
72 75
73 // Creates a browser with a single tab (about:blank), waits for the tab to 76 // Creates a browser with a single tab (about:blank), waits for the tab to
74 // finish loading and shows the browser. 77 // finish loading and shows the browser.
75 // 78 //
76 // This is invoked from Setup. 79 // This is invoked from Setup.
77 virtual Browser* CreateBrowser(Profile* profile); 80 virtual Browser* CreateBrowser(Profile* profile);
78 81
79 // Sets some test states (see below for comments). Call this in your test 82 // Sets some test states (see below for comments). Call this in your test
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 parent_class::TearDownTestCase, \ 140 parent_class::TearDownTestCase, \
138 new ::testing::internal::TestFactoryImpl<\ 141 new ::testing::internal::TestFactoryImpl<\
139 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ 142 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\
140 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() 143 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread()
141 144
142 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\ 145 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\
143 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\ 146 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\
144 ::testing::internal::GetTypeId<test_fixture>()) 147 ::testing::internal::GetTypeId<test_fixture>())
145 148
146 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ 149 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « base/message_loop.cc ('k') | chrome/test/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698