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

Side by Side Diff: chrome/common/extensions/manifest_tests/extension_manifests_browseraction_unittest.cc

Issue 11312228: Move extension_error_utils.* and url_pattern_set.* into (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hate Created 8 years, 1 month 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 | Annotate | Revision Log
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/extension_builder.h" 5 #include "chrome/common/extensions/extension_builder.h"
6 #include "chrome/common/extensions/extension_error_utils.h"
7 #include "chrome/common/extensions/extension_icon_set.h" 6 #include "chrome/common/extensions/extension_icon_set.h"
8 #include "chrome/common/extensions/extension_manifest_constants.h" 7 #include "chrome/common/extensions/extension_manifest_constants.h"
9 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" 8 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
10 #include "chrome/common/extensions/value_builder.h" 9 #include "chrome/common/extensions/value_builder.h"
10 #include "extensions/common/error_utils.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace errors = extension_manifest_errors; 13 namespace errors = extension_manifest_errors;
14 14
15 namespace extensions { 15 namespace extensions {
16 namespace { 16 namespace {
17 17
18 TEST_F(ExtensionManifestTest, BrowserActionManifestIcons_NoDefaultIcons) { 18 TEST_F(ExtensionManifestTest, BrowserActionManifestIcons_NoDefaultIcons) {
19 scoped_refptr<const Extension> extension = 19 scoped_refptr<const Extension> extension =
20 ExtensionBuilder() 20 ExtensionBuilder()
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 .Set("name", "Invalid default icon") 86 .Set("name", "Invalid default icon")
87 .Set("version", "1.0.0") 87 .Set("version", "1.0.0")
88 .Set("manifest_version", 2) 88 .Set("manifest_version", 2)
89 .Set("browser_action", DictionaryBuilder() 89 .Set("browser_action", DictionaryBuilder()
90 .Set("default_icon", DictionaryBuilder() 90 .Set("default_icon", DictionaryBuilder()
91 .Set("19", "") // Invalid value. 91 .Set("19", "") // Invalid value.
92 .Set("24", "icon24.png") 92 .Set("24", "icon24.png")
93 .Set("38", "icon38.png"))) 93 .Set("38", "icon38.png")))
94 .Build(); 94 .Build();
95 95
96 string16 error = ExtensionErrorUtils::FormatErrorMessageUTF16( 96 string16 error = ErrorUtils::FormatErrorMessageUTF16(
97 errors::kInvalidIconPath, "19"); 97 errors::kInvalidIconPath, "19");
98 LoadAndExpectError(Manifest(manifest_value.get(), "Invalid default icon"), 98 LoadAndExpectError(Manifest(manifest_value.get(), "Invalid default icon"),
99 errors::kInvalidIconPath); 99 errors::kInvalidIconPath);
100 } 100 }
101 101
102 } // namespace 102 } // namespace
103 } // namespace extensions 103 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698