| OLD | NEW |
| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
| 13 #include "chrome/browser/ui/window_snapshot/window_snapshot.h" | 13 #include "chrome/browser/ui/window_snapshot/window_snapshot.h" |
| 14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
| 15 #include "chrome/common/chrome_version_info.h" | 15 #include "chrome/common/chrome_version_info.h" |
| 16 #include "chrome/test/base/in_process_browser_test.h" | 16 #include "chrome/test/base/in_process_browser_test.h" |
| 17 #include "chrome/test/base/test_launcher_utils.h" | 17 #include "chrome/test/base/test_launcher_utils.h" |
| 18 #include "chrome/test/base/tracing.h" | 18 #include "chrome/test/base/tracing.h" |
| 19 #include "chrome/test/base/ui_test_utils.h" | 19 #include "chrome/test/base/ui_test_utils.h" |
| 20 #include "content/public/browser/render_view_host.h" | 20 #include "content/public/browser/render_view_host.h" |
| 21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
| 22 #include "content/public/common/content_switches.h" | 22 #include "content/public/common/content_switches.h" |
| 23 #include "content/test/gpu/test_switches.h" | 23 #include "content/test/gpu/test_switches.h" |
| 24 #include "googleurl/src/gurl.h" | 24 #include "googleurl/src/gurl.h" |
| 25 #include "net/base/net_util.h" | 25 #include "net/base/net_util.h" |
| 26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 27 #include "third_party/skia/include/core/SkBitmap.h" | 27 #include "third_party/skia/include/core/SkBitmap.h" |
| 28 #include "third_party/skia/include/core/SkColor.h" | 28 #include "third_party/skia/include/core/SkColor.h" |
| 29 #include "ui/compositor/compositor_setup.h" |
| 29 #include "ui/gfx/codec/png_codec.h" | 30 #include "ui/gfx/codec/png_codec.h" |
| 30 #include "ui/gfx/compositor/compositor_setup.h" | |
| 31 #include "ui/gfx/gl/gl_switches.h" | 31 #include "ui/gfx/gl/gl_switches.h" |
| 32 #include "ui/gfx/size.h" | 32 #include "ui/gfx/size.h" |
| 33 | 33 |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 // Command line flag for overriding the default location for putting generated | 36 // Command line flag for overriding the default location for putting generated |
| 37 // test images that do not match references. | 37 // test images that do not match references. |
| 38 const char kGeneratedDir[] = "generated-dir"; | 38 const char kGeneratedDir[] = "generated-dir"; |
| 39 // Command line flag for overriding the default location for reference images. | 39 // Command line flag for overriding the default location for reference images. |
| 40 const char kReferenceDir[] = "reference-dir"; | 40 const char kReferenceDir[] = "reference-dir"; |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 IN_PROC_BROWSER_TEST_F(Canvas2DPixelTestSD, Canvas2DRedBoxSD) { | 491 IN_PROC_BROWSER_TEST_F(Canvas2DPixelTestSD, Canvas2DRedBoxSD) { |
| 492 // If test baseline needs to be updated after a given revision, update the | 492 // If test baseline needs to be updated after a given revision, update the |
| 493 // following number. If no revision requirement, then 0. | 493 // following number. If no revision requirement, then 0. |
| 494 const int64 ref_img_revision_update = 123489; | 494 const int64 ref_img_revision_update = 123489; |
| 495 | 495 |
| 496 gfx::Size container_size(400, 300); | 496 gfx::Size container_size(400, 300); |
| 497 FilePath url = | 497 FilePath url = |
| 498 test_data_dir().AppendASCII("pixel_canvas2d.html"); | 498 test_data_dir().AppendASCII("pixel_canvas2d.html"); |
| 499 RunPixelTest(container_size, url, ref_img_revision_update); | 499 RunPixelTest(container_size, url, ref_img_revision_update); |
| 500 } | 500 } |
| OLD | NEW |