Commit ab8a0228 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Make document style clean in test as expected.

The initial lifecycle state is kStyleClean (in Document::Initialize). As
long as we are not scheduling layout tree updates, we will still be in
kStyleClean until we start scheduling updates. For the test in question
we are in a state where we have kStyleClean, but style isn't actually
clean because we haven't started scheduling updates. Make sure we are
actually updating style before checking and continuing testing.

Discovered this in the work with update roots where we were able to go
back to kVisualUpdatePending before the check.

Bug: 868810
Change-Id: Ie20d02b0e4be1d08914b056f4726627c40293414
Reviewed-on: https://chromium-review.googlesource.com/1206492Reviewed-by: default avatarStephen McGruer <smcgruer@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588852}
parent 7790d54f
......@@ -874,6 +874,7 @@ TEST_F(DocumentTest,
<div id='nonSticky'></div>
</div>
)HTML");
GetDocument().UpdateStyleAndLayoutTree();
EXPECT_EQ(DocumentLifecycle::kStyleClean,
GetDocument().Lifecycle().GetState());
......
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