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

Unified Diff: components/test_runner/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
Index: components/test_runner/test_runner.cc
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
index 80162a192c626628a2b091ef94fb155bf999039f..3d54c9a4d7207ac349471ad6b6fcf69c38bcf991 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -2352,6 +2352,14 @@ bool TestRunner::GetAnimationScheduled() const {
return is_animation_scheduled;
}
+void TestRunner::RunPendingAnimations()
+{
+ for (auto& widget: widgets_with_scheduled_animations_) {
+ widget->updateAllLifecyclePhases();
+ }
+ widgets_with_scheduled_animations_.clear();
+}
+
void TestRunner::OnAnimationScheduled(blink::WebWidget* widget) {
widgets_with_scheduled_animations_.insert(widget);
}

Powered by Google App Engine
This is Rietveld 408576698