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 "ui/gfx/image/image.h" | 6 #include "ui/gfx/image/image.h" |
7 #include "ui/gfx/image/image_skia.h" | 7 #include "ui/gfx/image/image_skia.h" |
8 #include "ui/gfx/image/image_unittest_util.h" | 8 #include "ui/gfx/image/image_unittest_util.h" |
9 | 9 |
10 #if defined(TOOLKIT_GTK) | 10 #if defined(TOOLKIT_GTK) |
11 #include <gtk/gtk.h> | 11 #include <gtk/gtk.h> |
12 #include "ui/gfx/gtk_util.h" | 12 #include "ui/gfx/gtk_util.h" |
13 #elif defined(OS_MACOSX) | 13 #elif defined(OS_MACOSX) |
14 #include "base/mac/mac_util.h" | 14 #include "base/mac/mac_util.h" |
15 #include "skia/ext/skia_utils_mac.h" | 15 #include "skia/ext/skia_utils_mac.h" |
16 #endif | 16 #endif |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 #if defined(TOOLKIT_VIEWS) | 20 #if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID) |
21 const bool kUsesSkiaNatively = true; | 21 const bool kUsesSkiaNatively = true; |
22 #else | 22 #else |
23 const bool kUsesSkiaNatively = false; | 23 const bool kUsesSkiaNatively = false; |
24 #endif | 24 #endif |
25 | 25 |
26 class ImageTest : public testing::Test { | 26 class ImageTest : public testing::Test { |
27 }; | 27 }; |
28 | 28 |
29 namespace gt = gfx::test; | 29 namespace gt = gfx::test; |
30 | 30 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 image = gfx::Image(gfx::ImageSkiaRep(bitmap, ui::SCALE_FACTOR_100P)); | 315 image = gfx::Image(gfx::ImageSkiaRep(bitmap, ui::SCALE_FACTOR_100P)); |
316 } | 316 } |
317 EXPECT_TRUE(!image.ToSkBitmap()->isNull()); | 317 EXPECT_TRUE(!image.ToSkBitmap()->isNull()); |
318 } | 318 } |
319 | 319 |
320 // Integration tests with UI toolkit frameworks require linking against the | 320 // Integration tests with UI toolkit frameworks require linking against the |
321 // Views library and cannot be here (gfx_unittests doesn't include it). They | 321 // Views library and cannot be here (gfx_unittests doesn't include it). They |
322 // instead live in /chrome/browser/ui/tests/ui_gfx_image_unittest.cc. | 322 // instead live in /chrome/browser/ui/tests/ui_gfx_image_unittest.cc. |
323 | 323 |
324 } // namespace | 324 } // namespace |
OLD | NEW |