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 "chrome/browser/extensions/api/permissions/permissions_api.h" | 5 #include "chrome/browser/extensions/api/permissions/permissions_api.h" |
6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
7 #include "chrome/browser/extensions/extension_prefs.h" | 7 #include "chrome/browser/extensions/extension_prefs.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/common/chrome_switches.h" | |
12 #include "chrome/common/extensions/permissions/permission_set.h" | 11 #include "chrome/common/extensions/permissions/permission_set.h" |
| 12 #include "extensions/common/switches.h" |
13 #include "net/dns/mock_host_resolver.h" | 13 #include "net/dns/mock_host_resolver.h" |
14 | 14 |
15 namespace extensions { | 15 namespace extensions { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 static void AddPattern(URLPatternSet* extent, const std::string& pattern) { | 19 static void AddPattern(URLPatternSet* extent, const std::string& pattern) { |
20 int schemes = URLPattern::SCHEME_ALL; | 20 int schemes = URLPattern::SCHEME_ALL; |
21 extent->AddPattern(URLPattern(schemes, pattern)); | 21 extent->AddPattern(URLPattern(schemes, pattern)); |
22 } | 22 } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 // Test requesting, querying, and removing host permissions for host | 146 // Test requesting, querying, and removing host permissions for host |
147 // permissions that are a subset of the optional permissions. | 147 // permissions that are a subset of the optional permissions. |
148 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, HostSubsets) { | 148 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, HostSubsets) { |
149 PermissionsRequestFunction::SetAutoConfirmForTests(true); | 149 PermissionsRequestFunction::SetAutoConfirmForTests(true); |
150 PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); | 150 PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); |
151 EXPECT_TRUE(RunExtensionTest("permissions/host_subsets")) << message_; | 151 EXPECT_TRUE(RunExtensionTest("permissions/host_subsets")) << message_; |
152 } | 152 } |
153 | 153 |
154 } // namespace extensions | 154 } // namespace extensions |
OLD | NEW |