Refactor generateManifest infra tool
- Changed from using bash/perl to using go.
- Now "if" statements in .gjson files can be stacked, and there can be
conditional "or" statements inside, like |#if defined(A || B)|.
- Go tests were added to make sure that the generateManifest tool
continues to work as expected.
- Updated docs to reflect the fact that the manifest is now generated
with a different tool, and Go is now required in the build phase.
Change-Id: Id866d1a49a7ab4aac2dcf8d188c56bb8254a80de
diff --git a/testdata/manifest_frozen_chromium_expected.json b/testdata/manifest_frozen_chromium_expected.json
new file mode 100644
index 0000000..2bd184b
--- /dev/null
+++ b/testdata/manifest_frozen_chromium_expected.json
@@ -0,0 +1,70 @@
+{
+ "manifest_version": 2,
+ "name": "__MSG_appName__",
+ "version": "0",
+ "version_name": "dirty",
+ "description": "__MSG_appDescription__",
+ "icons": {
+ "512": "icons/512.png",
+ "128": "icons/128.png"
+ },
+ "content_scripts": [
+ {
+ "matches": ["https://support.google.com/s/community*"],
+ "js": ["common/content_scripts.js", "content_scripts/console_inject.js"]
+ },
+ {
+ "matches": ["https://support.google.com/s/community*"],
+ "js": ["common/content_scripts.js", "content_scripts/console_inject_start.js"],
+ "css": ["common/console.css"],
+ "run_at": "document_start"
+ },
+ {
+ "matches": ["https://support.google.com/*/threads*"],
+ "js": ["content_scripts/forum_inject.js"]
+ },
+ {
+ "matches": ["https://support.google.com/*/thread/*"],
+ "exclude_matches": ["https://support.google.com/s/community*", "https://support.google.com/*/thread/new*"],
+ "js": ["common/content_scripts.js", "content_scripts/thread_inject.js"],
+ "run_at": "document_end"
+ },
+ {
+ "matches": ["https://support.google.com/s/community*", "https://support.google.com/*/thread/*"],
+ "exclude_matches": ["https://support.google.com/*/thread/new*"],
+ "js": ["common/content_scripts.js", "common/cs_event_listener.js", "content_scripts/profileindicator_inject.js"]
+ },
+ {
+ "matches": ["https://support.google.com/*/profile/*"],
+ "js": ["common/content_scripts.js", "content_scripts/profile_inject.js"],
+ "css": ["common/forum.css"]
+ }
+ ],
+ "permissions": [
+ "https://support.google.com/s/community*",
+ "https://support.google.com/*/threads*",
+ "https://support.google.com/*/thread/*",
+ "storage"
+ ],
+ "web_accessible_resources": [
+ "injections/profileindicator_inject.js",
+ "injections/profileindicator_inject.css",
+ "injections/ccdarktheme.css",
+ "injections/batchlock_inject.js"
+ ],
+ "browser_action": {},
+ "options_page": "options.html",
+ "options_ui": {
+ "page": "options.html",
+ "chrome_style": true,
+ "open_in_tab": false
+ },
+ "background": {
+ "persistent": false,
+ "scripts": [
+ "common/common.js",
+ "background.js"
+ ]
+ },
+ "default_locale": "en"
+}