Commit 00d9b6b3 authored by Ian Kilpatrick's avatar Ian Kilpatrick Committed by Commit Bot

Remove MutableStyle usage from blink_unittests.

There should be no behaviour change as a result of this patch.

Bug: 813068
Change-Id: I627eeea190435b5136f5382c2d28bab66f9eb617
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639117Reviewed-by: default avatarStephen McGruer <smcgruer@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665235}
parent ecb2ea92
......@@ -451,20 +451,19 @@ TEST_F(KeyframeEffectTest, CheckCanStartAnimationOnCompositorBadTarget) {
MakeGarbageCollected<KeyframeEffect>(element, effect_model, timing);
// If the target has a CSS offset we can't composite it.
element->SetInlineStyleProperty(CSSPropertyID::kOffsetPosition, "50px 50px");
UpdateAllLifecyclePhasesForTest();
element->MutableComputedStyle()->SetOffsetPosition(
LengthPoint(Length::Percent(50.0), Length::Auto()));
ASSERT_TRUE(element->GetComputedStyle()->HasOffset());
EXPECT_TRUE(keyframe_effect->CheckCanStartAnimationOnCompositor(
nullptr, animation_playback_rate) &
CompositorAnimations::kTargetHasCSSOffset);
// If the target has multiple transform properties we can't composite it.
element->SetInlineStyleProperty(CSSPropertyID::kRotate, "90deg");
element->SetInlineStyleProperty(CSSPropertyID::kScale, "2 1");
UpdateAllLifecyclePhasesForTest();
element->MutableComputedStyle()->SetRotate(
RotateTransformOperation::Create(100, TransformOperation::kRotateX));
element->MutableComputedStyle()->SetScale(
ScaleTransformOperation::Create(2, 1, TransformOperation::kScaleX));
EXPECT_TRUE(keyframe_effect->CheckCanStartAnimationOnCompositor(
nullptr, animation_playback_rate) &
CompositorAnimations::kTargetHasMultipleTransformProperties);
......
......@@ -128,10 +128,8 @@ TEST_F(ImageElementTimingTest, BackgroundImageRemoved) {
<div id="target">/div>
)HTML");
LayoutObject* object = GetLayoutObjectByElementId("target");
ImageResourceContent* content = object->MutableStyle()
->AccessBackgroundLayers()
.GetImage()
->CachedImage();
ImageResourceContent* content =
object->Style()->BackgroundLayers().GetImage()->CachedImage();
UpdateAllLifecyclePhasesForTest();
EXPECT_EQ(GetBackgroundImagesNotified().size(), 1u);
EXPECT_TRUE(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment