diff options
author | jstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-27 18:42:31 +0000 |
---|---|---|
committer | jstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-27 18:42:31 +0000 |
commit | 902fd7bbba5683135ec25fe83479b13ab532891a (patch) | |
tree | a6f2a4eb6b7a4349bc6fbaae0e419c715046a069 /chrome/common/extensions/extension_unittest.cc | |
parent | 3a91c5b51bc1890ecf3a558dbd51e3da68c418ca (diff) | |
download | chromium_src-902fd7bbba5683135ec25fe83479b13ab532891a.zip chromium_src-902fd7bbba5683135ec25fe83479b13ab532891a.tar.gz chromium_src-902fd7bbba5683135ec25fe83479b13ab532891a.tar.bz2 |
Re-land the experimental permissions API for extensions.
The permissions API lets extensions specify optional permissions in their manifest that they can request at run-time. It currently supports API permissions through a white-list. Host permissions will come later. This also fixes some clang errors from the previous attempt.
BUG=48119, 70466, 84507
TEST=*Extension*
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=94288
Review URL: http://codereview.chromium.org/7432006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94326 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension_unittest.cc')
-rw-r--r-- | chrome/common/extensions/extension_unittest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc index 79cad1a..5115573 100644 --- a/chrome/common/extensions/extension_unittest.cc +++ b/chrome/common/extensions/extension_unittest.cc @@ -389,10 +389,10 @@ TEST(ExtensionTest, EffectiveHostPermissions) { hosts = extension->GetEffectiveHostPermissions(); EXPECT_TRUE(hosts.MatchesURL(GURL("http://google.com"))); EXPECT_TRUE(hosts.MatchesURL(GURL("http://www.reddit.com"))); - EXPECT_TRUE(extension->permission_set()->HasEffectiveAccessToURL( + EXPECT_TRUE(extension->GetActivePermissions()->HasEffectiveAccessToURL( GURL("http://www.reddit.com"))); EXPECT_TRUE(hosts.MatchesURL(GURL("http://news.ycombinator.com"))); - EXPECT_TRUE(extension->permission_set()->HasEffectiveAccessToURL( + EXPECT_TRUE(extension->GetActivePermissions()->HasEffectiveAccessToURL( GURL("http://news.ycombinator.com"))); EXPECT_FALSE(extension->HasEffectiveAccessToAllHosts()); |