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

Unified Diff: chrome/common/extensions/extension_manifests_unittest.cc

Issue 7645033: Add offline_enabled field in manifest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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/extension_manifests_unittest.cc
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index 2fd647c0ecb57b24ff1f9f71736893d7b3aed67c..3d7ed442e37b205ffb8d3ed33955a1c77a871fdf 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -600,7 +600,7 @@ TEST_F(ExtensionManifestTest, DisallowHybridApps) {
TEST_F(ExtensionManifestTest, OptionsPageInApps) {
scoped_refptr<Extension> extension;
- // Allow options page with absolute URL in hosed apps.
+ // Allow options page with absolute URL in hosted apps.
extension = LoadAndExpectSuccess("hosted_app_absolute_options.json");
EXPECT_STREQ("http",
extension->options_url().scheme().c_str());
@@ -826,3 +826,23 @@ TEST_F(ExtensionManifestTest, FileManagerURLOverride) {
LoadAndExpectError("filebrowser_url_override.json",
errors::kInvalidChromeURLOverrides);
}
+
+TEST_F(ExtensionManifestTest, OfflineEnabled) {
+ LoadAndExpectError("offline_enabled_invalid.json",
+ errors::kInvalidOfflineEnabled);
+ scoped_refptr<Extension> extension_0(
+ LoadAndExpectSuccess("offline_enabled_extension.json"));
+ EXPECT_TRUE(extension_0->offline_enabled());
+ scoped_refptr<Extension> extension_1(
+ LoadAndExpectSuccess("offline_enabled_packaged_app.json"));
+ EXPECT_TRUE(extension_1->offline_enabled());
+ scoped_refptr<Extension> extension_2(
+ LoadAndExpectSuccess("offline_disabled_packaged_app.json"));
+ EXPECT_FALSE(extension_2->offline_enabled());
+ scoped_refptr<Extension> extension_3(
+ LoadAndExpectSuccess("offline_default_packaged_app.json"));
+ EXPECT_FALSE(extension_3->offline_enabled());
+ scoped_refptr<Extension> extension_4(
+ LoadAndExpectSuccess("offline_enabled_hosted_app.json"));
+ EXPECT_TRUE(extension_4->offline_enabled());
+}

Powered by Google App Engine
This is Rietveld 408576698