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

Unified Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 2352813004: Force-generate a frame before the end of a layout test. (Closed)
Patch Set: Created 4 years, 3 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 | « components/test_runner/web_test_runner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/layout_test/blink_test_runner.cc
diff --git a/content/shell/renderer/layout_test/blink_test_runner.cc b/content/shell/renderer/layout_test/blink_test_runner.cc
index dc4b8e228cb04d50cfcdbb91c469dde6a8fff4c9..1828c87071472a2c2c8d945456dd1b2f3a32d33a 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -587,6 +587,7 @@ void BlinkTestRunner::TestFinished() {
test_runner::WebTestInterfaces* interfaces =
LayoutTestRenderThreadObserver::GetInstance()->test_interfaces();
interfaces->SetTestIsRunning(false);
+ interfaces->TestRunner()->RunPendingAnimations();
if (interfaces->TestRunner()->ShouldDumpBackForwardList()) {
SyncNavigationStateVisitor visitor;
RenderView::ForEach(&visitor);
@@ -876,20 +877,7 @@ void BlinkTestRunner::CaptureDumpContinued() {
return;
}
-#ifndef NDEBUG
- // Force a layout/paint by the end of the test to ensure test coverage of
- // incremental painting.
- test_runner::LayoutAndPaintAsyncThen(
chrishtr 2016/09/19 23:49:38 @wangxianzhu: this is no longer needed, right?
Xianzhu 2016/09/20 02:40:35 Right. This had been needed before sync painting.
- render_view()
- ->GetWebView()
- ->mainFrame()
- ->toWebLocalFrame()
- ->frameWidget(),
- base::Bind(&BlinkTestRunner::CaptureDumpComplete,
- base::Unretained(this)));
-#else
CaptureDumpComplete();
-#endif
}
void BlinkTestRunner::OnPixelsDumpCompleted(const SkBitmap& snapshot) {
« no previous file with comments | « components/test_runner/web_test_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698