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

Unified Diff: chrome/common/extensions/manifest_tests/extension_manifests_storage_unittest.cc

Issue 10544059: Change the platform app manifest structure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update for getDisplayPath, implement restrictions via _manifest_features.json Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/manifest_tests/extension_manifests_storage_unittest.cc
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_storage_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_storage_unittest.cc
index e020bf05053dd19da2f2be9c4789a5a12823394c..ad2ab7f4d565b94afdb7de38f3a74697f748932e 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_storage_unittest.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_storage_unittest.cc
@@ -25,13 +25,7 @@ TEST_F(ExtensionManifestTest, StorageAPIManifestVersionAvailability) {
// Extension with no manifest version cannot use storage API.
{
Manifest manifest(&base_manifest, "test");
- scoped_refptr<extensions::Extension> extension =
- LoadAndExpectSuccess(manifest);
- if (extension.get()) {
- std::vector<std::string> warnings;
- warnings.push_back(kManifestVersionError);
- EXPECT_EQ(warnings, extension->install_warnings());
- }
+ LoadAndExpectWarning(manifest, kManifestVersionError);
}
// Extension with manifest version 1 cannot use storage API.
@@ -41,13 +35,7 @@ TEST_F(ExtensionManifestTest, StorageAPIManifestVersionAvailability) {
manifest_with_version.MergeDictionary(&base_manifest);
Manifest manifest(&manifest_with_version, "test");
- scoped_refptr<extensions::Extension> extension =
- LoadAndExpectSuccess(manifest);
- if (extension.get()) {
- std::vector<std::string> warnings;
- warnings.push_back(kManifestVersionError);
- EXPECT_EQ(warnings, extension->install_warnings());
- }
+ LoadAndExpectWarning(manifest, kManifestVersionError);
}
// Extension with manifest version 2 *can* use storage API.
@@ -59,9 +47,6 @@ TEST_F(ExtensionManifestTest, StorageAPIManifestVersionAvailability) {
Manifest manifest(&manifest_with_version, "test");
scoped_refptr<extensions::Extension> extension =
LoadAndExpectSuccess(manifest);
- if (extension.get()) {
- std::vector<std::string> empty;
- EXPECT_EQ(empty, extension->install_warnings());
- }
+ EXPECT_TRUE(extension->install_warnings().empty());
}
}

Powered by Google App Engine
This is Rietveld 408576698