From 38a9a29f4f9436cace7f0e7abf9c586057df8a4e Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 13 Feb 2019 16:23:34 +0100 Subject: BASELINE: Update Chromium to 73.0.3683.37 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I08c9af2948b645f671e5d933aca1f7a90ea372f2 Reviewed-by: Michael BrĂ¼ning --- .../core/frame/document_loading_rendering_test.cc | 72 ++++++++++------------ 1 file changed, 32 insertions(+), 40 deletions(-) (limited to 'chromium/third_party/blink/renderer/core/frame/document_loading_rendering_test.cc') diff --git a/chromium/third_party/blink/renderer/core/frame/document_loading_rendering_test.cc b/chromium/third_party/blink/renderer/core/frame/document_loading_rendering_test.cc index 632f5506bb2..2b4e3f2591c 100644 --- a/chromium/third_party/blink/renderer/core/frame/document_loading_rendering_test.cc +++ b/chromium/third_party/blink/renderer/core/frame/document_loading_rendering_test.cc @@ -25,8 +25,6 @@ TEST_F(DocumentLoadingRenderingTest, LoadURL("https://example.com/test.html"); - main_resource.Start(); - // Still in the head, should not resume commits. main_resource.Write(""); EXPECT_TRUE(Compositor().DeferMainFrameUpdate()); @@ -46,12 +44,11 @@ TEST_F(DocumentLoadingRenderingTest, TEST_F(DocumentLoadingRenderingTest, ShouldResumeCommitsAfterBodyIfSheetsLoaded) { SimRequest main_resource("https://example.com/test.html", "text/html"); - SimRequest css_resource("https://example.com/test.css", "text/css"); + SimSubresourceRequest css_resource("https://example.com/test.css", + "text/css"); LoadURL("https://example.com/test.html"); - main_resource.Start(); - // Still in the head, should not resume commits. main_resource.Write(""); EXPECT_TRUE(Compositor().DeferMainFrameUpdate()); @@ -76,12 +73,11 @@ TEST_F(DocumentLoadingRenderingTest, TEST_F(DocumentLoadingRenderingTest, ShouldResumeCommitsAfterSheetsLoaded) { SimRequest main_resource("https://example.com/test.html", "text/html"); - SimRequest css_resource("https://example.com/test.css", "text/css"); + SimSubresourceRequest css_resource("https://example.com/test.css", + "text/css"); LoadURL("https://example.com/test.html"); - main_resource.Start(); - // Still in the head, should not resume commits. main_resource.Write(""); EXPECT_TRUE(Compositor().DeferMainFrameUpdate()); @@ -107,12 +103,11 @@ TEST_F(DocumentLoadingRenderingTest, ShouldResumeCommitsAfterSheetsLoaded) { TEST_F(DocumentLoadingRenderingTest, ShouldResumeCommitsAfterDocumentElementWithNoSheets) { SimRequest main_resource("https://example.com/test.svg", "image/svg+xml"); - SimRequest css_resource("https://example.com/test.css", "text/css"); + SimSubresourceRequest css_resource("https://example.com/test.css", + "text/css"); LoadURL("https://example.com/test.svg"); - main_resource.Start(); - // Sheet loading and no documentElement, so don't resume. main_resource.Write(""); EXPECT_TRUE(Compositor().DeferMainFrameUpdate()); @@ -132,12 +127,11 @@ TEST_F(DocumentLoadingRenderingTest, TEST_F(DocumentLoadingRenderingTest, ShouldResumeCommitsAfterSheetsLoadForXml) { SimRequest main_resource("https://example.com/test.svg", "image/svg+xml"); - SimRequest css_resource("https://example.com/test.css", "text/css"); + SimSubresourceRequest css_resource("https://example.com/test.css", + "text/css"); LoadURL("https://example.com/test.svg"); - main_resource.Start(); - // Not done parsing. main_resource.Write(""); EXPECT_TRUE(Compositor().DeferMainFrameUpdate()); @@ -165,8 +159,6 @@ TEST_F(DocumentLoadingRenderingTest, ShouldResumeCommitsAfterFinishParsingXml) { LoadURL("https://example.com/test.svg"); - main_resource.Start(); - // Finish parsing, no sheets loading so resume. main_resource.Finish(); EXPECT_FALSE(Compositor().DeferMainFrameUpdate()); @@ -177,7 +169,6 @@ TEST_F(DocumentLoadingRenderingTest, ShouldResumeImmediatelyForImageDocuments) { LoadURL("https://example.com/test.png"); - main_resource.Start(); EXPECT_TRUE(Compositor().DeferMainFrameUpdate()); // Not really a valid image but enough for the test. ImageDocuments should @@ -191,13 +182,13 @@ TEST_F(DocumentLoadingRenderingTest, ShouldResumeImmediatelyForImageDocuments) { TEST_F(DocumentLoadingRenderingTest, ShouldScheduleFrameAfterSheetsLoaded) { SimRequest main_resource("https://example.com/test.html", "text/html"); - SimRequest first_css_resource("https://example.com/first.css", "text/css"); - SimRequest second_css_resource("https://example.com/second.css", "text/css"); + SimSubresourceRequest first_css_resource("https://example.com/first.css", + "text/css"); + SimSubresourceRequest second_css_resource("https://example.com/second.css", + "text/css"); LoadURL("https://example.com/test.html"); - main_resource.Start(); - // Load a stylesheet. main_resource.Write( ""); @@ -228,11 +219,12 @@ TEST_F(DocumentLoadingRenderingTest, ShouldNotPaintIframeContentWithPendingSheets) { SimRequest main_resource("https://example.com/test.html", "text/html"); SimRequest frame_resource("https://example.com/frame.html", "text/html"); - SimRequest css_resource("https://example.com/test.css", "text/css"); + SimSubresourceRequest css_resource("https://example.com/test.css", + "text/css"); LoadURL("https://example.com/test.html"); - WebView().Resize(WebSize(800, 600)); + WebView().MainFrameWidget()->Resize(WebSize(800, 600)); main_resource.Complete(R"HTML( @@ -313,11 +305,12 @@ TEST_F(DocumentLoadingRenderingTest, ShouldThrottleIframeLifecycleUntilPendingSheetsLoaded) { SimRequest main_resource("https://example.com/main.html", "text/html"); SimRequest frame_resource("https://example.com/frame.html", "text/html"); - SimRequest css_resource("https://example.com/frame.css", "text/css"); + SimSubresourceRequest css_resource("https://example.com/frame.css", + "text/css"); LoadURL("https://example.com/main.html"); - WebView().Resize(WebSize(800, 600)); + WebView().MainFrameWidget()->Resize(WebSize(800, 600)); main_resource.Complete(R"HTML( @@ -335,7 +328,7 @@ TEST_F(DocumentLoadingRenderingTest, ToHTMLIFrameElement(GetDocument().getElementById("frame")); // Frame while the child frame still has pending sheets. - auto* frame1_callback = new CheckRafCallback(); + auto* frame1_callback = MakeGarbageCollected(); child_frame->contentDocument()->RequestAnimationFrame(frame1_callback); auto frame1 = Compositor().BeginFrame(); EXPECT_FALSE(frame1_callback->WasCalled()); @@ -347,7 +340,7 @@ TEST_F(DocumentLoadingRenderingTest, css_resource.Complete(); // Frame with all lifecycle updates enabled. - auto* frame2_callback = new CheckRafCallback(); + auto* frame2_callback = MakeGarbageCollected(); child_frame->contentDocument()->RequestAnimationFrame(frame2_callback); auto frame2 = Compositor().BeginFrame(); EXPECT_TRUE(frame1_callback->WasCalled()); @@ -359,13 +352,13 @@ TEST_F(DocumentLoadingRenderingTest, TEST_F(DocumentLoadingRenderingTest, ShouldContinuePaintingWhenSheetsStartedAfterBody) { SimRequest main_resource("https://example.com/test.html", "text/html"); - SimRequest css_head_resource("https://example.com/testHead.css", "text/css"); - SimRequest css_body_resource("https://example.com/testBody.css", "text/css"); + SimSubresourceRequest css_head_resource("https://example.com/testHead.css", + "text/css"); + SimSubresourceRequest css_body_resource("https://example.com/testBody.css", + "text/css"); LoadURL("https://example.com/test.html"); - main_resource.Start(); - // Still in the head, should not paint. main_resource.Write(""); EXPECT_FALSE(GetDocument().IsRenderingReady()); @@ -399,13 +392,12 @@ TEST_F(DocumentLoadingRenderingTest, TEST_F(DocumentLoadingRenderingTest, returnBoundingClientRectCorrectlyWhileLoadingImport) { SimRequest main_resource("https://example.com/test.html", "text/html"); - SimRequest import_resource("https://example.com/import.css", "text/css"); + SimSubresourceRequest import_resource("https://example.com/import.css", + "text/css"); LoadURL("https://example.com/test.html"); - WebView().Resize(WebSize(800, 600)); - - main_resource.Start(); + WebView().MainFrameWidget()->Resize(WebSize(800, 600)); main_resource.Write(R"HTML( @@ -436,12 +428,11 @@ TEST_F(DocumentLoadingRenderingTest, TEST_F(DocumentLoadingRenderingTest, StableSVGStopStylingWhileLoadingImport) { SimRequest main_resource("https://example.com/test.html", "text/html"); - SimRequest import_resource("https://example.com/import.css", "text/css"); + SimSubresourceRequest import_resource("https://example.com/import.css", + "text/css"); LoadURL("https://example.com/test.html"); - main_resource.Start(); - main_resource.Write(R"HTML( @@ -461,8 +452,9 @@ TEST_F(DocumentLoadingRenderingTest, StableSVGStopStylingWhileLoadingImport) { Element* element = GetDocument().getElementById("test"); ASSERT_NE(nullptr, element); - EXPECT_EQ(0xff008000, element->ComputedStyleRef().SvgStyle().StopColor()); - EXPECT_EQ(.5f, element->ComputedStyleRef().SvgStyle().StopOpacity()); + const SVGComputedStyle& svg_style = element->ComputedStyleRef().SvgStyle(); + EXPECT_EQ(0xff008000, svg_style.StopColor().GetColor()); + EXPECT_EQ(.5f, svg_style.StopOpacity()); }; EXPECT_TRUE(GetDocument().IsRenderingReady()); -- cgit v1.2.1