OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.h" | 5 #include "chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 14 #include "base/threading/sequenced_worker_pool.h" |
14 #include "chrome/browser/chromeos/login/screenshot_testing/SkDiffPixelsMetric.h" | 15 #include "chrome/browser/chromeos/login/screenshot_testing/SkDiffPixelsMetric.h" |
15 #include "chrome/browser/chromeos/login/screenshot_testing/SkImageDiffer.h" | 16 #include "chrome/browser/chromeos/login/screenshot_testing/SkImageDiffer.h" |
16 #include "chrome/browser/chromeos/login/screenshot_testing/SkPMetric.h" | 17 #include "chrome/browser/chromeos/login/screenshot_testing/SkPMetric.h" |
17 #include "chromeos/chromeos_switches.h" | 18 #include "chromeos/chromeos_switches.h" |
18 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "third_party/skia/include/core/SkCanvas.h" | 21 #include "third_party/skia/include/core/SkCanvas.h" |
21 #include "ui/compositor/compositor_switches.h" | 22 #include "ui/compositor/compositor_switches.h" |
22 #include "ui/gfx/codec/png_codec.h" | 23 #include "ui/gfx/codec/png_codec.h" |
23 #include "ui/gfx/image/image.h" | 24 #include "ui/gfx/image/image.h" |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 345 |
345 ScreenshotTester::Result testing_result; | 346 ScreenshotTester::Result testing_result; |
346 testing_result.similarity = result.result; | 347 testing_result.similarity = result.result; |
347 testing_result.screenshots_match = | 348 testing_result.screenshots_match = |
348 (result.result == SkImageDiffer::RESULT_CORRECT); | 349 (result.result == SkImageDiffer::RESULT_CORRECT); |
349 | 350 |
350 return testing_result; | 351 return testing_result; |
351 } | 352 } |
352 | 353 |
353 } // namespace chromeos | 354 } // namespace chromeos |
OLD | NEW |