diff options
author | sashab <sashab@chromium.org> | 2014-09-29 01:07:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-29 08:07:58 +0000 |
commit | 84817f9ba08f05f361721ae2ed6567d59894265c (patch) | |
tree | c7c99da63f49eece59b04063926e3a9049bf9565 /extensions/common/test_util.cc | |
parent | ab5e169ebadefcbe3455cbcf5731379e8ef97670 (diff) | |
download | chromium_src-84817f9ba08f05f361721ae2ed6567d59894265c.zip chromium_src-84817f9ba08f05f361721ae2ed6567d59894265c.tar.gz chromium_src-84817f9ba08f05f361721ae2ed6567d59894265c.tar.bz2 |
Added unit tests for ChromePermissionMessageProvider
Added a unittest for ChromePermissionMessageProvider that ensures
permission messages currently coalesce and form as expected. Some of the
tests are purposely for broken functionality, just to ensure this
functionality exists (and will later be fixed). The tests will be
modified once the new model changes this permission behaviour.
BUG=398257
Review URL: https://codereview.chromium.org/594003002
Cr-Commit-Position: refs/heads/master@{#297148}
Diffstat (limited to 'extensions/common/test_util.cc')
-rw-r--r-- | extensions/common/test_util.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/extensions/common/test_util.cc b/extensions/common/test_util.cc index e7efeb0..dafbca2 100644 --- a/extensions/common/test_util.cc +++ b/extensions/common/test_util.cc @@ -19,6 +19,20 @@ ExtensionBuilder& BuildExtension(ExtensionBuilder& builder) { .Set("manifest_version", 2)); } +ExtensionBuilder& BuildApp(ExtensionBuilder& builder) { + return builder.SetManifest( + DictionaryBuilder() + .Set("name", "Test extension") + .Set("version", "1.0") + .Set("manifest_version", 2) + .Set("app", + extensions::DictionaryBuilder().Set( + "background", + extensions::DictionaryBuilder().Set( + "scripts", + extensions::ListBuilder().Append("background.js"))))); +} + scoped_refptr<Extension> CreateEmptyExtension() { return ExtensionBuilder() .SetManifest( |