Chromium Code Reviews| 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_management_test_util.h" | 7 #include "chrome/browser/extensions/extension_management_test_util.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "components/policy/core/browser/browser_policy_connector.h" | 10 #include "components/policy/core/browser/browser_policy_connector.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 188 } | 188 } |
| 189 | 189 |
| 190 // Test requesting, querying, and removing host permissions for host | 190 // Test requesting, querying, and removing host permissions for host |
| 191 // permissions that are a subset of the optional permissions. | 191 // permissions that are a subset of the optional permissions. |
| 192 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, HostSubsets) { | 192 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, HostSubsets) { |
| 193 PermissionsRequestFunction::SetAutoConfirmForTests(true); | 193 PermissionsRequestFunction::SetAutoConfirmForTests(true); |
| 194 PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); | 194 PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); |
| 195 EXPECT_TRUE(RunExtensionTest("permissions/host_subsets")) << message_; | 195 EXPECT_TRUE(RunExtensionTest("permissions/host_subsets")) << message_; |
| 196 } | 196 } |
| 197 | 197 |
| 198 // Tests that requesting an optional permission from a background page, with | |
| 199 // another window open, grants the permission and updates the bindings | |
| 200 // (chrome.whatever, in this case chrome.storage). Regression test for | |
|
Devlin
2015/06/03 20:53:36
The test seems to use chrome.alarms?
not at google - send to devlin
2015/06/03 21:53:03
Done.
| |
| 201 // crbug.com/435141, see details there for trickyness. | |
|
Devlin
2015/06/03 20:53:37
s/trickyness/trickiness
not at google - send to devlin
2015/06/03 21:53:03
Done.
| |
| 202 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OptionalPermissionsUpdatesBindings) { | |
| 203 ASSERT_TRUE(RunExtensionTest("permissions/optional_updates_bindings")) | |
|
Devlin
2015/06/03 20:53:37
I trust this test failed without this patch?
not at google - send to devlin
2015/06/03 21:53:03
...
Devlin
2015/06/03 21:56:44
Yeah, okay, that was silly. I trust this test fai
not at google - send to devlin
2015/06/03 22:05:36
I'm not really sure how to test that without more
Devlin
2015/06/03 22:17:49
You say that like it's hard. :P
git checkout origi
| |
| 204 << message_; | |
| 205 } | |
| 206 | |
| 198 } // namespace extensions | 207 } // namespace extensions |
| OLD | NEW |