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

Unified Diff: third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp

Issue 1827043003: Disable subsequence caching when didLayoutWithPendingStylesheets is true. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp b/third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp
index db54b4ac706c7fb35be0bdb33f05bf7093fa3e6c..a6071be22e165ff3596799225ba3f5443a4ba51b 100644
--- a/third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp
+++ b/third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp
@@ -4,6 +4,8 @@
#include "core/dom/Document.h"
#include "core/html/HTMLIFrameElement.h"
+#include "core/layout/LayoutView.h"
+#include "core/paint/PaintLayer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "web/tests/sim/SimCompositor.h"
#include "web/tests/sim/SimDisplayItemList.h"
@@ -270,6 +272,14 @@ TEST_F(DocumentLoadingRenderingTest, ShouldNotPaintIframeContentWithPendingSheet
// invalid paint so we shouldn't draw any text.
EXPECT_FALSE(frame2.containsText());
+ LayoutView* iframeLayoutView = childFrame->contentDocument()->layoutView();
+ const DisplayItemList& displayItemList = iframeLayoutView->layer()->graphicsLayerBacking()->getPaintController().getDisplayItemList();
+ // Check that the DisplayItemList has no subsequene caching markers. These are not allowed in pending-style-sheets mode
+ // since otherwise caching would be incorrect.
+ ASSERT_EQ(2u, displayItemList.size());
+ EXPECT_EQ(DisplayItem::DocumentBackground, displayItemList[0].getType());
+ EXPECT_EQ(DisplayItem::BoxDecorationBackground, displayItemList[1].getType());
+
// 1 for the main frame background (white),
// 1 for the iframe background (pink)
// 1 for the composited transform layer in the iframe (green).
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698