Index: chrome/common/extensions/extension_manifests_unittest.cc |
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc |
index 63172a90f2119e4788d3641c9ed6855db8887c23..91951ea0ca9673ef84d7a7f621dd01c336e2ec69 100644 |
--- a/chrome/common/extensions/extension_manifests_unittest.cc |
+++ b/chrome/common/extensions/extension_manifests_unittest.cc |
@@ -547,3 +547,18 @@ TEST_F(ExtensionManifestTest, ForbidPortsInPermissions) { |
// to flag this case. |
LoadStrictAndExpectSuccess("forbid_ports_in_permissions.json"); |
} |
+ |
+TEST_F(ExtensionManifestTest, IsolatedApps) { |
+ // Requires --enable-experimental-app-manifests |
+ scoped_refptr<Extension> extension( |
+ LoadAndExpectSuccess("isolated_app_valid.json")); |
+ EXPECT_FALSE(extension->is_storage_isolated()); |
+ |
+ CommandLine old_command_line = *CommandLine::ForCurrentProcess(); |
+ CommandLine::ForCurrentProcess()->AppendSwitch( |
+ switches::kEnableExperimentalAppManifests); |
+ scoped_refptr<Extension> extension2( |
+ LoadAndExpectSuccess("isolated_app_valid.json")); |
+ EXPECT_TRUE(extension2->is_storage_isolated()); |
+ *CommandLine::ForCurrentProcess() = old_command_line; |
+} |