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

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: none 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 | « no previous file | 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..8151a20fa28d164833f1fd9258862fe3c4dae824 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -592,6 +592,10 @@ void BlinkTestRunner::TestFinished() {
RenderView::ForEach(&visitor);
Send(new ShellViewHostMsg_CaptureSessionHistory(routing_id()));
} else {
+ // clean out the lifecycle if needed before capturing the layout tree
+ // dump and pixels from the compositor.
+ render_view()->GetWebView()->mainFrame()->toWebLocalFrame()
+ ->frameWidget()->updateAllLifecyclePhases();
CaptureDump();
}
}
@@ -876,20 +880,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(
- 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 | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698