| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/dom/ClientRect.h" | 5 #include "core/dom/ClientRect.h" |
| 6 #include "core/dom/Document.h" | 6 #include "core/dom/Document.h" |
| 7 #include "core/dom/FrameRequestCallback.h" | 7 #include "core/dom/FrameRequestCallback.h" |
| 8 #include "core/html/HTMLIFrameElement.h" | 8 #include "core/html/HTMLIFrameElement.h" |
| 9 #include "core/layout/api/LayoutViewItem.h" | 9 #include "core/layout/api/LayoutViewItem.h" |
| 10 #include "core/paint/PaintLayer.h" | 10 #include "core/paint/PaintLayer.h" |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 namespace { | 290 namespace { |
| 291 | 291 |
| 292 class CheckRafCallback final : public FrameRequestCallback { | 292 class CheckRafCallback final : public FrameRequestCallback { |
| 293 public: | 293 public: |
| 294 void handleEvent(double high_res_time_ms) override { was_called_ = true; } | 294 void handleEvent(double high_res_time_ms) override { was_called_ = true; } |
| 295 bool WasCalled() const { return was_called_; } | 295 bool WasCalled() const { return was_called_; } |
| 296 | 296 |
| 297 private: | 297 private: |
| 298 bool was_called_ = false; | 298 bool was_called_ = false; |
| 299 }; | 299 }; |
| 300 }; | 300 }; // namespace |
| 301 | 301 |
| 302 TEST_F(DocumentLoadingRenderingTest, | 302 TEST_F(DocumentLoadingRenderingTest, |
| 303 ShouldThrottleIframeLifecycleUntilPendingSheetsLoaded) { | 303 ShouldThrottleIframeLifecycleUntilPendingSheetsLoaded) { |
| 304 SimRequest main_resource("https://example.com/main.html", "text/html"); | 304 SimRequest main_resource("https://example.com/main.html", "text/html"); |
| 305 SimRequest frame_resource("https://example.com/frame.html", "text/html"); | 305 SimRequest frame_resource("https://example.com/frame.html", "text/html"); |
| 306 SimRequest css_resource("https://example.com/frame.css", "text/css"); | 306 SimRequest css_resource("https://example.com/frame.css", "text/css"); |
| 307 | 307 |
| 308 LoadURL("https://example.com/main.html"); | 308 LoadURL("https://example.com/main.html"); |
| 309 | 309 |
| 310 WebView().Resize(WebSize(800, 600)); | 310 WebView().Resize(WebSize(800, 600)); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 | 417 |
| 418 // After reset ignoringPendingStylesheets, we should block rendering again. | 418 // After reset ignoringPendingStylesheets, we should block rendering again. |
| 419 EXPECT_FALSE(GetDocument().IsRenderingReady()); | 419 EXPECT_FALSE(GetDocument().IsRenderingReady()); |
| 420 | 420 |
| 421 import_resource.Write("div { color: red; }"); | 421 import_resource.Write("div { color: red; }"); |
| 422 import_resource.Finish(); | 422 import_resource.Finish(); |
| 423 main_resource.Finish(); | 423 main_resource.Finish(); |
| 424 } | 424 } |
| 425 | 425 |
| 426 } // namespace blink | 426 } // namespace blink |
| OLD | NEW |