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

Side by Side Diff: chrome/browser/extensions/extension_special_storage_policy_unittest.cc

Issue 12091115: Allow manifest handlers to declare keys they depend on that must be parsed before them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dcronin Created 7 years, 10 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/values.h" 6 #include "base/values.h"
7 #include "chrome/browser/content_settings/cookie_settings.h" 7 #include "chrome/browser/content_settings/cookie_settings.h"
8 #include "chrome/browser/extensions/extension_special_storage_policy.h" 8 #include "chrome/browser/extensions/extension_special_storage_policy.h"
9 #include "chrome/common/content_settings.h" 9 #include "chrome/common/content_settings.h"
10 #include "chrome/common/content_settings_types.h" 10 #include "chrome/common/content_settings_types.h"
(...skipping 10 matching lines...) Expand all
21 using extensions::Extension; 21 using extensions::Extension;
22 using extensions::Manifest; 22 using extensions::Manifest;
23 23
24 namespace keys = extension_manifest_keys; 24 namespace keys = extension_manifest_keys;
25 25
26 class ExtensionSpecialStoragePolicyTest : public testing::Test { 26 class ExtensionSpecialStoragePolicyTest : public testing::Test {
27 public: 27 public:
28 virtual void SetUp() { 28 virtual void SetUp() {
29 policy_ = new ExtensionSpecialStoragePolicy(NULL); 29 policy_ = new ExtensionSpecialStoragePolicy(NULL);
30 #if defined(ENABLE_WEB_INTENTS) 30 #if defined(ENABLE_WEB_INTENTS)
31 extensions::ManifestHandler::Register(keys::kIntents, 31 extensions::ManifestHandler::Register(
32 new extensions::WebIntentsHandler); 32 keys::kIntents,
33 make_linked_ptr(new extensions::WebIntentsHandler));
33 #endif 34 #endif
34 } 35 }
35 36
36 protected: 37 protected:
37 scoped_refptr<Extension> CreateProtectedApp() { 38 scoped_refptr<Extension> CreateProtectedApp() {
38 #if defined(OS_WIN) 39 #if defined(OS_WIN)
39 FilePath path(FILE_PATH_LITERAL("c:\\foo")); 40 FilePath path(FILE_PATH_LITERAL("c:\\foo"));
40 #elif defined(OS_POSIX) 41 #elif defined(OS_POSIX)
41 FilePath path(FILE_PATH_LITERAL("/foo")); 42 FilePath path(FILE_PATH_LITERAL("/foo"));
42 #endif 43 #endif
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 CONTENT_SETTING_SESSION_ONLY); 330 CONTENT_SETTING_SESSION_ONLY);
330 331
331 EXPECT_TRUE(policy_->HasSessionOnlyOrigins()); 332 EXPECT_TRUE(policy_->HasSessionOnlyOrigins());
332 333
333 // Clearing an origin-specific rule. 334 // Clearing an origin-specific rule.
334 cookie_settings->ResetCookieSetting(pattern, 335 cookie_settings->ResetCookieSetting(pattern,
335 ContentSettingsPattern::Wildcard()); 336 ContentSettingsPattern::Wildcard());
336 337
337 EXPECT_FALSE(policy_->HasSessionOnlyOrigins()); 338 EXPECT_FALSE(policy_->HasSessionOnlyOrigins());
338 } 339 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/manifest_url_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698