Commit 978fade8 authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

Use non-empty size in CompositingSimTest setup

Painting will early-out unless a non-empty frame size is used. This
patch makes the CompositingSimTest setup set a frame size. This issue
sunk several hours when writing https://crrev.com/732194.

Bug: 1014273
Change-Id: Id1d95daa8c96397bdccc36b0bc498a1ba8a24ac5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003556
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Auto-Submit: Philip Rogers <pdr@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732429}
parent 9ddbbd3d
...@@ -213,8 +213,6 @@ TEST_P(CompositingTest, WillChangeTransformHint) { ...@@ -213,8 +213,6 @@ TEST_P(CompositingTest, WillChangeTransformHint) {
class CompositingSimTest : public PaintTestConfigurations, public SimTest { class CompositingSimTest : public PaintTestConfigurations, public SimTest {
public: public:
void InitializeWithHTML(const String& html) { void InitializeWithHTML(const String& html) {
WebView().MainFrameWidget()->Resize(WebSize(800, 600));
SimRequest request("https://example.com/test.html", "text/html"); SimRequest request("https://example.com/test.html", "text/html");
LoadURL("https://example.com/test.html"); LoadURL("https://example.com/test.html");
request.Complete(html); request.Complete(html);
...@@ -262,6 +260,13 @@ class CompositingSimTest : public PaintTestConfigurations, public SimTest { ...@@ -262,6 +260,13 @@ class CompositingSimTest : public PaintTestConfigurations, public SimTest {
PaintArtifactCompositor* paint_artifact_compositor() { PaintArtifactCompositor* paint_artifact_compositor() {
return MainFrame().GetFrameView()->GetPaintArtifactCompositor(); return MainFrame().GetFrameView()->GetPaintArtifactCompositor();
} }
private:
void SetUp() override {
SimTest::SetUp();
// Ensure a non-empty size so painting does not early-out.
WebView().Resize(WebSize(800, 600));
}
}; };
INSTANTIATE_PAINT_TEST_SUITE_P(CompositingSimTest); INSTANTIATE_PAINT_TEST_SUITE_P(CompositingSimTest);
...@@ -1075,7 +1080,6 @@ TEST_P(CompositingSimTest, PromoteCrossOriginIframeAfterLoading) { ...@@ -1075,7 +1080,6 @@ TEST_P(CompositingSimTest, PromoteCrossOriginIframeAfterLoading) {
feature_list.InitWithFeatureState( feature_list.InitWithFeatureState(
blink::features::kCompositeCrossOriginIframes, true); blink::features::kCompositeCrossOriginIframes, true);
WebView().MainFrameWidget()->Resize(WebSize(800, 600));
SimRequest main_resource("https://origin-a.com/a.html", "text/html"); SimRequest main_resource("https://origin-a.com/a.html", "text/html");
SimRequest frame_resource("https://origin-b.com/b.html", "text/html"); SimRequest frame_resource("https://origin-b.com/b.html", "text/html");
...@@ -1097,7 +1101,6 @@ TEST_P(CompositingSimTest, PromoteCrossOriginIframeAfterDomainChange) { ...@@ -1097,7 +1101,6 @@ TEST_P(CompositingSimTest, PromoteCrossOriginIframeAfterDomainChange) {
feature_list.InitWithFeatureState( feature_list.InitWithFeatureState(
blink::features::kCompositeCrossOriginIframes, true); blink::features::kCompositeCrossOriginIframes, true);
WebView().MainFrameWidget()->Resize(WebSize(800, 600));
SimRequest main_resource("https://origin-a.com/a.html", "text/html"); SimRequest main_resource("https://origin-a.com/a.html", "text/html");
SimRequest frame_resource("https://sub.origin-a.com/b.html", "text/html"); SimRequest frame_resource("https://sub.origin-a.com/b.html", "text/html");
......
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