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

Side by Side Diff: chrome/browser/extensions/api/permissions/permissions_apitest.cc

Issue 12209094: Support requesting subsets of host permissions using the permissions API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: are you happy yet?!?!? Created 7 years, 10 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 | Annotate | Revision Log
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 "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"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // TODO(kalman): ugh, it would be nice to test this condition, but it seems 148 // TODO(kalman): ugh, it would be nice to test this condition, but it seems
149 // like there's somehow a race here where the prefs aren't updated in time 149 // like there's somehow a race here where the prefs aren't updated in time
150 // with the "allow file access" bit, so we'll just have to trust that 150 // with the "allow file access" bit, so we'll just have to trust that
151 // RunExtensionTest (unlike RunExtensionTestNoFileAccess) does indeed 151 // RunExtensionTest (unlike RunExtensionTestNoFileAccess) does indeed
152 // not set the allow file access bit. Otherwise this test doesn't mean 152 // not set the allow file access bit. Otherwise this test doesn't mean
153 // a whole lot (i.e. file access works - but it'd better not be the case 153 // a whole lot (i.e. file access works - but it'd better not be the case
154 // that the extension actually has file access, since that'd be the bug 154 // that the extension actually has file access, since that'd be the bug
155 // that this is supposed to be testing). 155 // that this is supposed to be testing).
156 //EXPECT_TRUE(prefs->AllowFileAccess("hlonmbgfjccgolnaboonlakjckinmhmd")); 156 //EXPECT_TRUE(prefs->AllowFileAccess("hlonmbgfjccgolnaboonlakjckinmhmd"));
157 } 157 }
158
159 // Test requesting, querying, and removing host permissions for host
160 // permissions that are a subset of the optional permissions.
161 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, HostSubsets) {
162 PermissionsRequestFunction::SetAutoConfirmForTests(true);
163 PermissionsRequestFunction::SetIgnoreUserGestureForTests(true);
164 EXPECT_TRUE(RunExtensionTest("permissions/host_subsets")) << message_;
165 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/permissions/permissions_api.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698