OLD | NEW |
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/message_loop.h" | 5 #include "base/message_loop/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/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
12 #include "content/public/test/test_browser_thread.h" | 12 #include "content/public/test/test_browser_thread.h" |
13 #include "extensions/common/extension.h" | 13 #include "extensions/common/extension.h" |
| 14 #include "extensions/common/extension_set.h" |
14 #include "extensions/common/manifest.h" | 15 #include "extensions/common/manifest.h" |
15 #include "extensions/common/manifest_constants.h" | 16 #include "extensions/common/manifest_constants.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 | 18 |
18 using content::BrowserThread; | 19 using content::BrowserThread; |
19 using extensions::Extension; | 20 using extensions::Extension; |
| 21 using extensions::ExtensionSet; |
20 using extensions::Manifest; | 22 using extensions::Manifest; |
21 using quota::SpecialStoragePolicy; | 23 using quota::SpecialStoragePolicy; |
22 | 24 |
23 typedef SpecialStoragePolicy::StoragePolicy StoragePolicy; | 25 typedef SpecialStoragePolicy::StoragePolicy StoragePolicy; |
24 | 26 |
25 namespace keys = extensions::manifest_keys; | 27 namespace keys = extensions::manifest_keys; |
26 | 28 |
27 class ExtensionSpecialStoragePolicyTest : public testing::Test { | 29 class ExtensionSpecialStoragePolicyTest : public testing::Test { |
28 protected: | 30 protected: |
29 class PolicyChangeObserver : public SpecialStoragePolicy::Observer { | 31 class PolicyChangeObserver : public SpecialStoragePolicy::Observer { |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 EXPECT_TRUE(observer.IsCompleted()); | 398 EXPECT_TRUE(observer.IsCompleted()); |
397 } | 399 } |
398 | 400 |
399 observer.ExpectClear(); | 401 observer.ExpectClear(); |
400 policy_->RevokeRightsForAllExtensions(); | 402 policy_->RevokeRightsForAllExtensions(); |
401 message_loop.RunUntilIdle(); | 403 message_loop.RunUntilIdle(); |
402 EXPECT_TRUE(observer.IsCompleted()); | 404 EXPECT_TRUE(observer.IsCompleted()); |
403 | 405 |
404 policy_->RemoveObserver(&observer); | 406 policy_->RemoveObserver(&observer); |
405 } | 407 } |
OLD | NEW |