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" | |
15 #include "chrome/browser/chromeos/login/screenshot_testing/SkDiffPixelsMetric.h" | 14 #include "chrome/browser/chromeos/login/screenshot_testing/SkDiffPixelsMetric.h" |
16 #include "chrome/browser/chromeos/login/screenshot_testing/SkImageDiffer.h" | 15 #include "chrome/browser/chromeos/login/screenshot_testing/SkImageDiffer.h" |
17 #include "chrome/browser/chromeos/login/screenshot_testing/SkPMetric.h" | 16 #include "chrome/browser/chromeos/login/screenshot_testing/SkPMetric.h" |
18 #include "chromeos/chromeos_switches.h" | 17 #include "chromeos/chromeos_switches.h" |
19 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
21 #include "third_party/skia/include/core/SkCanvas.h" | 20 #include "third_party/skia/include/core/SkCanvas.h" |
22 #include "ui/compositor/compositor_switches.h" | 21 #include "ui/compositor/compositor_switches.h" |
23 #include "ui/gfx/codec/png_codec.h" | 22 #include "ui/gfx/codec/png_codec.h" |
24 #include "ui/gfx/image/image.h" | 23 #include "ui/gfx/image/image.h" |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 | 344 |
346 ScreenshotTester::Result testing_result; | 345 ScreenshotTester::Result testing_result; |
347 testing_result.similarity = result.result; | 346 testing_result.similarity = result.result; |
348 testing_result.screenshots_match = | 347 testing_result.screenshots_match = |
349 (result.result == SkImageDiffer::RESULT_CORRECT); | 348 (result.result == SkImageDiffer::RESULT_CORRECT); |
350 | 349 |
351 return testing_result; | 350 return testing_result; |
352 } | 351 } |
353 | 352 |
354 } // namespace chromeos | 353 } // namespace chromeos |
OLD | NEW |