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 "chrome/browser/extensions/extension_icon_image.h" | 5 #include "chrome/browser/extensions/extension_icon_image.h" |
6 | 6 |
7 #include "base/json/json_file_value_serializer.h" | 7 #include "base/json/json_file_value_serializer.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "chrome/browser/extensions/image_loader.h" | 10 #include "chrome/browser/extensions/image_loader.h" |
11 #include "chrome/common/chrome_paths.h" | 11 #include "chrome/common/chrome_paths.h" |
12 #include "chrome/common/extensions/extension_constants.h" | 12 #include "chrome/common/extensions/extension_constants.h" |
13 #include "chrome/common/extensions/manifest_handlers/icons_handler.h" | |
14 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
15 #include "content/public/test/test_browser_thread.h" | 14 #include "content/public/test/test_browser_thread.h" |
16 #include "extensions/common/extension.h" | 15 #include "extensions/common/extension.h" |
17 #include "extensions/common/manifest.h" | 16 #include "extensions/common/manifest.h" |
| 17 #include "extensions/common/manifest_handlers/icons_handler.h" |
18 #include "grit/theme_resources.h" | 18 #include "grit/theme_resources.h" |
19 #include "skia/ext/image_operations.h" | 19 #include "skia/ext/image_operations.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
22 #include "ui/gfx/image/image_skia_source.h" | 22 #include "ui/gfx/image/image_skia_source.h" |
23 #include "ui/gfx/skia_util.h" | 23 #include "ui/gfx/skia_util.h" |
24 | 24 |
25 using content::BrowserThread; | 25 using content::BrowserThread; |
26 using extensions::Extension; | 26 using extensions::Extension; |
27 using extensions::IconImage; | 27 using extensions::IconImage; |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 EXPECT_EQ(16, representation.pixel_width()); | 563 EXPECT_EQ(16, representation.pixel_width()); |
564 EXPECT_TRUE(gfx::BitmapsAreEqual(representation.sk_bitmap(), bitmap_16)); | 564 EXPECT_TRUE(gfx::BitmapsAreEqual(representation.sk_bitmap(), bitmap_16)); |
565 | 565 |
566 // When requesting another representation, we should get blank image. | 566 // When requesting another representation, we should get blank image. |
567 representation = image_skia.GetRepresentation(2.0f); | 567 representation = image_skia.GetRepresentation(2.0f); |
568 | 568 |
569 EXPECT_TRUE(gfx::BitmapsAreEqual( | 569 EXPECT_TRUE(gfx::BitmapsAreEqual( |
570 representation.sk_bitmap(), | 570 representation.sk_bitmap(), |
571 CreateBlankBitmapForScale(16, ui::SCALE_FACTOR_200P))); | 571 CreateBlankBitmapForScale(16, ui::SCALE_FACTOR_200P))); |
572 } | 572 } |
OLD | NEW |