summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 02:15:20 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 02:15:20 +0000
commit6657afa65426f10f5dc51c0ac12d573c4826cb54 (patch)
tree3b24f83dd2f834bde93b7b7e27327701814379ac /chrome/test
parent6c856ae733bf8d1f187ec5b93e07216ace0c4693 (diff)
downloadchromium_src-6657afa65426f10f5dc51c0ac12d573c4826cb54.zip
chromium_src-6657afa65426f10f5dc51c0ac12d573c4826cb54.tar.gz
chromium_src-6657afa65426f10f5dc51c0ac12d573c4826cb54.tar.bz2
Add first class support for user scripts.
Original review: http://codereview.chromium.org/340057 TBR=mpcomplete@chromium.org BUG=22103 TEST=Install a user script (such as from userscripts.org). You should get the extension install UI and the script should show up in the extension management UI. It should also work, though some scripts use Firefox-specific APIs and those won't work in Chromium. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rwxr-xr-xchrome/test/data/extensions/user_script_basic.user.js11
-rwxr-xr-xchrome/test/data/extensions/user_script_no_metadata.user.js1
2 files changed, 12 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/user_script_basic.user.js b/chrome/test/data/extensions/user_script_basic.user.js
new file mode 100755
index 0000000..ea4f8a0
--- /dev/null
+++ b/chrome/test/data/extensions/user_script_basic.user.js
@@ -0,0 +1,11 @@
+// ==UserScript==
+// @name My user script
+// @namespace http://www.google.com
+// @description Does totally awesome stuff.
+// @include http://www.google.com/*
+// @include http://www.yahoo.com/*
+// @exclude *foo*
+// @match http://www.google.com/*
+// ==/UserScript==
+
+alert("Hello! This is my script.");
diff --git a/chrome/test/data/extensions/user_script_no_metadata.user.js b/chrome/test/data/extensions/user_script_no_metadata.user.js
new file mode 100755
index 0000000..f8fe23e
--- /dev/null
+++ b/chrome/test/data/extensions/user_script_no_metadata.user.js
@@ -0,0 +1 @@
+alert("This user script has no metadata, but it is also valid!");