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

Side by Side Diff: third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp

Issue 2956583002: Removed usage of RefPtr::Release in unit tests (Closed)
Patch Set: Created 3 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 1.0) 379 1.0)
380 .Get()); 380 .Get());
381 EXPECT_FALSE(CanStartEffectOnCompositor( 381 EXPECT_FALSE(CanStartEffectOnCompositor(
382 timing_, *AnimatableValueKeyframeEffectModel::Create(frames_same))); 382 timing_, *AnimatableValueKeyframeEffectModel::Create(frames_same)));
383 383
384 AnimatableValueKeyframeVector frames_mixed_properties; 384 AnimatableValueKeyframeVector frames_mixed_properties;
385 RefPtr<AnimatableValueKeyframe> keyframe = AnimatableValueKeyframe::Create(); 385 RefPtr<AnimatableValueKeyframe> keyframe = AnimatableValueKeyframe::Create();
386 keyframe->SetOffset(0); 386 keyframe->SetOffset(0);
387 keyframe->SetPropertyValue(CSSPropertyColor, AnimatableDouble::Create(0)); 387 keyframe->SetPropertyValue(CSSPropertyColor, AnimatableDouble::Create(0));
388 keyframe->SetPropertyValue(CSSPropertyOpacity, AnimatableDouble::Create(0)); 388 keyframe->SetPropertyValue(CSSPropertyOpacity, AnimatableDouble::Create(0));
389 frames_mixed_properties.push_back(keyframe.Release()); 389 frames_mixed_properties.push_back(std::move(keyframe));
390 keyframe = AnimatableValueKeyframe::Create(); 390 keyframe = AnimatableValueKeyframe::Create();
391 keyframe->SetOffset(1); 391 keyframe->SetOffset(1);
392 keyframe->SetPropertyValue(CSSPropertyColor, AnimatableDouble::Create(1)); 392 keyframe->SetPropertyValue(CSSPropertyColor, AnimatableDouble::Create(1));
393 keyframe->SetPropertyValue(CSSPropertyOpacity, AnimatableDouble::Create(1)); 393 keyframe->SetPropertyValue(CSSPropertyOpacity, AnimatableDouble::Create(1));
394 frames_mixed_properties.push_back(keyframe.Release()); 394 frames_mixed_properties.push_back(std::move(keyframe));
395 EXPECT_FALSE(CanStartEffectOnCompositor( 395 EXPECT_FALSE(CanStartEffectOnCompositor(
396 timing_, 396 timing_,
397 *AnimatableValueKeyframeEffectModel::Create(frames_mixed_properties))); 397 *AnimatableValueKeyframeEffectModel::Create(frames_mixed_properties)));
398 } 398 }
399 399
400 TEST_F(AnimationCompositorAnimationsTest, AnimatedBoundingBox) { 400 TEST_F(AnimationCompositorAnimationsTest, AnimatedBoundingBox) {
401 Vector<TransformOperations> transform_vector; 401 Vector<TransformOperations> transform_vector;
402 transform_vector.push_back(TransformOperations()); 402 transform_vector.push_back(TransformOperations());
403 transform_vector.back().Operations().push_back( 403 transform_vector.back().Operations().push_back(
404 TranslateTransformOperation::Create(Length(0, kFixed), Length(0, kFixed), 404 TranslateTransformOperation::Create(Length(0, kFixed), Length(0, kFixed),
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 1317
1318 // Clearing the effect node entirely should also produce false. 1318 // Clearing the effect node entirely should also produce false.
1319 properties.ClearEffect(); 1319 properties.ClearEffect();
1320 EXPECT_FALSE(CompositorAnimations::CanStartElementOnCompositor(*element)); 1320 EXPECT_FALSE(CompositorAnimations::CanStartElementOnCompositor(*element));
1321 1321
1322 element->SetLayoutObject(nullptr); 1322 element->SetLayoutObject(nullptr);
1323 LayoutObjectProxy::Dispose(layout_object); 1323 LayoutObjectProxy::Dispose(layout_object);
1324 } 1324 }
1325 1325
1326 } // namespace blink 1326 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698