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

Unified Diff: chrome/browser/extensions/active_tab_unittest.cc

Issue 10863002: Added check to prevent extensions from injecting scrips into other extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added license comments Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/execute_code_in_tab_function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/active_tab_unittest.cc
diff --git a/chrome/browser/extensions/active_tab_unittest.cc b/chrome/browser/extensions/active_tab_unittest.cc
index 1cee2f9c5d1a8e013ed32205dfdc1cc58606fd5f..d757124d38b27851d1e0c0934f79f504062fce77 100644
--- a/chrome/browser/extensions/active_tab_unittest.cc
+++ b/chrome/browser/extensions/active_tab_unittest.cc
@@ -79,7 +79,7 @@ class ActiveTabTest : public TabContentsTestHarness {
bool IsAllowed(const scoped_refptr<const Extension>& extension,
const GURL& url,
int tab_id) {
- return extension->CanExecuteScriptOnPage(url, tab_id, NULL, NULL) &&
+ return extension->CanExecuteScriptOnPage(url, url, tab_id, NULL, NULL) &&
extension->CanCaptureVisiblePage(url, tab_id, NULL) &&
HasTabsPermission(extension, tab_id);
}
@@ -93,7 +93,7 @@ class ActiveTabTest : public TabContentsTestHarness {
const GURL& url,
int tab_id) {
// Note: can't check HasTabsPermission because it isn't URL specific.
- return !extension->CanExecuteScriptOnPage(url, tab_id, NULL, NULL) &&
+ return !extension->CanExecuteScriptOnPage(url, url, tab_id, NULL, NULL) &&
!extension->CanCaptureVisiblePage(url, tab_id, NULL);
}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/execute_code_in_tab_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698