diff options
author | James Cook <jamescook@chromium.org> | 2014-09-16 16:11:10 -0700 |
---|---|---|
committer | James Cook <jamescook@chromium.org> | 2014-09-16 23:11:46 +0000 |
commit | 2bc038699947d1b05b15d35c5c5b3d4eac934f5d (patch) | |
tree | 0581666f67d88e9535f65abe348f63d0989d8b10 /extensions/common/test_util.h | |
parent | 23fdae2acd89612f5198651e51c5aa7557667a2b (diff) | |
download | chromium_src-2bc038699947d1b05b15d35c5c5b3d4eac934f5d.zip chromium_src-2bc038699947d1b05b15d35c5c5b3d4eac934f5d.tar.gz chromium_src-2bc038699947d1b05b15d35c5c5b3d4eac934f5d.tar.bz2 |
Revert "Refactor ExtensionManifestTest to allow usage in src/extensions"
This reverts commit bd1cc624f6fd9761409ee8a8ac5cfd3a5896c87a.
Original CL:
Refactor ExtensionManifestTest to allow usage in src/extensions
https://codereview.chromium.org/572813002
Reason:
Broke the official Win builders due to differences in how they report their
version channel.
http://master.chrome.corp.google.com:8011/builders/win%20trunk/builds/26150
BUG=414917
TEST=unit_tests
TBR=rockot@chromium.org
Review URL: https://codereview.chromium.org/578653005
Cr-Commit-Position: refs/heads/master@{#295172}
Diffstat (limited to 'extensions/common/test_util.h')
-rw-r--r-- | extensions/common/test_util.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/extensions/common/test_util.h b/extensions/common/test_util.h index 862c469..46ac5d08 100644 --- a/extensions/common/test_util.h +++ b/extensions/common/test_util.h @@ -8,6 +8,11 @@ #include <string> #include "base/memory/ref_counted.h" +#include "base/memory/scoped_ptr.h" + +namespace base { +class DictionaryValue; +} // namespace base namespace extensions { class Extension; @@ -25,6 +30,12 @@ scoped_refptr<Extension> CreateEmptyExtension(); // Return a very simple extension with a given |id|. scoped_refptr<Extension> CreateExtensionWithID(const std::string& id); +// Parses |json| allowing trailing commas and replacing single quotes with +// double quotes for test readability. If the json fails to parse, calls gtest's +// ADD_FAILURE and returns an empty dictionary. +scoped_ptr<base::DictionaryValue> ParseJsonDictionaryWithSingleQuotes( + std::string json); + } // namespace test_util } // namespace extensions |