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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 #include "third_party/skia/include/core/SkCanvas.h" | 6 #include "third_party/skia/include/core/SkCanvas.h" |
7 #include "third_party/skia/include/core/SkPaint.h" | 7 #include "third_party/skia/include/core/SkPaint.h" |
8 #include "ui/gfx/image/image.h" | 8 #include "ui/gfx/image/image.h" |
9 #include "ui/gfx/image/image_png_rep.h" | 9 #include "ui/gfx/image/image_png_rep.h" |
10 #include "ui/gfx/image/image_skia.h" | 10 #include "ui/gfx/image/image_skia.h" |
11 #include "ui/gfx/image/image_unittest_util.h" | 11 #include "ui/gfx/image/image_unittest_util.h" |
12 | 12 |
13 #if defined(TOOLKIT_GTK) | 13 #if defined(TOOLKIT_GTK) |
14 #include <gtk/gtk.h> | 14 #include <gtk/gtk.h> |
15 #include "ui/gfx/gtk_util.h" | 15 #include "ui/gfx/gtk_util.h" |
16 #elif defined(OS_IOS) | 16 #elif defined(OS_IOS) |
17 #include "base/mac/foundation_util.h" | 17 #include "base/mac/foundation_util.h" |
18 #include "skia/ext/skia_utils_ios.h" | 18 #include "skia/ext/skia_utils_ios.h" |
19 #elif defined(OS_MACOSX) | 19 #elif defined(OS_MACOSX) |
20 #include "base/mac/mac_util.h" | 20 #include "base/mac/mac_util.h" |
21 #include "skia/ext/skia_utils_mac.h" | 21 #include "skia/ext/skia_utils_mac.h" |
22 #endif | 22 #endif |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 #if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID) | 26 #if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID) || \ |
| 27 (defined(OS_LINUX) && !defined(USE_CAIRO)) |
27 const bool kUsesSkiaNatively = true; | 28 const bool kUsesSkiaNatively = true; |
28 #else | 29 #else |
29 const bool kUsesSkiaNatively = false; | 30 const bool kUsesSkiaNatively = false; |
30 #endif | 31 #endif |
31 | 32 |
32 class ImageTest : public testing::Test { | 33 class ImageTest : public testing::Test { |
33 public: | 34 public: |
34 ImageTest() { | 35 ImageTest() { |
35 std::vector<float> scales; | 36 std::vector<float> scales; |
36 scales.push_back(1.0f); | 37 scales.push_back(1.0f); |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 gfx::ImageSkiaRep(bitmap, 1.0f))); | 689 gfx::ImageSkiaRep(bitmap, 1.0f))); |
689 } | 690 } |
690 EXPECT_TRUE(!image.ToSkBitmap()->isNull()); | 691 EXPECT_TRUE(!image.ToSkBitmap()->isNull()); |
691 } | 692 } |
692 | 693 |
693 // Integration tests with UI toolkit frameworks require linking against the | 694 // Integration tests with UI toolkit frameworks require linking against the |
694 // Views library and cannot be here (ui_unittests doesn't include it). They | 695 // Views library and cannot be here (ui_unittests doesn't include it). They |
695 // instead live in /chrome/browser/ui/tests/ui_gfx_image_unittest.cc. | 696 // instead live in /chrome/browser/ui/tests/ui_gfx_image_unittest.cc. |
696 | 697 |
697 } // namespace | 698 } // namespace |
OLD | NEW |