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

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

Issue 1539203002: Switch to standard integer types in cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 5 years 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/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_context.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <stdint.h>
8
7 #include "cc/animation/animation_curve.h" 9 #include "cc/animation/animation_curve.h"
8 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
9 #include "cc/animation/scroll_offset_animation_curve.h" 11 #include "cc/animation/scroll_offset_animation_curve.h"
10 #include "cc/animation/timing_function.h" 12 #include "cc/animation/timing_function.h"
11 #include "cc/animation/transform_operations.h" 13 #include "cc/animation/transform_operations.h"
12 #include "cc/base/completion_event.h" 14 #include "cc/base/completion_event.h"
13 #include "cc/base/time_util.h" 15 #include "cc/base/time_util.h"
14 #include "cc/layers/layer.h" 16 #include "cc/layers/layer.h"
15 #include "cc/layers/layer_impl.h" 17 #include "cc/layers/layer_impl.h"
16 #include "cc/test/animation_test_common.h" 18 #include "cc/test/animation_test_common.h"
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 } 1297 }
1296 1298
1297 void BeginTest() override { 1299 void BeginTest() override {
1298 PostAddLongAnimationToMainThread(picture_.get()); 1300 PostAddLongAnimationToMainThread(picture_.get());
1299 } 1301 }
1300 1302
1301 void NotifyAnimationStarted(base::TimeTicks monotonic_time, 1303 void NotifyAnimationStarted(base::TimeTicks monotonic_time,
1302 Animation::TargetProperty target_property, 1304 Animation::TargetProperty target_property,
1303 int group) override { 1305 int group) override {
1304 called_animation_started_ = true; 1306 called_animation_started_ = true;
1305 layer_tree_host()->AnimateLayers( 1307 layer_tree_host()->AnimateLayers(base::TimeTicks::FromInternalValue(
1306 base::TimeTicks::FromInternalValue(std::numeric_limits<int64>::max())); 1308 std::numeric_limits<int64_t>::max()));
1307 PostSetNeedsCommitToMainThread(); 1309 PostSetNeedsCommitToMainThread();
1308 } 1310 }
1309 1311
1310 void NotifyAnimationFinished(base::TimeTicks monotonic_time, 1312 void NotifyAnimationFinished(base::TimeTicks monotonic_time,
1311 Animation::TargetProperty target_property, 1313 Animation::TargetProperty target_property,
1312 int group) override { 1314 int group) override {
1313 called_animation_finished_ = true; 1315 called_animation_finished_ = true;
1314 EndTest(); 1316 EndTest();
1315 } 1317 }
1316 1318
1317 void AfterTest() override { 1319 void AfterTest() override {
1318 EXPECT_TRUE(called_animation_started_); 1320 EXPECT_TRUE(called_animation_started_);
1319 EXPECT_TRUE(called_animation_finished_); 1321 EXPECT_TRUE(called_animation_finished_);
1320 } 1322 }
1321 1323
1322 private: 1324 private:
1323 bool called_animation_started_; 1325 bool called_animation_started_;
1324 bool called_animation_finished_; 1326 bool called_animation_finished_;
1325 FakeContentLayerClient client_; 1327 FakeContentLayerClient client_;
1326 scoped_refptr<FakePictureLayer> picture_; 1328 scoped_refptr<FakePictureLayer> picture_;
1327 }; 1329 };
1328 1330
1329 SINGLE_AND_MULTI_THREAD_TEST_F( 1331 SINGLE_AND_MULTI_THREAD_TEST_F(
1330 LayerTreeHostAnimationTestNotifyAnimationFinished); 1332 LayerTreeHostAnimationTestNotifyAnimationFinished);
1331 1333
1332 } // namespace 1334 } // namespace
1333 } // namespace cc 1335 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698