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

Unified Diff: third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp

Issue 2566223003: RootLayerScrolling: update PaintControllerPaintTest expectations. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp b/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp
index abca3afb1fe4e0bf4894604b4a81bff167d26ca5..256584c635e200cb0bc843d1984fdc2b6579d50f 100644
--- a/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp
@@ -32,17 +32,26 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2,
*toLayoutText(div.firstChild()->layoutObject())->firstTextBox();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
- EXPECT_DISPLAY_LIST(
- rootPaintController().getDisplayItemList(), 6,
- TestDisplayItem(layoutView(),
- DisplayItem::kClipFrameToVisibleContentRect),
- TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
- TestDisplayItem(layoutView(), documentBackgroundType),
- TestDisplayItem(textInlineBox, foregroundType),
- TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
- TestDisplayItem(layoutView(),
- DisplayItem::clipTypeToEndClipType(
- DisplayItem::kClipFrameToVisibleContentRect)));
+ if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
+ EXPECT_DISPLAY_LIST(
+ rootPaintController().getDisplayItemList(), 4,
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
+ TestDisplayItem(layoutView(), documentBackgroundType),
+ TestDisplayItem(textInlineBox, foregroundType),
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
+ } else {
+ EXPECT_DISPLAY_LIST(
+ rootPaintController().getDisplayItemList(), 6,
+ TestDisplayItem(layoutView(),
+ DisplayItem::kClipFrameToVisibleContentRect),
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
+ TestDisplayItem(layoutView(), documentBackgroundType),
+ TestDisplayItem(textInlineBox, foregroundType),
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
+ TestDisplayItem(layoutView(),
+ DisplayItem::clipTypeToEndClipType(
+ DisplayItem::kClipFrameToVisibleContentRect)));
+ }
} else {
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
TestDisplayItem(layoutView(), documentBackgroundType),
@@ -53,19 +62,30 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2,
document().view()->updateAllLifecyclePhases();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
- EXPECT_DISPLAY_LIST(
- rootPaintController().getDisplayItemList(), 7,
- TestDisplayItem(layoutView(),
- DisplayItem::kClipFrameToVisibleContentRect),
- TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
- TestDisplayItem(layoutView(), documentBackgroundType),
- TestDisplayItem(textInlineBox, foregroundType),
- TestDisplayItem(*document().frame()->selection().m_frameCaret,
- DisplayItem::kCaret), // New!
- TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
- TestDisplayItem(layoutView(),
- DisplayItem::clipTypeToEndClipType(
- DisplayItem::kClipFrameToVisibleContentRect)));
+ if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
+ EXPECT_DISPLAY_LIST(
+ rootPaintController().getDisplayItemList(), 5,
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
+ TestDisplayItem(layoutView(), documentBackgroundType),
+ TestDisplayItem(textInlineBox, foregroundType),
+ TestDisplayItem(*document().frame()->selection().m_frameCaret,
+ DisplayItem::kCaret), // New!
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
+ } else {
+ EXPECT_DISPLAY_LIST(
+ rootPaintController().getDisplayItemList(), 7,
+ TestDisplayItem(layoutView(),
+ DisplayItem::kClipFrameToVisibleContentRect),
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
+ TestDisplayItem(layoutView(), documentBackgroundType),
+ TestDisplayItem(textInlineBox, foregroundType),
+ TestDisplayItem(*document().frame()->selection().m_frameCaret,
+ DisplayItem::kCaret), // New!
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
+ TestDisplayItem(layoutView(),
+ DisplayItem::clipTypeToEndClipType(
+ DisplayItem::kClipFrameToVisibleContentRect)));
+ }
} else {
EXPECT_DISPLAY_LIST(
rootPaintController().getDisplayItemList(), 3,
@@ -87,17 +107,26 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) {
InlineTextBox& firstTextBox = *text.firstTextBox();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
- EXPECT_DISPLAY_LIST(
- rootPaintController().getDisplayItemList(), 6,
- TestDisplayItem(layoutView(),
- DisplayItem::kClipFrameToVisibleContentRect),
- TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
- TestDisplayItem(layoutView(), documentBackgroundType),
- TestDisplayItem(firstTextBox, foregroundType),
- TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
- TestDisplayItem(layoutView(),
- DisplayItem::clipTypeToEndClipType(
- DisplayItem::kClipFrameToVisibleContentRect)));
+ if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
+ EXPECT_DISPLAY_LIST(
+ rootPaintController().getDisplayItemList(), 4,
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
+ TestDisplayItem(layoutView(), documentBackgroundType),
+ TestDisplayItem(firstTextBox, foregroundType),
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
+ } else {
+ EXPECT_DISPLAY_LIST(
+ rootPaintController().getDisplayItemList(), 6,
+ TestDisplayItem(layoutView(),
+ DisplayItem::kClipFrameToVisibleContentRect),
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
+ TestDisplayItem(layoutView(), documentBackgroundType),
+ TestDisplayItem(firstTextBox, foregroundType),
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
+ TestDisplayItem(layoutView(),
+ DisplayItem::clipTypeToEndClipType(
+ DisplayItem::kClipFrameToVisibleContentRect)));
+ }
} else {
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2,
TestDisplayItem(layoutView(), documentBackgroundType),
@@ -112,18 +141,28 @@ TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) {
InlineTextBox& secondTextBox = *newText.firstTextBox()->nextTextBox();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
- EXPECT_DISPLAY_LIST(
- rootPaintController().getDisplayItemList(), 7,
- TestDisplayItem(layoutView(),
- DisplayItem::kClipFrameToVisibleContentRect),
- TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
- TestDisplayItem(layoutView(), documentBackgroundType),
- TestDisplayItem(newFirstTextBox, foregroundType),
- TestDisplayItem(secondTextBox, foregroundType),
- TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
- TestDisplayItem(layoutView(),
- DisplayItem::clipTypeToEndClipType(
- DisplayItem::kClipFrameToVisibleContentRect)));
+ if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
+ EXPECT_DISPLAY_LIST(
+ rootPaintController().getDisplayItemList(), 5,
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
+ TestDisplayItem(layoutView(), documentBackgroundType),
+ TestDisplayItem(newFirstTextBox, foregroundType),
+ TestDisplayItem(secondTextBox, foregroundType),
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
+ } else {
+ EXPECT_DISPLAY_LIST(
+ rootPaintController().getDisplayItemList(), 7,
+ TestDisplayItem(layoutView(),
+ DisplayItem::kClipFrameToVisibleContentRect),
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
+ TestDisplayItem(layoutView(), documentBackgroundType),
+ TestDisplayItem(newFirstTextBox, foregroundType),
+ TestDisplayItem(secondTextBox, foregroundType),
+ TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
+ TestDisplayItem(layoutView(),
+ DisplayItem::clipTypeToEndClipType(
+ DisplayItem::kClipFrameToVisibleContentRect)));
+ }
} else {
EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 3,
TestDisplayItem(layoutView(), documentBackgroundType),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698