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

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

Issue 1772853002: Block the HTML parser on external stylesheets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplified parser blocking logic 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/platform/RuntimeEnabledFeatures.in ('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..fe6eec937e1d50eed2e5a547ff502e4eb1f8a141 100644
--- a/third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp
+++ b/third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp
@@ -4,6 +4,7 @@
#include "core/dom/Document.h"
#include "core/html/HTMLIFrameElement.h"
+#include "platform/testing/UnitTestHelpers.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "web/tests/sim/SimCompositor.h"
#include "web/tests/sim/SimDisplayItemList.h"
@@ -96,6 +97,7 @@ TEST_F(DocumentLoadingRenderingTest, ShouldResumeCommitsAfterSheetsLoaded)
// Sheet finished and there's a body so resume.
cssResource.finish();
+ testing::runPendingTasks();
EXPECT_FALSE(compositor().deferCommits());
// Finish the load, should stay resumed.
@@ -157,6 +159,7 @@ TEST_F(DocumentLoadingRenderingTest, ShouldResumeCommitsAfterSheetsLoadForXml)
// Sheet finished, so resume commits.
cssResource.finish();
+ testing::runPendingTasks();
EXPECT_FALSE(compositor().deferCommits());
}
@@ -209,6 +212,7 @@ TEST_F(DocumentLoadingRenderingTest, ShouldScheduleFrameAfterSheetsLoaded)
firstCssResource.write("body { color: red; }");
mainResource.write("<body>");
firstCssResource.finish();
+ testing::runPendingTasks();
// Sheet finished and there's a body so resume.
EXPECT_FALSE(compositor().deferCommits());
@@ -272,23 +276,15 @@ TEST_F(DocumentLoadingRenderingTest, ShouldNotPaintIframeContentWithPendingSheet
// 1 for the main frame background (white),
// 1 for the iframe background (pink)
- // 1 for the composited transform layer in the iframe (green).
// TODO(esprehn): Why FOUC the background (borders, etc.) of iframes and
// composited layers? Seems like a bug.
- EXPECT_EQ(3, frame2.drawCount());
+ EXPECT_EQ(2, frame2.drawCount());
EXPECT_TRUE(frame2.contains(SimCanvas::Rect, "white"));
EXPECT_TRUE(frame2.contains(SimCanvas::Rect, "pink"));
- EXPECT_TRUE(frame2.contains(SimCanvas::Rect, "green"));
+ EXPECT_FALSE(frame2.contains(SimCanvas::Rect, "green"));
- // Finish loading the sheets in the child frame. After it should issue a
- // paint invalidation for every layer since frame2 painted them but skipped
- // painting the real content to avoid FOUC.
cssResource.complete();
-
- // First frame where all frames are loaded, should paint the text in the
- // child frame.
- auto frame3 = compositor().beginFrame();
- EXPECT_TRUE(frame3.containsText());
+ testing::runPendingTasks();
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698