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

Unified Diff: extensions/common/test_util.h

Issue 578653005: Revert "Refactor ExtensionManifestTest to allow usage in src/extensions" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « extensions/common/manifest_test.cc ('k') | extensions/common/test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/test_util.h
diff --git a/extensions/common/test_util.h b/extensions/common/test_util.h
index 862c469c1c6ef3dae361e60ea1815d4aa669d5cb..46ac5d08c3f266ee773e84ed878a611a3b16dd74 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
« no previous file with comments | « extensions/common/manifest_test.cc ('k') | extensions/common/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698