Commit b4f8af25 authored by Christian Biesinger's avatar Christian Biesinger Committed by Commit Bot

[layoutng] Also accept LayoutNG objects in paint test regexes

I have to use N?G? instead of (NG)? because gtest does not support
the latter on Windows.

R=chrishtr@chromium.org

Change-Id: Ia62d1ec85447a351b8abc341203c3dcdc17fc63b
Reviewed-on: https://chromium-review.googlesource.com/c/1330695
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607053}
parent 614b5b89
...@@ -87,21 +87,23 @@ TEST_P(PaintAndRasterInvalidationTest, TrackingForTracing) { ...@@ -87,21 +87,23 @@ TEST_P(PaintAndRasterInvalidationTest, TrackingForTracing) {
target->setAttribute(html_names::kStyleAttr, "height: 200px"); target->setAttribute(html_names::kStyleAttr, "height: 200px");
UpdateAllLifecyclePhasesForTest(); UpdateAllLifecyclePhasesForTest();
EXPECT_THAT(get_debug_info(), EXPECT_THAT(
MatchesRegex( get_debug_info(),
"\\{\"layer_name\":.*\"annotated_invalidation_rects\":\\[" MatchesRegex(
"\\{\"geometry_rect\":\\[8,108,100,100\\]," "\\{\"layer_name\":.*\"annotated_invalidation_rects\":\\["
"\"reason\":\"incremental\"," "\\{\"geometry_rect\":\\[8,108,100,100\\],"
"\"client\":\"LayoutBlockFlow DIV id='target'\"\\}\\]\\}")); "\"reason\":\"incremental\","
"\"client\":\"LayoutN?G?BlockFlow DIV id='target'\"\\}\\]\\}"));
target->setAttribute(html_names::kStyleAttr, "height: 200px; width: 200px"); target->setAttribute(html_names::kStyleAttr, "height: 200px; width: 200px");
UpdateAllLifecyclePhasesForTest(); UpdateAllLifecyclePhasesForTest();
EXPECT_THAT(get_debug_info(), EXPECT_THAT(
MatchesRegex( get_debug_info(),
"\\{\"layer_name\":.*\"annotated_invalidation_rects\":\\[" MatchesRegex(
"\\{\"geometry_rect\":\\[108,8,100,200\\]," "\\{\"layer_name\":.*\"annotated_invalidation_rects\":\\["
"\"reason\":\"incremental\"," "\\{\"geometry_rect\":\\[108,8,100,200\\],"
"\"client\":\"LayoutBlockFlow DIV id='target'\"\\}\\]\\}")); "\"reason\":\"incremental\","
"\"client\":\"LayoutN?G?BlockFlow DIV id='target'\"\\}\\]\\}"));
} }
target->setAttribute(html_names::kStyleAttr, "height: 300px; width: 300px"); target->setAttribute(html_names::kStyleAttr, "height: 300px; width: 300px");
......
...@@ -49,9 +49,10 @@ TEST_P(PaintPropertyTreePrinterTest, SimpleEffectTree) { ...@@ -49,9 +49,10 @@ TEST_P(PaintPropertyTreePrinterTest, SimpleEffectTree) {
SetBodyInnerHTML("<div style='opacity: 0.9;'>hello world</div>"); SetBodyInnerHTML("<div style='opacity: 0.9;'>hello world</div>");
String effect_tree_as_string = String effect_tree_as_string =
effectPropertyTreeAsString(*GetDocument().View()); effectPropertyTreeAsString(*GetDocument().View());
EXPECT_THAT(effect_tree_as_string.Ascii().data(), EXPECT_THAT(
testing::MatchesRegex("root .*" effect_tree_as_string.Ascii().data(),
" Effect \\(LayoutBlockFlow DIV\\) .*")); testing::MatchesRegex("root .*"
" Effect \\(LayoutN?G?BlockFlow DIV\\) .*"));
} }
TEST_P(PaintPropertyTreePrinterTest, SimpleScrollTree) { TEST_P(PaintPropertyTreePrinterTest, SimpleScrollTree) {
......
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