| 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.h" | 8 #include "base/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/api/icons/icons_handler.h" | |
| 13 #include "chrome/common/extensions/extension.h" | 12 #include "chrome/common/extensions/extension.h" |
| 14 #include "chrome/common/extensions/extension_constants.h" | 13 #include "chrome/common/extensions/extension_constants.h" |
| 15 #include "chrome/common/extensions/manifest.h" | 14 #include "chrome/common/extensions/manifest.h" |
| 15 #include "chrome/common/extensions/manifest_handlers/icons_handler.h" |
| 16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
| 17 #include "content/public/test/test_browser_thread.h" | 17 #include "content/public/test/test_browser_thread.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; |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 EXPECT_EQ(16, representation.pixel_width()); | 547 EXPECT_EQ(16, representation.pixel_width()); |
| 548 EXPECT_TRUE(gfx::BitmapsAreEqual(representation.sk_bitmap(), bitmap_16)); | 548 EXPECT_TRUE(gfx::BitmapsAreEqual(representation.sk_bitmap(), bitmap_16)); |
| 549 | 549 |
| 550 // When requesting another representation, we should get blank image. | 550 // When requesting another representation, we should get blank image. |
| 551 representation = image_skia.GetRepresentation(ui::SCALE_FACTOR_200P); | 551 representation = image_skia.GetRepresentation(ui::SCALE_FACTOR_200P); |
| 552 | 552 |
| 553 EXPECT_TRUE(gfx::BitmapsAreEqual( | 553 EXPECT_TRUE(gfx::BitmapsAreEqual( |
| 554 representation.sk_bitmap(), | 554 representation.sk_bitmap(), |
| 555 CreateBlankBitmapForScale(16, ui::SCALE_FACTOR_200P))); | 555 CreateBlankBitmapForScale(16, ui::SCALE_FACTOR_200P))); |
| 556 } | 556 } |
| OLD | NEW |