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

Side by Side Diff: cc/test/layer_tree_test.h

Issue 12907011: cc: Allow command line flag to prevent unit test timeouts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | cc/test/layer_tree_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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 CC_TEST_LAYER_TREE_TEST_COMMON_H_ 5 #ifndef CC_TEST_LAYER_TREE_TEST_COMMON_H_
6 #define CC_TEST_LAYER_TREE_TEST_COMMON_H_ 6 #define CC_TEST_LAYER_TREE_TEST_COMMON_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "cc/base/thread.h" 10 #include "cc/base/thread.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 scoped_ptr<LayerTreeHost> layer_tree_host_; 149 scoped_ptr<LayerTreeHost> layer_tree_host_;
150 150
151 bool beginning_; 151 bool beginning_;
152 bool end_when_begin_returns_; 152 bool end_when_begin_returns_;
153 bool timed_out_; 153 bool timed_out_;
154 bool scheduled_; 154 bool scheduled_;
155 bool schedule_when_set_visible_true_; 155 bool schedule_when_set_visible_true_;
156 bool started_; 156 bool started_;
157 bool ended_; 157 bool ended_;
158 158
159 int timeout_seconds_;
160
159 scoped_ptr<Thread> main_ccthread_; 161 scoped_ptr<Thread> main_ccthread_;
160 scoped_ptr<base::Thread> impl_thread_; 162 scoped_ptr<base::Thread> impl_thread_;
161 base::CancelableClosure timeout_; 163 base::CancelableClosure timeout_;
162 base::WeakPtr<LayerTreeTest> main_thread_weak_ptr_; 164 base::WeakPtr<LayerTreeTest> main_thread_weak_ptr_;
163 base::WeakPtrFactory<LayerTreeTest> weak_factory_; 165 base::WeakPtrFactory<LayerTreeTest> weak_factory_;
164 }; 166 };
165 167
166 } // namespace cc 168 } // namespace cc
167 169
168 #define SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 170 #define SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME) \
169 TEST_F(TEST_FIXTURE_NAME, RunSingleThread) { \ 171 TEST_F(TEST_FIXTURE_NAME, RunSingleThread) { \
170 RunTest(false); \ 172 RunTest(false); \
171 } 173 }
172 174
173 #define MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 175 #define MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
174 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \ 176 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \
175 RunTest(true); \ 177 RunTest(true); \
176 } 178 }
177 179
178 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 180 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
179 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 181 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME) \
180 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) 182 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME)
181 183
182 #endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_ 184 #endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « no previous file | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698