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

Unified Diff: ui/compositor/layer_unittest.cc

Issue 2827243003: Use WaitForSwap in LayerWithRealCompositorTest.ReportMetrics (Closed)
Patch Set: Reenable the LayerWithRealCompositorTest.ReportMetrics on Windows Created 3 years, 8 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: ui/compositor/layer_unittest.cc
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
index 911788fede5f9eaf0d6d06549093f1398a4ea02d..ebc270768599a3be106eb2306c4de460037ad8d8 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -2207,17 +2207,9 @@ class TestMetricsReporter : public ui::AnimationMetricsReporter {
DISALLOW_COPY_AND_ASSIGN(TestMetricsReporter);
};
-// TODO(crbug/709080): LayerWithRealCompositorTest.ReportMetrics is flaky on
-// Windows.
-#if defined(OS_WIN)
-#define MAYBE_ReportMetrics DISABLED_ReportMetrics
-#else
-#define MAYBE_ReportMetrics ReportMetrics
-#endif
-
// Starts an animation and tests that incrementing compositor frame count can
// be used to report animation smoothness metrics.
-TEST_F(LayerWithRealCompositorTest, MAYBE_ReportMetrics) {
+TEST_F(LayerWithRealCompositorTest, ReportMetrics) {
std::unique_ptr<Layer> root(CreateLayer(LAYER_SOLID_COLOR));
GetCompositor()->SetRootLayer(root.get());
LayerAnimator* animator = root->GetAnimator();
@@ -2230,7 +2222,7 @@ TEST_F(LayerWithRealCompositorTest, MAYBE_ReportMetrics) {
animation_sequence->SetAnimationMetricsReporter(&reporter);
animator->StartAnimation(animation_sequence);
while (!reporter.report_called())
- WaitForDraw();
+ WaitForSwap();
ResetCompositor();
// Even though most of the time 100% smooth animations are expected, on the
// test bots this cannot be guaranteed. Therefore simply check that some
« 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