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