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

Unified Diff: chrome/common/extensions/extension_test_util.h

Issue 14358004: Almost all actions in Declarative Web Request require all_urls host permissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: All URLs -> all hosts; also rebased Created 7 years, 8 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/common/extensions/extension_test_util.h
diff --git a/chrome/common/extensions/extension_test_util.h b/chrome/common/extensions/extension_test_util.h
index a549d98762017113075d5d0cb2f1077073a517bb..278f514bee71e59f79d35b4e8f44f82af399f7aa 100644
--- a/chrome/common/extensions/extension_test_util.h
+++ b/chrome/common/extensions/extension_test_util.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/memory/ref_counted.h"
+#include "chrome/common/extensions/manifest.h"
namespace extensions {
class Extension;
@@ -21,6 +22,40 @@ std::string MakeId(std::string seed);
// Return a very simple extension with id |id|.
scoped_refptr<extensions::Extension> CreateExtensionWithID(std::string id);
+// Helpers for loading manifests, |dir| is relative to chrome::DIR_TEST_DATA
+// followed by "extensions".
+scoped_refptr<extensions::Extension> LoadManifestUnchecked(
+ const std::string& dir,
+ const std::string& test_file,
+ extensions::Manifest::Location location,
+ int extra_flags,
+ const std::string& id,
+ std::string* error);
+
+scoped_refptr<extensions::Extension> LoadManifestUnchecked(
+ const std::string& dir,
+ const std::string& test_file,
+ extensions::Manifest::Location location,
+ int extra_flags,
+ std::string* error);
+
+scoped_refptr<extensions::Extension> LoadManifest(
+ const std::string& dir,
+ const std::string& test_file,
+ extensions::Manifest::Location location,
+ int extra_flags);
+
+scoped_refptr<extensions::Extension> LoadManifest(const std::string& dir,
+ const std::string& test_file,
+ int extra_flags);
+
+scoped_refptr<extensions::Extension> LoadManifestStrict(
+ const std::string& dir,
+ const std::string& test_file);
+
+scoped_refptr<extensions::Extension> LoadManifest(const std::string& dir,
+ const std::string& test_file);
+
} // namespace extension_test_util
#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_TEST_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698