Index: chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc |
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc |
index dd0b9f96de1189eb0dc2c16456c79fd3206c7408..e19ff03456928b63b3b3a731eec8b322f4612937 100644 |
--- a/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc |
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc |
@@ -8,12 +8,26 @@ |
#include "base/json/json_file_value_serializer.h" |
#include "base/memory/linked_ptr.h" |
#include "chrome/common/chrome_switches.h" |
+#include "chrome/common/extensions/background_info.h" |
#include "chrome/common/extensions/extension_manifest_constants.h" |
#include "testing/gtest/include/gtest/gtest.h" |
namespace errors = extension_manifest_errors; |
-TEST_F(ExtensionManifestTest, PlatformApps) { |
+namespace extensions { |
+ |
+class ExtensionManifestPlatformAppTest : public ExtensionManifestTest { |
+ virtual void SetUp() OVERRIDE { |
+ ExtensionManifestTest::SetUp(); |
+ std::vector<std::string> background_keys(BackgroundManifestHandler::keys()); |
+ linked_ptr<BackgroundManifestHandler> background_handler( |
+ new BackgroundManifestHandler); |
+ for (size_t i = 0; i < background_keys.size(); ++i) |
+ ManifestHandler::Register(background_keys[i], background_handler); |
+ } |
+}; |
+ |
+TEST_F(ExtensionManifestPlatformAppTest, PlatformApps) { |
scoped_refptr<extensions::Extension> extension = |
LoadAndExpectSuccess("init_valid_platform_app.json"); |
EXPECT_TRUE(extension->is_storage_isolated()); |
@@ -54,7 +68,7 @@ TEST_F(ExtensionManifestTest, PlatformApps) { |
warning_testcases, arraysize(warning_testcases), EXPECT_TYPE_WARNING); |
} |
-TEST_F(ExtensionManifestTest, PlatformAppContentSecurityPolicy) { |
+TEST_F(ExtensionManifestPlatformAppTest, PlatformAppContentSecurityPolicy) { |
// Normal platform apps can't specify a CSP value. |
Testcase warning_testcases[] = { |
Testcase( |
@@ -89,7 +103,7 @@ TEST_F(ExtensionManifestTest, PlatformAppContentSecurityPolicy) { |
errors::kInsecureContentSecurityPolicy); |
} |
-TEST_F(ExtensionManifestTest, CertainApisRequirePlatformApps) { |
+TEST_F(ExtensionManifestPlatformAppTest, CertainApisRequirePlatformApps) { |
// Put APIs here that should be restricted to platform apps, but that haven't |
// yet graduated from experimental. |
const char* kPlatformAppExperimentalApis[] = { |
@@ -132,3 +146,5 @@ TEST_F(ExtensionManifestTest, CertainApisRequirePlatformApps) { |
LoadAndExpectSuccess(Manifest(manifests[i].get(), "")); |
} |
} |
+ |
+} // namespace extensions |