summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorerikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-30 23:27:32 +0000
committererikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-30 23:27:32 +0000
commite337ad47eab483f5db779fc25c7d42467ce31e70 (patch)
treeb6ab9990d13e4a88f6cb6aec22331d535ede4a58 /chrome
parentd55c5ed06721bab2187dd1b844a7e24ad85e835b (diff)
downloadchromium_src-e337ad47eab483f5db779fc25c7d42467ce31e70.zip
chromium_src-e337ad47eab483f5db779fc25c7d42467ce31e70.tar.gz
chromium_src-e337ad47eab483f5db779fc25c7d42467ce31e70.tar.bz2
API test for CL http://codereview.chromium.org/347016
I'm submitting this as a separate CL so that the binary file lands and that I can get good try server results. TBR=mpcomplete Review URL: http://codereview.chromium.org/339091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/test/data/extensions/api_test/page_action_popup/background.html6
-rwxr-xr-xchrome/test/data/extensions/api_test/page_action_popup/icon.pngbin0 -> 2809 bytes
-rwxr-xr-xchrome/test/data/extensions/api_test/page_action_popup/manifest.json13
-rwxr-xr-xchrome/test/data/extensions/api_test/page_action_popup/popup.html14
4 files changed, 33 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/api_test/page_action_popup/background.html b/chrome/test/data/extensions/api_test/page_action_popup/background.html
new file mode 100644
index 0000000..00f654a
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action_popup/background.html
@@ -0,0 +1,6 @@
+<script>
+ chrome.tabs.getSelected(null, function(tab) {
+ chrome.pageAction.show(tab.id);
+ chrome.test.notifyPass();
+ });
+</script>
diff --git a/chrome/test/data/extensions/api_test/page_action_popup/icon.png b/chrome/test/data/extensions/api_test/page_action_popup/icon.png
new file mode 100755
index 0000000..9a79a46
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action_popup/icon.png
Binary files differ
diff --git a/chrome/test/data/extensions/api_test/page_action_popup/manifest.json b/chrome/test/data/extensions/api_test/page_action_popup/manifest.json
new file mode 100755
index 0000000..ecc550c
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action_popup/manifest.json
@@ -0,0 +1,13 @@
+{
+ "name": "A page action with a popup that does nothing.",
+ "version": "1.0",
+ "background_page": "background.html",
+ "permissions": [
+ "tabs", "http://*/*"
+ ],
+ "page_action": {
+ "default_title": "Popup hello world",
+ "default_icon": "icon.png",
+ "popup": "popup.html"
+ }
+}
diff --git a/chrome/test/data/extensions/api_test/page_action_popup/popup.html b/chrome/test/data/extensions/api_test/page_action_popup/popup.html
new file mode 100755
index 0000000..7dbe750
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action_popup/popup.html
@@ -0,0 +1,14 @@
+<head>
+<script>
+// Wait to be resized by the browser once before indicating pass.
+function onResize() {
+ window.removeEventListener("resize", onResize);
+ chrome.test.notifyPass();
+}
+
+window.addEventListener("resize", onResize);
+</script>
+</head>
+<body>
+<div id="test">Hello&nbsp;World</div>
+</body>