| 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" | |
| 8 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "extensions/browser/extension_prefs.h" |
| 11 #include "extensions/common/permissions/permission_set.h" | 11 #include "extensions/common/permissions/permission_set.h" |
| 12 #include "extensions/common/switches.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; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 // Test requesting, querying, and removing host permissions for host | 148 // Test requesting, querying, and removing host permissions for host |
| 149 // permissions that are a subset of the optional permissions. | 149 // permissions that are a subset of the optional permissions. |
| 150 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, HostSubsets) { | 150 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, HostSubsets) { |
| 151 PermissionsRequestFunction::SetAutoConfirmForTests(true); | 151 PermissionsRequestFunction::SetAutoConfirmForTests(true); |
| 152 PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); | 152 PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); |
| 153 EXPECT_TRUE(RunExtensionTest("permissions/host_subsets")) << message_; | 153 EXPECT_TRUE(RunExtensionTest("permissions/host_subsets")) << message_; |
| 154 } | 154 } |
| 155 | 155 |
| 156 } // namespace extensions | 156 } // namespace extensions |
| OLD | NEW |