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

Side by Side Diff: chrome/common/extensions/manifest_unittest.cc

Issue 447783003: Remove service worker concepts from apps/extensions manifest parsing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 "extensions/common/manifest.h" 5 #include "extensions/common/manifest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 &manifest, keys::kApp, new base::DictionaryValue()); 152 &manifest, keys::kApp, new base::DictionaryValue());
153 AssertType(manifest.get(), Manifest::TYPE_LEGACY_PACKAGED_APP); 153 AssertType(manifest.get(), Manifest::TYPE_LEGACY_PACKAGED_APP);
154 154
155 // Platform app with event page. 155 // Platform app with event page.
156 MutateManifest( 156 MutateManifest(
157 &manifest, keys::kPlatformAppBackground, new base::DictionaryValue()); 157 &manifest, keys::kPlatformAppBackground, new base::DictionaryValue());
158 AssertType(manifest.get(), Manifest::TYPE_PLATFORM_APP); 158 AssertType(manifest.get(), Manifest::TYPE_PLATFORM_APP);
159 MutateManifest( 159 MutateManifest(
160 &manifest, keys::kPlatformAppBackground, NULL); 160 &manifest, keys::kPlatformAppBackground, NULL);
161 161
162 // Platform app with service worker.
163 MutateManifest(
164 &manifest, keys::kPlatformAppServiceWorker, new base::DictionaryValue());
165 AssertType(manifest.get(), Manifest::TYPE_PLATFORM_APP);
166 MutateManifest(&manifest, keys::kPlatformAppServiceWorker, NULL);
167
168 // Hosted app. 162 // Hosted app.
169 MutateManifest( 163 MutateManifest(
170 &manifest, keys::kWebURLs, new base::ListValue()); 164 &manifest, keys::kWebURLs, new base::ListValue());
171 AssertType(manifest.get(), Manifest::TYPE_HOSTED_APP); 165 AssertType(manifest.get(), Manifest::TYPE_HOSTED_APP);
172 MutateManifest( 166 MutateManifest(
173 &manifest, keys::kWebURLs, NULL); 167 &manifest, keys::kWebURLs, NULL);
174 MutateManifest( 168 MutateManifest(
175 &manifest, keys::kLaunchWebURL, new base::StringValue("foo")); 169 &manifest, keys::kLaunchWebURL, new base::StringValue("foo"));
176 AssertType(manifest.get(), Manifest::TYPE_HOSTED_APP); 170 AssertType(manifest.get(), Manifest::TYPE_HOSTED_APP);
177 MutateManifest( 171 MutateManifest(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 EXPECT_FALSE(manifest->Get(keys::kPageAction, &output)); 212 EXPECT_FALSE(manifest->Get(keys::kPageAction, &output));
219 MutateManifest( 213 MutateManifest(
220 &manifest, keys::kPlatformAppBackground, NULL); 214 &manifest, keys::kPlatformAppBackground, NULL);
221 215
222 // Platform apps also can't have a "Commands" key. 216 // Platform apps also can't have a "Commands" key.
223 EXPECT_FALSE(manifest->HasKey(keys::kCommands)); 217 EXPECT_FALSE(manifest->HasKey(keys::kCommands));
224 EXPECT_FALSE(manifest->Get(keys::kCommands, &output)); 218 EXPECT_FALSE(manifest->Get(keys::kCommands, &output));
225 }; 219 };
226 220
227 } // namespace extensions 221 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/manifest_tests/extension_manifests_service_worker_unittest.cc ('k') | extensions/common/manifest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698