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

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

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 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
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"
11 #include "chrome/common/extensions/extension.h" 11 #include "chrome/common/extensions/extension.h"
12 #include "chrome/common/extensions/extension_manifest_constants.h" 12 #include "chrome/common/extensions/extension_manifest_constants.h"
13 #include "chrome/test/base/testing_profile.h" 13 #include "chrome/test/base/testing_profile.h"
14 #include "content/test/test_browser_thread.h" 14 #include "content/test/test_browser_thread.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 using content::BrowserThread; 17 using content::BrowserThread;
18 using extensions::Extension;
18 19
19 namespace keys = extension_manifest_keys; 20 namespace keys = extension_manifest_keys;
20 21
21 class ExtensionSpecialStoragePolicyTest : public testing::Test { 22 class ExtensionSpecialStoragePolicyTest : public testing::Test {
22 protected: 23 protected:
23 scoped_refptr<Extension> CreateProtectedApp() { 24 scoped_refptr<Extension> CreateProtectedApp() {
24 #if defined(OS_WIN) 25 #if defined(OS_WIN)
25 FilePath path(FILE_PATH_LITERAL("c:\\foo")); 26 FilePath path(FILE_PATH_LITERAL("c:\\foo"));
26 #elif defined(OS_POSIX) 27 #elif defined(OS_POSIX)
27 FilePath path(FILE_PATH_LITERAL("/foo")); 28 FilePath path(FILE_PATH_LITERAL("/foo"));
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 CONTENT_SETTING_SESSION_ONLY); 248 CONTENT_SETTING_SESSION_ONLY);
248 249
249 EXPECT_TRUE(policy->HasSessionOnlyOrigins()); 250 EXPECT_TRUE(policy->HasSessionOnlyOrigins());
250 251
251 // Clearing an origin-specific rule. 252 // Clearing an origin-specific rule.
252 cookie_settings->ResetCookieSetting(pattern, 253 cookie_settings->ResetCookieSetting(pattern,
253 ContentSettingsPattern::Wildcard()); 254 ContentSettingsPattern::Wildcard());
254 255
255 EXPECT_FALSE(policy->HasSessionOnlyOrigins()); 256 EXPECT_FALSE(policy->HasSessionOnlyOrigins());
256 } 257 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698