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

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

Issue 14179022: Shouldn't access LayerTreeTest::layer_tree_host on impl thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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') | cc/trees/single_thread_proxy.cc » ('J')
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_H_ 5 #ifndef CC_TEST_LAYER_TREE_TEST_H_
6 #define CC_TEST_LAYER_TREE_TEST_H_ 6 #define CC_TEST_LAYER_TREE_TEST_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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 virtual void RunTest(bool threaded); 139 virtual void RunTest(bool threaded);
140 140
141 Thread* ImplThread() { return proxy() ? proxy()->ImplThread() : NULL; } 141 Thread* ImplThread() { return proxy() ? proxy()->ImplThread() : NULL; }
142 Proxy* proxy() const { 142 Proxy* proxy() const {
143 return layer_tree_host_ ? layer_tree_host_->proxy() : NULL; 143 return layer_tree_host_ ? layer_tree_host_->proxy() : NULL;
144 } 144 }
145 145
146 bool TestEnded() const { return ended_; } 146 bool TestEnded() const { return ended_; }
147 147
148 LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } 148 LayerTreeHost* layer_tree_host();
149 149
150 private: 150 private:
151 LayerTreeSettings settings_; 151 LayerTreeSettings settings_;
152 scoped_ptr<LayerTreeHostClientForTesting> client_; 152 scoped_ptr<LayerTreeHostClientForTesting> client_;
153 scoped_ptr<LayerTreeHost> layer_tree_host_; 153 scoped_ptr<LayerTreeHost> layer_tree_host_;
154 154
155 bool beginning_; 155 bool beginning_;
156 bool end_when_begin_returns_; 156 bool end_when_begin_returns_;
157 bool timed_out_; 157 bool timed_out_;
158 bool scheduled_; 158 bool scheduled_;
(...skipping 23 matching lines...) Expand all
182 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \ 182 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \
183 RunTest(true); \ 183 RunTest(true); \
184 } \ 184 } \
185 class MultiThreadNeedsSemicolon##TEST_FIXTURE_NAME {} 185 class MultiThreadNeedsSemicolon##TEST_FIXTURE_NAME {}
186 186
187 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 187 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
188 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME); \ 188 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME); \
189 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) 189 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME)
190 190
191 #endif // CC_TEST_LAYER_TREE_TEST_H_ 191 #endif // CC_TEST_LAYER_TREE_TEST_H_
OLDNEW
« no previous file with comments | « no previous file | cc/test/layer_tree_test.cc » ('j') | cc/trees/single_thread_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698