| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "components/wallpaper/wallpaper_color_calculator.h" | 5 #include "components/wallpaper/wallpaper_color_calculator.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/single_thread_task_runner.h" |
| 11 #include "base/test/histogram_tester.h" | 12 #include "base/test/histogram_tester.h" |
| 12 #include "base/test/null_task_runner.h" | 13 #include "base/test/null_task_runner.h" |
| 13 #include "base/test/test_mock_time_task_runner.h" | 14 #include "base/test/test_mock_time_task_runner.h" |
| 14 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
| 15 #include "components/wallpaper/wallpaper_color_calculator_observer.h" | 16 #include "components/wallpaper/wallpaper_color_calculator_observer.h" |
| 16 #include "skia/ext/platform_canvas.h" | 17 #include "skia/ext/platform_canvas.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "third_party/skia/include/core/SkBitmap.h" | 19 #include "third_party/skia/include/core/SkBitmap.h" |
| 19 #include "third_party/skia/include/core/SkColor.h" | 20 #include "third_party/skia/include/core/SkColor.h" |
| 20 #include "ui/gfx/canvas.h" | 21 #include "ui/gfx/canvas.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 231 |
| 231 EXPECT_TRUE(calculator_->StartCalculation()); | 232 EXPECT_TRUE(calculator_->StartCalculation()); |
| 232 | 233 |
| 233 histograms_.ExpectUniqueSample("Ash.Wallpaper.ColorExtractionResult", false, | 234 histograms_.ExpectUniqueSample("Ash.Wallpaper.ColorExtractionResult", false, |
| 234 1); | 235 1); |
| 235 histograms_.ExpectTotalCount("Ash.Wallpaper.ColorExtraction.Durations", 1); | 236 histograms_.ExpectTotalCount("Ash.Wallpaper.ColorExtraction.Durations", 1); |
| 236 histograms_.ExpectTotalCount("Ash.Wallpaper.ColorExtraction.UserDelay", 0); | 237 histograms_.ExpectTotalCount("Ash.Wallpaper.ColorExtraction.UserDelay", 0); |
| 237 } | 238 } |
| 238 | 239 |
| 239 } // namespace wallpaper | 240 } // namespace wallpaper |
| OLD | NEW |