| 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_action_icon_factory.h" | 5 #include "chrome/browser/extensions/extension_action_icon_factory.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 chromeos::ScopedTestCrosSettings test_cros_settings_; | 188 chromeos::ScopedTestCrosSettings test_cros_settings_; |
| 189 chromeos::ScopedTestUserManager test_user_manager_; | 189 chromeos::ScopedTestUserManager test_user_manager_; |
| 190 #endif | 190 #endif |
| 191 | 191 |
| 192 DISALLOW_COPY_AND_ASSIGN(ExtensionActionIconFactoryTest); | 192 DISALLOW_COPY_AND_ASSIGN(ExtensionActionIconFactoryTest); |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 INSTANTIATE_TEST_CASE_P( | 195 INSTANTIATE_TEST_CASE_P( |
| 196 ExtensionActionIconFactoryTest_MaterialDesign, | 196 ExtensionActionIconFactoryTest_MaterialDesign, |
| 197 ExtensionActionIconFactoryTest, | 197 ExtensionActionIconFactoryTest, |
| 198 testing::Values(ui::MaterialDesignController::NON_MATERIAL, | 198 testing::Values(ui::MaterialDesignController::MATERIAL_NORMAL, |
| 199 ui::MaterialDesignController::MATERIAL_NORMAL, | |
| 200 ui::MaterialDesignController::MATERIAL_HYBRID)); | 199 ui::MaterialDesignController::MATERIAL_HYBRID)); |
| 201 | 200 |
| 202 // If there is no default icon, and the icon has not been set using |SetIcon|, | 201 // If there is no default icon, and the icon has not been set using |SetIcon|, |
| 203 // the factory should return favicon. | 202 // the factory should return favicon. |
| 204 TEST_P(ExtensionActionIconFactoryTest, NoIcons) { | 203 TEST_P(ExtensionActionIconFactoryTest, NoIcons) { |
| 205 // Load an extension that has browser action without default icon set in the | 204 // Load an extension that has browser action without default icon set in the |
| 206 // manifest and does not call |SetIcon| by default. | 205 // manifest and does not call |SetIcon| by default. |
| 207 scoped_refptr<Extension> extension(CreateExtension( | 206 scoped_refptr<Extension> extension(CreateExtension( |
| 208 "browser_action/no_icon", Manifest::INVALID_LOCATION)); | 207 "browser_action/no_icon", Manifest::INVALID_LOCATION)); |
| 209 ASSERT_TRUE(extension.get() != NULL); | 208 ASSERT_TRUE(extension.get() != NULL); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 icon = icon_factory.GetIcon(1); | 310 icon = icon_factory.GetIcon(1); |
| 312 | 311 |
| 313 EXPECT_TRUE(ImageRepsAreEqual( | 312 EXPECT_TRUE(ImageRepsAreEqual( |
| 314 default_icon.ToImageSkia()->GetRepresentation(1.0f), | 313 default_icon.ToImageSkia()->GetRepresentation(1.0f), |
| 315 icon.ToImageSkia()->GetRepresentation(1.0f))); | 314 icon.ToImageSkia()->GetRepresentation(1.0f))); |
| 316 | 315 |
| 317 } | 316 } |
| 318 | 317 |
| 319 } // namespace | 318 } // namespace |
| 320 } // namespace extensions | 319 } // namespace extensions |
| OLD | NEW |