summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-19 08:58:12 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-19 08:58:12 +0000
commit7d8867df6c96bf76c040042a834af04a8ab319bc (patch)
tree3e0914651dc6093502fc65fb89631bd34031528e /chrome/test
parent6145198177d58f79e7ed1b44fee883ea074fc5fa (diff)
downloadchromium_src-7d8867df6c96bf76c040042a834af04a8ab319bc.zip
chromium_src-7d8867df6c96bf76c040042a834af04a8ab319bc.tar.gz
chromium_src-7d8867df6c96bf76c040042a834af04a8ab319bc.tar.bz2
Refactor app-related manifest properties so that they don't
include the name 'app'. I think these will be useful for normal extensions, too. Also extract an ExtensionExtent class out of Extension. I think this will be useful for passing by value to the IO thread. Review URL: http://codereview.chromium.org/1025006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42091 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_container_invalid_type.json8
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_container_invalid_value.json8
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_container_without_launch_url.json7
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_default.json4
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_local_path.json7
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_panel.json8
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_path_and_url.json8
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_path_invalid_type.json7
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_path_invalid_value.json7
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_tab.json8
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_url_invalid_type.json7
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_web_url_absolute.json7
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_web_url_relative.json11
-rw-r--r--chrome/test/data/extensions/manifest_tests/launch_window.json8
-rw-r--r--chrome/test/data/extensions/manifest_tests/valid_app.json19
-rw-r--r--chrome/test/data/extensions/manifest_tests/web_content_disabled.json7
-rw-r--r--chrome/test/data/extensions/manifest_tests/web_content_enabled_invalid.json7
-rw-r--r--chrome/test/data/extensions/manifest_tests/web_content_not_enabled.json6
-rw-r--r--chrome/test/data/extensions/manifest_tests/web_origin_invalid_1.json8
-rw-r--r--chrome/test/data/extensions/manifest_tests/web_origin_invalid_2.json8
-rw-r--r--chrome/test/data/extensions/manifest_tests/web_origin_invalid_3.json8
-rw-r--r--chrome/test/data/extensions/manifest_tests/web_origin_web_content_disabled.json7
-rw-r--r--chrome/test/data/extensions/manifest_tests/web_origin_wrong_type.json8
-rw-r--r--chrome/test/data/extensions/manifest_tests/web_paths_invalid_path_1.json10
-rw-r--r--chrome/test/data/extensions/manifest_tests/web_paths_invalid_path_2.json10
-rw-r--r--chrome/test/data/extensions/manifest_tests/web_paths_wrong_type.json8
26 files changed, 211 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/manifest_tests/launch_container_invalid_type.json b/chrome/test/data/extensions/manifest_tests/launch_container_invalid_type.json
new file mode 100644
index 0000000..3aa5a52
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_container_invalid_type.json
@@ -0,0 +1,8 @@
+{
+ "name": "test",
+ "version": "1",
+ "launch": {
+ "container": 42,
+ "local_path": "hot.html"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_container_invalid_value.json b/chrome/test/data/extensions/manifest_tests/launch_container_invalid_value.json
new file mode 100644
index 0000000..f1b2ed6
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_container_invalid_value.json
@@ -0,0 +1,8 @@
+{
+ "name": "test",
+ "version": "1",
+ "launch": {
+ "container": "foobar",
+ "local_path": "dog.html"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_container_without_launch_url.json b/chrome/test/data/extensions/manifest_tests/launch_container_without_launch_url.json
new file mode 100644
index 0000000..66ea2e5
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_container_without_launch_url.json
@@ -0,0 +1,7 @@
+{
+ "name": "test",
+ "version": "1",
+ "launch": {
+ "container": "tab"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_default.json b/chrome/test/data/extensions/manifest_tests/launch_default.json
new file mode 100644
index 0000000..0d9792a
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_default.json
@@ -0,0 +1,4 @@
+{
+ "name": "test",
+ "version": "1"
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_local_path.json b/chrome/test/data/extensions/manifest_tests/launch_local_path.json
new file mode 100644
index 0000000..72dd2e0
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_local_path.json
@@ -0,0 +1,7 @@
+{
+ "name": "test",
+ "version": "1",
+ "launch": {
+ "local_path": "launch.html"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_panel.json b/chrome/test/data/extensions/manifest_tests/launch_panel.json
new file mode 100644
index 0000000..381cf35
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_panel.json
@@ -0,0 +1,8 @@
+{
+ "name": "test",
+ "version": "1",
+ "launch": {
+ "container": "panel",
+ "web_url": "http://www.google.com/hot.html"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_path_and_url.json b/chrome/test/data/extensions/manifest_tests/launch_path_and_url.json
new file mode 100644
index 0000000..93cb1bc
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_path_and_url.json
@@ -0,0 +1,8 @@
+{
+ "name": "test",
+ "version": "1",
+ "launch": {
+ "local_path": "foo",
+ "web_url": "http://www.google.com/"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_path_invalid_type.json b/chrome/test/data/extensions/manifest_tests/launch_path_invalid_type.json
new file mode 100644
index 0000000..583c61b
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_path_invalid_type.json
@@ -0,0 +1,7 @@
+{
+ "name": "test",
+ "version": "1",
+ "launch": {
+ "local_path": 42
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_path_invalid_value.json b/chrome/test/data/extensions/manifest_tests/launch_path_invalid_value.json
new file mode 100644
index 0000000..fd95800
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_path_invalid_value.json
@@ -0,0 +1,7 @@
+{
+ "name": "test",
+ "version": "1",
+ "launch": {
+ "local_path": "http://www.google.com/"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_tab.json b/chrome/test/data/extensions/manifest_tests/launch_tab.json
new file mode 100644
index 0000000..650dd95
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_tab.json
@@ -0,0 +1,8 @@
+{
+ "name": "test",
+ "version": "1",
+ "launch": {
+ "container": "tab",
+ "local_path": "foo.html"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_url_invalid_type.json b/chrome/test/data/extensions/manifest_tests/launch_url_invalid_type.json
new file mode 100644
index 0000000..e6fa384
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_url_invalid_type.json
@@ -0,0 +1,7 @@
+{
+ "name": "test",
+ "version": "1",
+ "launch": {
+ "web_url": 42
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_web_url_absolute.json b/chrome/test/data/extensions/manifest_tests/launch_web_url_absolute.json
new file mode 100644
index 0000000..b3e4270
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_web_url_absolute.json
@@ -0,0 +1,7 @@
+{
+ "name": "test",
+ "version": "1",
+ "launch": {
+ "web_url": "http://www.google.com/launch.html"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_web_url_relative.json b/chrome/test/data/extensions/manifest_tests/launch_web_url_relative.json
new file mode 100644
index 0000000..f62dad9
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_web_url_relative.json
@@ -0,0 +1,11 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ "enabled": true,
+ "origin": "http://www.google.com/"
+ },
+ "launch": {
+ "web_url": "launch.html"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/launch_window.json b/chrome/test/data/extensions/manifest_tests/launch_window.json
new file mode 100644
index 0000000..d73a9bf
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/launch_window.json
@@ -0,0 +1,8 @@
+{
+ "name": "test",
+ "version": "1",
+ "launch": {
+ "container": "window",
+ "local_path": "bar.html"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/valid_app.json b/chrome/test/data/extensions/manifest_tests/valid_app.json
new file mode 100644
index 0000000..734cffb
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/valid_app.json
@@ -0,0 +1,19 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ "enabled": true,
+ "origin": "http://www.google.com/",
+ "paths": [
+ "mail/",
+ "foobar/"
+ ]
+ },
+ "launch": {
+ "container": "window",
+ "web_url": "mail/"
+ },
+ "permissions": [
+ "notifications"
+ ]
+}
diff --git a/chrome/test/data/extensions/manifest_tests/web_content_disabled.json b/chrome/test/data/extensions/manifest_tests/web_content_disabled.json
new file mode 100644
index 0000000..a355142
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/web_content_disabled.json
@@ -0,0 +1,7 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ "enabled": false
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/web_content_enabled_invalid.json b/chrome/test/data/extensions/manifest_tests/web_content_enabled_invalid.json
new file mode 100644
index 0000000..2411c2d
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/web_content_enabled_invalid.json
@@ -0,0 +1,7 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ "enabled": 42
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/web_content_not_enabled.json b/chrome/test/data/extensions/manifest_tests/web_content_not_enabled.json
new file mode 100644
index 0000000..28f6469a
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/web_content_not_enabled.json
@@ -0,0 +1,6 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/web_origin_invalid_1.json b/chrome/test/data/extensions/manifest_tests/web_origin_invalid_1.json
new file mode 100644
index 0000000..69ad622
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/web_origin_invalid_1.json
@@ -0,0 +1,8 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ "enabled": true,
+ "origin": "wiggity"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/web_origin_invalid_2.json b/chrome/test/data/extensions/manifest_tests/web_origin_invalid_2.json
new file mode 100644
index 0000000..801b0b9
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/web_origin_invalid_2.json
@@ -0,0 +1,8 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ "enabled": true,
+ "origin": "ftp://www.google.com/"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/web_origin_invalid_3.json b/chrome/test/data/extensions/manifest_tests/web_origin_invalid_3.json
new file mode 100644
index 0000000..c6c3672
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/web_origin_invalid_3.json
@@ -0,0 +1,8 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ "enabled": true,
+ "origin": "https://www.google.com/monkey"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/web_origin_web_content_disabled.json b/chrome/test/data/extensions/manifest_tests/web_origin_web_content_disabled.json
new file mode 100644
index 0000000..5389879
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/web_origin_web_content_disabled.json
@@ -0,0 +1,7 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ "origin": "http://www.google.com/"
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/web_origin_wrong_type.json b/chrome/test/data/extensions/manifest_tests/web_origin_wrong_type.json
new file mode 100644
index 0000000..42a2ae3
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/web_origin_wrong_type.json
@@ -0,0 +1,8 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ "enabled": true,
+ "origin": 42
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/web_paths_invalid_path_1.json b/chrome/test/data/extensions/manifest_tests/web_paths_invalid_path_1.json
new file mode 100644
index 0000000..f259790
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/web_paths_invalid_path_1.json
@@ -0,0 +1,10 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ "enabled": true,
+ "paths": [
+ 42
+ ]
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/web_paths_invalid_path_2.json b/chrome/test/data/extensions/manifest_tests/web_paths_invalid_path_2.json
new file mode 100644
index 0000000..d435ee4
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/web_paths_invalid_path_2.json
@@ -0,0 +1,10 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ "enabled": true,
+ "paths": [
+ "http://www.google.com/monkey"
+ ]
+ }
+}
diff --git a/chrome/test/data/extensions/manifest_tests/web_paths_wrong_type.json b/chrome/test/data/extensions/manifest_tests/web_paths_wrong_type.json
new file mode 100644
index 0000000..56e0b28
--- /dev/null
+++ b/chrome/test/data/extensions/manifest_tests/web_paths_wrong_type.json
@@ -0,0 +1,8 @@
+{
+ "name": "test",
+ "version": "1",
+ "web_content": {
+ "enabled": true,
+ "paths": 42
+ }
+}