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 <utility> | 5 #include <utility> |
6 | 6 |
7 #include "chrome/common/extensions/api/extension_action/action_info.h" | 7 #include "chrome/common/extensions/api/extension_action/action_info.h" |
8 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h" | 8 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h" |
9 #include "extensions/common/constants.h" | 9 #include "extensions/common/constants.h" |
10 #include "extensions/common/error_utils.h" | 10 #include "extensions/common/error_utils.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 .Set("name", "Dictionary default icon") | 79 .Set("name", "Dictionary default icon") |
80 .Set("version", "1.0.0") | 80 .Set("version", "1.0.0") |
81 .Set("manifest_version", 2) | 81 .Set("manifest_version", 2) |
82 .Set("browser_action", | 82 .Set("browser_action", |
83 std::move(DictionaryBuilder().Set( | 83 std::move(DictionaryBuilder().Set( |
84 "default_icon", | 84 "default_icon", |
85 std::move(DictionaryBuilder() | 85 std::move(DictionaryBuilder() |
86 .Set("19", "icon19.png") | 86 .Set("19", "icon19.png") |
87 .Set("24", "icon24.png") | 87 .Set("24", "icon24.png") |
88 .Set("38", "icon38.png"))))))) | 88 .Set("38", "icon38.png"))))))) |
| 89 // Don't check for existence of icons during parsing. |
| 90 .SetLocation(Manifest::UNPACKED) |
89 .Build(); | 91 .Build(); |
90 | 92 |
91 ASSERT_TRUE(extension.get()); | 93 ASSERT_TRUE(extension.get()); |
92 const ActionInfo* browser_action_info = | 94 const ActionInfo* browser_action_info = |
93 ActionInfo::GetBrowserActionInfo(extension.get()); | 95 ActionInfo::GetBrowserActionInfo(extension.get()); |
94 ASSERT_TRUE(browser_action_info); | 96 ASSERT_TRUE(browser_action_info); |
95 ASSERT_FALSE(browser_action_info->default_icon.empty()); | 97 ASSERT_FALSE(browser_action_info->default_icon.empty()); |
96 | 98 |
97 const ExtensionIconSet& icons = browser_action_info->default_icon; | 99 const ExtensionIconSet& icons = browser_action_info->default_icon; |
98 | 100 |
(...skipping 22 matching lines...) Expand all Loading... |
121 | 123 |
122 base::string16 error = ErrorUtils::FormatErrorMessageUTF16( | 124 base::string16 error = ErrorUtils::FormatErrorMessageUTF16( |
123 errors::kInvalidIconPath, "19"); | 125 errors::kInvalidIconPath, "19"); |
124 LoadAndExpectError( | 126 LoadAndExpectError( |
125 ManifestData(std::move(manifest_value), "Invalid default icon"), | 127 ManifestData(std::move(manifest_value), "Invalid default icon"), |
126 errors::kInvalidIconPath); | 128 errors::kInvalidIconPath); |
127 } | 129 } |
128 | 130 |
129 } // namespace | 131 } // namespace |
130 } // namespace extensions | 132 } // namespace extensions |
OLD | NEW |