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

Unified Diff: chrome/common/extensions/extension_set_unittest.cc

Issue 8659009: Consider the origin when computing extension permissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/extension_set_unittest.cc
===================================================================
--- chrome/common/extensions/extension_set_unittest.cc (revision 112170)
+++ chrome/common/extensions/extension_set_unittest.cc (working copy)
@@ -79,20 +79,20 @@
EXPECT_EQ(3u, extensions.size());
// Get extension by its chrome-extension:// URL
- EXPECT_EQ(ext2, extensions.GetByURL(
- ext2->GetResourceURL("test.html")));
- EXPECT_EQ(ext3, extensions.GetByURL(
- ext3->GetResourceURL("test.html")));
- EXPECT_EQ(ext4, extensions.GetByURL(
- ext4->GetResourceURL("test.html")));
+ EXPECT_EQ(ext2, extensions.GetByInfo(
+ ExtensionURLInfo(ext2->GetResourceURL("test.html"))));
+ EXPECT_EQ(ext3, extensions.GetByInfo(
+ ExtensionURLInfo(ext3->GetResourceURL("test.html"))));
+ EXPECT_EQ(ext4, extensions.GetByInfo(
+ ExtensionURLInfo(ext4->GetResourceURL("test.html"))));
// Get extension by web extent.
- EXPECT_EQ(ext2, extensions.GetByURL(
- GURL("http://code.google.com/p/chromium/monkey")));
- EXPECT_EQ(ext3, extensions.GetByURL(
- GURL("http://dev.chromium.org/design-docs/")));
- EXPECT_FALSE(extensions.GetByURL(
- GURL("http://blog.chromium.org/")));
+ EXPECT_EQ(ext2, extensions.GetByInfo(
+ ExtensionURLInfo(GURL("http://code.google.com/p/chromium/monkey"))));
+ EXPECT_EQ(ext3, extensions.GetByInfo(
+ ExtensionURLInfo(GURL("http://dev.chromium.org/design-docs/"))));
+ EXPECT_FALSE(extensions.GetByInfo(
+ ExtensionURLInfo(GURL("http://blog.chromium.org/"))));
// Test InSameExtent().
EXPECT_TRUE(extensions.InSameExtent(

Powered by Google App Engine
This is Rietveld 408576698