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

Unified Diff: extensions/common/test_util.h

Issue 178253007: Parse manifest file with app.service_worker.script. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved test utils out of base Created 6 years, 10 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_handlers/background_info.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 e38b28fda43a02a5fe777e04a70c4233a885ab93..54d985be472cbb7c42e3a26b17b726045d92357c 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;
@@ -21,6 +26,12 @@ ExtensionBuilder& BuildExtension(ExtensionBuilder& builder);
// 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_handlers/background_info.cc ('k') | extensions/common/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698