Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc

Issue 1541113003: Revert of Change extension icon load errors to warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: manual rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/common/extensions/api/extension_action/action_info.h" 5 #include "chrome/common/extensions/api/extension_action/action_info.h"
6 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h" 6 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h"
7 #include "extensions/common/constants.h" 7 #include "extensions/common/constants.h"
8 #include "extensions/common/error_utils.h" 8 #include "extensions/common/error_utils.h"
9 #include "extensions/common/extension_builder.h" 9 #include "extensions/common/extension_builder.h"
10 #include "extensions/common/extension_icon_set.h" 10 #include "extensions/common/extension_icon_set.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 .Set("name", "Dictionary default icon") 77 .Set("name", "Dictionary default icon")
78 .Set("version", "1.0.0") 78 .Set("version", "1.0.0")
79 .Set("manifest_version", 2) 79 .Set("manifest_version", 2)
80 .Set("browser_action", 80 .Set("browser_action",
81 std::move(DictionaryBuilder().Set( 81 std::move(DictionaryBuilder().Set(
82 "default_icon", 82 "default_icon",
83 std::move(DictionaryBuilder() 83 std::move(DictionaryBuilder()
84 .Set("19", "icon19.png") 84 .Set("19", "icon19.png")
85 .Set("24", "icon24.png") 85 .Set("24", "icon24.png")
86 .Set("38", "icon38.png"))))))) 86 .Set("38", "icon38.png")))))))
87 // Don't check for existence of icons during parsing.
88 .SetLocation(Manifest::UNPACKED)
89 .Build(); 87 .Build();
90 88
91 ASSERT_TRUE(extension.get()); 89 ASSERT_TRUE(extension.get());
92 const ActionInfo* browser_action_info = 90 const ActionInfo* browser_action_info =
93 ActionInfo::GetBrowserActionInfo(extension.get()); 91 ActionInfo::GetBrowserActionInfo(extension.get());
94 ASSERT_TRUE(browser_action_info); 92 ASSERT_TRUE(browser_action_info);
95 ASSERT_FALSE(browser_action_info->default_icon.empty()); 93 ASSERT_FALSE(browser_action_info->default_icon.empty());
96 94
97 const ExtensionIconSet& icons = browser_action_info->default_icon; 95 const ExtensionIconSet& icons = browser_action_info->default_icon;
98 96
(...skipping 22 matching lines...) Expand all
121 119
122 base::string16 error = ErrorUtils::FormatErrorMessageUTF16( 120 base::string16 error = ErrorUtils::FormatErrorMessageUTF16(
123 errors::kInvalidIconPath, "19"); 121 errors::kInvalidIconPath, "19");
124 LoadAndExpectError( 122 LoadAndExpectError(
125 ManifestData(manifest_value.Pass(), "Invalid default icon"), 123 ManifestData(manifest_value.Pass(), "Invalid default icon"),
126 errors::kInvalidIconPath); 124 errors::kInvalidIconPath);
127 } 125 }
128 126
129 } // namespace 127 } // namespace
130 } // namespace extensions 128 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698