| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/image_loader.h" | 5 #include "extensions/browser/image_loader.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/json/json_file_value_serializer.h" | 8 #include "base/json/json_file_value_serializer.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 return NULL; | 93 return NULL; |
| 94 | 94 |
| 95 return Extension::Create( | 95 return Extension::Create( |
| 96 extension_dir, location, *valid_value, Extension::NO_FLAGS, &error); | 96 extension_dir, location, *valid_value, Extension::NO_FLAGS, &error); |
| 97 } | 97 } |
| 98 | 98 |
| 99 gfx::Image image_; | 99 gfx::Image image_; |
| 100 gfx::ImageFamily image_family_; | 100 gfx::ImageFamily image_family_; |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 virtual void SetUp() OVERRIDE { | 103 virtual void SetUp() override { |
| 104 testing::Test::SetUp(); | 104 testing::Test::SetUp(); |
| 105 file_thread_.Start(); | 105 file_thread_.Start(); |
| 106 io_thread_.Start(); | 106 io_thread_.Start(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 int image_loaded_count_; | 109 int image_loaded_count_; |
| 110 bool quit_in_image_loaded_; | 110 bool quit_in_image_loaded_; |
| 111 base::MessageLoop ui_loop_; | 111 base::MessageLoop ui_loop_; |
| 112 content::TestBrowserThread ui_thread_; | 112 content::TestBrowserThread ui_thread_; |
| 113 content::TestBrowserThread file_thread_; | 113 content::TestBrowserThread file_thread_; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 304 |
| 305 const gfx::ImageSkiaRep* img_rep1 = &image_reps[0]; | 305 const gfx::ImageSkiaRep* img_rep1 = &image_reps[0]; |
| 306 const gfx::ImageSkiaRep* img_rep2 = &image_reps[1]; | 306 const gfx::ImageSkiaRep* img_rep2 = &image_reps[1]; |
| 307 EXPECT_EQ(extension_misc::EXTENSION_ICON_BITTY, img_rep1->pixel_width()); | 307 EXPECT_EQ(extension_misc::EXTENSION_ICON_BITTY, img_rep1->pixel_width()); |
| 308 EXPECT_EQ(1.0f, img_rep1->scale()); | 308 EXPECT_EQ(1.0f, img_rep1->scale()); |
| 309 EXPECT_EQ(extension_misc::EXTENSION_ICON_SMALLISH, img_rep2->pixel_width()); | 309 EXPECT_EQ(extension_misc::EXTENSION_ICON_SMALLISH, img_rep2->pixel_width()); |
| 310 EXPECT_EQ(2.0f, img_rep2->scale()); | 310 EXPECT_EQ(2.0f, img_rep2->scale()); |
| 311 } | 311 } |
| 312 | 312 |
| 313 } // namespace extensions | 313 } // namespace extensions |
| OLD | NEW |