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

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

Issue 1554583002: Revert of Change extension icon load errors to warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix merge issues Created 4 years, 11 months 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 <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
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)
91 .Build(); 89 .Build();
92 90
93 ASSERT_TRUE(extension.get()); 91 ASSERT_TRUE(extension.get());
94 const ActionInfo* browser_action_info = 92 const ActionInfo* browser_action_info =
95 ActionInfo::GetBrowserActionInfo(extension.get()); 93 ActionInfo::GetBrowserActionInfo(extension.get());
96 ASSERT_TRUE(browser_action_info); 94 ASSERT_TRUE(browser_action_info);
97 ASSERT_FALSE(browser_action_info->default_icon.empty()); 95 ASSERT_FALSE(browser_action_info->default_icon.empty());
98 96
99 const ExtensionIconSet& icons = browser_action_info->default_icon; 97 const ExtensionIconSet& icons = browser_action_info->default_icon;
100 98
(...skipping 22 matching lines...) Expand all
123 121
124 base::string16 error = ErrorUtils::FormatErrorMessageUTF16( 122 base::string16 error = ErrorUtils::FormatErrorMessageUTF16(
125 errors::kInvalidIconPath, "19"); 123 errors::kInvalidIconPath, "19");
126 LoadAndExpectError( 124 LoadAndExpectError(
127 ManifestData(std::move(manifest_value), "Invalid default icon"), 125 ManifestData(std::move(manifest_value), "Invalid default icon"),
128 errors::kInvalidIconPath); 126 errors::kInvalidIconPath);
129 } 127 }
130 128
131 } // namespace 129 } // namespace
132 } // namespace extensions 130 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698