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

Side by Side Diff: cc/trees/threaded_channel_unittest.cc

Issue 1584743002: CC Animation: Replace AnimiationEventsVector with AnimiationEvents class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 11 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
« no previous file with comments | « cc/trees/threaded_channel.cc ('k') | ui/compositor/layer.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/macros.h" 7 #include "base/macros.h"
8 #include "cc/animation/animation_events.h"
8 #include "cc/test/layer_tree_test.h" 9 #include "cc/test/layer_tree_test.h"
9 #include "cc/trees/single_thread_proxy.h" 10 #include "cc/trees/single_thread_proxy.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 namespace cc { 13 namespace cc {
13 14
14 // The ThreadedChannel tests are run only for threaded and direct mode. 15 // The ThreadedChannel tests are run only for threaded and direct mode.
15 class ThreadedChannelTest : public LayerTreeTest { 16 class ThreadedChannelTest : public LayerTreeTest {
16 protected: 17 protected:
17 ThreadedChannelTest() : calls_received_(0) {} 18 ThreadedChannelTest() : calls_received_(0) {}
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 void AfterTest() override { EXPECT_EQ(1, calls_received_); } 252 void AfterTest() override { EXPECT_EQ(1, calls_received_); }
252 }; 253 };
253 254
254 MULTI_THREAD_DIRECT_RENDERER_TEST_F( 255 MULTI_THREAD_DIRECT_RENDERER_TEST_F(
255 ThreadedChannelTestBeginMainFrameNotExpectedSoon); 256 ThreadedChannelTestBeginMainFrameNotExpectedSoon);
256 257
257 class ThreadedChannelTestSetAnimationEvents : public ThreadedChannelTest { 258 class ThreadedChannelTestSetAnimationEvents : public ThreadedChannelTest {
258 void BeginChannelTest() override { PostOnImplThread(); } 259 void BeginChannelTest() override { PostOnImplThread(); }
259 260
260 void StartTestOnImplThread() override { 261 void StartTestOnImplThread() override {
261 scoped_ptr<AnimationEventsVector> events( 262 scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
262 make_scoped_ptr(new AnimationEventsVector));
263 GetProxyImplForTest()->PostAnimationEventsToMainThreadOnImplThread( 263 GetProxyImplForTest()->PostAnimationEventsToMainThreadOnImplThread(
264 std::move(events)); 264 std::move(events));
265 } 265 }
266 266
267 void ReceivedSetAnimationEvents() override { 267 void ReceivedSetAnimationEvents() override {
268 calls_received_++; 268 calls_received_++;
269 EndTest(); 269 EndTest();
270 } 270 }
271 271
272 void AfterTest() override { EXPECT_EQ(1, calls_received_); } 272 void AfterTest() override { EXPECT_EQ(1, calls_received_); }
(...skipping 29 matching lines...) Expand all
302 calls_received_++; 302 calls_received_++;
303 EndTest(); 303 EndTest();
304 } 304 }
305 305
306 void AfterTest() override { EXPECT_EQ(1, calls_received_); } 306 void AfterTest() override { EXPECT_EQ(1, calls_received_); }
307 }; 307 };
308 308
309 MULTI_THREAD_DIRECT_RENDERER_TEST_F(ThreadedChannelTestPageScaleAnimation); 309 MULTI_THREAD_DIRECT_RENDERER_TEST_F(ThreadedChannelTestPageScaleAnimation);
310 310
311 } // namespace cc 311 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/threaded_channel.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698