OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "cc/trees/threaded_channel.h" | 5 #include "cc/trees/threaded_channel.h" |
6 | 6 |
7 #include "cc/test/layer_tree_test.h" | 7 #include "cc/test/layer_tree_test.h" |
8 #include "cc/trees/single_thread_proxy.h" | 8 #include "cc/trees/single_thread_proxy.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 259 |
260 MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 260 MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
261 ThreadedChannelTestBeginMainFrameNotExpectedSoon); | 261 ThreadedChannelTestBeginMainFrameNotExpectedSoon); |
262 | 262 |
263 class ThreadedChannelTestSetAnimationEvents : public ThreadedChannelTest { | 263 class ThreadedChannelTestSetAnimationEvents : public ThreadedChannelTest { |
264 void BeginChannelTest() override { PostOnImplThread(); } | 264 void BeginChannelTest() override { PostOnImplThread(); } |
265 | 265 |
266 void StartTestOnImplThread() override { | 266 void StartTestOnImplThread() override { |
267 scoped_ptr<AnimationEventsVector> events( | 267 scoped_ptr<AnimationEventsVector> events( |
268 make_scoped_ptr(new AnimationEventsVector)); | 268 make_scoped_ptr(new AnimationEventsVector)); |
269 thread_proxy_->PostAnimationEventsToMainThreadOnImplThread(events.Pass()); | 269 thread_proxy_->PostAnimationEventsToMainThreadOnImplThread( |
| 270 std::move(events)); |
270 } | 271 } |
271 | 272 |
272 void ReceivedSetAnimationEvents() override { | 273 void ReceivedSetAnimationEvents() override { |
273 calls_received_++; | 274 calls_received_++; |
274 EndTest(); | 275 EndTest(); |
275 } | 276 } |
276 | 277 |
277 void AfterTest() override { EXPECT_EQ(1, calls_received_); } | 278 void AfterTest() override { EXPECT_EQ(1, calls_received_); } |
278 }; | 279 }; |
279 | 280 |
(...skipping 27 matching lines...) Expand all Loading... |
307 calls_received_++; | 308 calls_received_++; |
308 EndTest(); | 309 EndTest(); |
309 } | 310 } |
310 | 311 |
311 void AfterTest() override { EXPECT_EQ(1, calls_received_); } | 312 void AfterTest() override { EXPECT_EQ(1, calls_received_); } |
312 }; | 313 }; |
313 | 314 |
314 MULTI_THREAD_DIRECT_RENDERER_TEST_F(ThreadedChannelTestPageScaleAnimation); | 315 MULTI_THREAD_DIRECT_RENDERER_TEST_F(ThreadedChannelTestPageScaleAnimation); |
315 | 316 |
316 } // namespace cc | 317 } // namespace cc |
OLD | NEW |