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 |