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

Unified Diff: chrome/common/extensions/manifest_tests/extension_manifest_test.h

Issue 178253007: Parse manifest file with app.service_worker.script. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: destructor added 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
Index: chrome/common/extensions/manifest_tests/extension_manifest_test.h
diff --git a/chrome/common/extensions/manifest_tests/extension_manifest_test.h b/chrome/common/extensions/manifest_tests/extension_manifest_test.h
index d7169437cb4fb525a8747fef933662ee83ea04d7..bb0af6a1589963926ab9bdda93dca3af377931a4 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifest_test.h
+++ b/chrome/common/extensions/manifest_tests/extension_manifest_test.h
@@ -42,12 +42,25 @@ class ExtensionManifestTest : public testing::Test {
base::DictionaryValue* GetManifest(char const* test_data_dir,
std::string* error) const;
- private:
+ protected:
const std::string name_;
mutable base::DictionaryValue* manifest_;
mutable scoped_ptr<base::DictionaryValue> manifest_holder_;
};
+ // Helper class creating a Manifest object from a string. For readability
+ // single quotes are replaced with double quotes.
+ // E.g. ManifestFromString("{ 'name': 'a' }") parses JSON { "name": "a" }.
+ class ManifestFromString : public Manifest {
Jeffrey Yasskin 2014/02/28 01:54:37 It'd be nice to make this Just Work for Manifest,
scheib 2014/02/28 04:16:07 Constructor overloaded would be nice - but I don't
+ public:
+ explicit ManifestFromString(
+ const char* manifest_as_string_with_single_quotes);
+ ~ManifestFromString();
+
+ protected:
+ scoped_ptr<base::Value> parsed_manifest_holder_;
+ };
+
// The subdirectory in which to find test data files.
virtual char const* test_data_dir();

Powered by Google App Engine
This is Rietveld 408576698