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

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

Issue 10689097: Enforce the 'requirements' field in manifests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed UnpackedInstller issue Created 8 years, 3 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 "chrome/common/extensions/manifest_tests/extension_manifest_test.h" 5 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/common/chrome_paths.h" 10 #include "chrome/common/chrome_paths.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 Testcase("init_invalid_page_actions_multi.json", 58 Testcase("init_invalid_page_actions_multi.json",
59 errors::kInvalidPageActionsListSize), 59 errors::kInvalidPageActionsListSize),
60 Testcase("init_invalid_options_url_invalid.json", 60 Testcase("init_invalid_options_url_invalid.json",
61 errors::kInvalidOptionsPage), 61 errors::kInvalidOptionsPage),
62 Testcase("init_invalid_locale_invalid.json", errors::kInvalidDefaultLocale), 62 Testcase("init_invalid_locale_invalid.json", errors::kInvalidDefaultLocale),
63 Testcase("init_invalid_locale_empty.json", errors::kInvalidDefaultLocale), 63 Testcase("init_invalid_locale_empty.json", errors::kInvalidDefaultLocale),
64 Testcase("init_invalid_min_chrome_invalid.json", 64 Testcase("init_invalid_min_chrome_invalid.json",
65 errors::kInvalidMinimumChromeVersion), 65 errors::kInvalidMinimumChromeVersion),
66 Testcase("init_invalid_chrome_version_too_low.json", 66 Testcase("init_invalid_chrome_version_too_low.json",
67 errors::kChromeVersionTooLow), 67 errors::kChromeVersionTooLow),
68 Testcase("init_invalid_requirements_1.json", errors::kInvalidRequirements),
69 Testcase("init_invalid_requirements_2.json", errors::kInvalidRequirement)
70 }; 68 };
71 69
72 RunTestcases(testcases, arraysize(testcases), 70 RunTestcases(testcases, arraysize(testcases),
73 EXPECT_TYPE_ERROR); 71 EXPECT_TYPE_ERROR);
74 } 72 }
75 73
76 TEST_F(ExtensionManifestTest, InitFromValueValid) { 74 TEST_F(ExtensionManifestTest, InitFromValueValid) {
77 scoped_refptr<extensions::Extension> extension(LoadAndExpectSuccess( 75 scoped_refptr<extensions::Extension> extension(LoadAndExpectSuccess(
78 "init_valid_minimal.json")); 76 "init_valid_minimal.json"));
79 77
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 base::i18n::AdjustStringForLocaleDirection(&localized_name); 146 base::i18n::AdjustStringForLocaleDirection(&localized_name);
149 EXPECT_EQ(localized_name, UTF8ToUTF16(extension->name())); 147 EXPECT_EQ(localized_name, UTF8ToUTF16(extension->name()));
150 148
151 // Reset locale. 149 // Reset locale.
152 #if defined(TOOLKIT_GTK) 150 #if defined(TOOLKIT_GTK)
153 gtk_widget_set_default_direction(gtk_dir); 151 gtk_widget_set_default_direction(gtk_dir);
154 #else 152 #else
155 base::i18n::SetICUDefaultLocale(locale); 153 base::i18n::SetICUDefaultLocale(locale);
156 #endif 154 #endif
157 } 155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698