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

Side by Side Diff: ui/compositor/layer_unittest.cc

Issue 2827093002: Disable flaky LayerWithRealCompositorTest.ReportMetrics test on windows. (Closed)
Patch Set: disable ReportMetrics test 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/compositor/layer.h" 5 #include "ui/compositor/layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 2192 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 report_called_ = true; 2203 report_called_ = true;
2204 } 2204 }
2205 2205
2206 private: 2206 private:
2207 bool report_called_ = false; 2207 bool report_called_ = false;
2208 int value_ = -1; 2208 int value_ = -1;
2209 2209
2210 DISALLOW_COPY_AND_ASSIGN(TestMetricsReporter); 2210 DISALLOW_COPY_AND_ASSIGN(TestMetricsReporter);
2211 }; 2211 };
2212 2212
2213 // TODO(crbug/709080): LayerWithRealCompositorTest.ReportMetrics is flaky on
2214 // Windows.
2215 #if defined(OS_WIN)
2216 #define MAYBE_ReportMetrics DISABLED_ReportMetrics
2217 #else
2218 #define MAYBE_ReportMetrics ReportMetrics
2219 #endif
2220
2213 // Starts an animation and tests that incrementing compositor frame count can 2221 // Starts an animation and tests that incrementing compositor frame count can
2214 // be used to report animation smoothness metrics. 2222 // be used to report animation smoothness metrics.
2215 TEST_F(LayerWithRealCompositorTest, ReportMetrics) { 2223 TEST_F(LayerWithRealCompositorTest, MAYBE_ReportMetrics) {
2216 std::unique_ptr<Layer> root(CreateLayer(LAYER_SOLID_COLOR)); 2224 std::unique_ptr<Layer> root(CreateLayer(LAYER_SOLID_COLOR));
2217 GetCompositor()->SetRootLayer(root.get()); 2225 GetCompositor()->SetRootLayer(root.get());
2218 LayerAnimator* animator = root->GetAnimator(); 2226 LayerAnimator* animator = root->GetAnimator();
2219 std::unique_ptr<ui::LayerAnimationElement> animation_element = 2227 std::unique_ptr<ui::LayerAnimationElement> animation_element =
2220 ui::LayerAnimationElement::CreateColorElement( 2228 ui::LayerAnimationElement::CreateColorElement(
2221 SK_ColorRED, base::TimeDelta::FromMilliseconds(100)); 2229 SK_ColorRED, base::TimeDelta::FromMilliseconds(100));
2222 ui::LayerAnimationSequence* animation_sequence = 2230 ui::LayerAnimationSequence* animation_sequence =
2223 new ui::LayerAnimationSequence(std::move(animation_element)); 2231 new ui::LayerAnimationSequence(std::move(animation_element));
2224 TestMetricsReporter reporter; 2232 TestMetricsReporter reporter;
2225 animation_sequence->SetAnimationMetricsReporter(&reporter); 2233 animation_sequence->SetAnimationMetricsReporter(&reporter);
(...skipping 12 matching lines...) Expand all
2238 layer.set_name("foo"); 2246 layer.set_name("foo");
2239 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info = 2247 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info =
2240 layer.TakeDebugInfo(nullptr); 2248 layer.TakeDebugInfo(nullptr);
2241 std::string trace_format("bar,"); 2249 std::string trace_format("bar,");
2242 debug_info->AppendAsTraceFormat(&trace_format); 2250 debug_info->AppendAsTraceFormat(&trace_format);
2243 std::string expected("bar,{\"layer_name\":\"foo\"}"); 2251 std::string expected("bar,{\"layer_name\":\"foo\"}");
2244 EXPECT_EQ(expected, trace_format); 2252 EXPECT_EQ(expected, trace_format);
2245 } 2253 }
2246 2254
2247 } // namespace ui 2255 } // namespace ui
OLDNEW
« 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