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

Unified Diff: chrome/browser/extensions/extension_function_test_utils.h

Issue 10919201: Make sure that a given app/extension requests only its own resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improve tests; fix merge conflicts. Created 8 years, 3 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
Index: chrome/browser/extensions/extension_function_test_utils.h
diff --git a/chrome/browser/extensions/extension_function_test_utils.h b/chrome/browser/extensions/extension_function_test_utils.h
index cea6e78a982f86cb1eff0fa8bd246d18e5d91778..e42c1d52835a1daa1f80262782ae8deccc79b556 100644
--- a/chrome/browser/extensions/extension_function_test_utils.h
+++ b/chrome/browser/extensions/extension_function_test_utils.h
@@ -54,6 +54,20 @@ scoped_refptr<extensions::Extension> CreateEmptyExtension();
scoped_refptr<extensions::Extension> CreateEmptyExtensionWithLocation(
extensions::Extension::Location location);
+// Creates an empty extension with a variable ID, for tests that require
+// multiple extensions side-by-side having distinct IDs. If not empty, then
+// id_input is passed directly to Extension::CreateId() and thus has the same
+// behavior as that method. If id_input is empty, then Extension::Create()
+// receives an empty explicit ID and generates an appropriate ID for a blank
+// extension.
+scoped_refptr<extensions::Extension> CreateEmptyExtension(
+ const std::string& id_input);
+
+scoped_refptr<extensions::Extension> CreateExtension(
+ extensions::Extension::Location location,
+ base::DictionaryValue* test_extension_value,
+ const std::string& id_input);
+
// Creates an extension instance with a specified extension value that can be
// attached to an ExtensionFunction before running.
scoped_refptr<extensions::Extension> CreateExtension(
« no previous file with comments | « chrome/browser/extensions/api/usb/usb_device_resource.cc ('k') | chrome/browser/extensions/extension_function_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698