summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 21:13:46 +0000
committerskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 21:13:46 +0000
commit62d317f17a184ff6ececa01cd16a0902f723f375 (patch)
tree5efd92dba639b97f1d4f4490a56d864c2ee21a23 /chrome/test
parent00ea8e54fb2b10f3dd5d9be4aea103e18f754580 (diff)
downloadchromium_src-62d317f17a184ff6ececa01cd16a0902f723f375.zip
chromium_src-62d317f17a184ff6ececa01cd16a0902f723f375.tar.gz
chromium_src-62d317f17a184ff6ececa01cd16a0902f723f375.tar.bz2
Add files used in browser tests of chrome.pageAction.setpopup().
TEST=Built. These files are used to test code review 545068. BUG=27526 Review URL: http://codereview.chromium.org/553124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37308 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rwxr-xr-xchrome/test/data/extensions/api_test/page_action/add_popup/a_popup.html5
-rw-r--r--chrome/test/data/extensions/api_test/page_action/add_popup/another_popup.html5
-rw-r--r--chrome/test/data/extensions/api_test/page_action/add_popup/background.html20
-rw-r--r--chrome/test/data/extensions/api_test/page_action/add_popup/change_popup.html13
-rwxr-xr-xchrome/test/data/extensions/api_test/page_action/add_popup/icon.pngbin0 -> 2809 bytes
-rwxr-xr-xchrome/test/data/extensions/api_test/page_action/add_popup/manifest.json12
-rwxr-xr-xchrome/test/data/extensions/api_test/page_action/remove_popup/a_popup.html5
-rw-r--r--chrome/test/data/extensions/api_test/page_action/remove_popup/background.html10
-rwxr-xr-xchrome/test/data/extensions/api_test/page_action/remove_popup/icon.pngbin0 -> 2809 bytes
-rwxr-xr-xchrome/test/data/extensions/api_test/page_action/remove_popup/manifest.json13
-rw-r--r--chrome/test/data/extensions/api_test/page_action/remove_popup/remove_popup.html13
11 files changed, 96 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/api_test/page_action/add_popup/a_popup.html b/chrome/test/data/extensions/api_test/page_action/add_popup/a_popup.html
new file mode 100755
index 0000000..4e0a93f
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action/add_popup/a_popup.html
@@ -0,0 +1,5 @@
+<head>
+</head>
+<body>
+<div id="test">I am a popup!</div>
+</body>
diff --git a/chrome/test/data/extensions/api_test/page_action/add_popup/another_popup.html b/chrome/test/data/extensions/api_test/page_action/add_popup/another_popup.html
new file mode 100644
index 0000000..b2f61b1
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action/add_popup/another_popup.html
@@ -0,0 +1,5 @@
+<html>
+ <body>
+ Another popup.
+ </body>
+</html>
diff --git a/chrome/test/data/extensions/api_test/page_action/add_popup/background.html b/chrome/test/data/extensions/api_test/page_action/add_popup/background.html
new file mode 100644
index 0000000..64551c2
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action/add_popup/background.html
@@ -0,0 +1,20 @@
+<script>
+
+chrome.tabs.getSelected(null, function(tab) {
+ chrome.pageAction.show(tab.id);
+
+ // When the page action icon is clicked for the first time, add a popup.
+ chrome.pageAction.onClicked.addListener(function(tab) {
+ window.tabId = tab.id;
+
+ chrome.pageAction.setPopup({
+ tabId: tab.id,
+ popup: 'a_popup.html'
+ });
+ chrome.test.notifyPass();
+ });
+
+ chrome.test.notifyPass();
+});
+
+</script>
diff --git a/chrome/test/data/extensions/api_test/page_action/add_popup/change_popup.html b/chrome/test/data/extensions/api_test/page_action/add_popup/change_popup.html
new file mode 100644
index 0000000..dcc3a25
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action/add_popup/change_popup.html
@@ -0,0 +1,13 @@
+<html>
+ <body>
+ <script>
+ chrome.tabs.getSelected(null, function(tab) {
+ chrome.pageAction.setPopup({
+ tabId: tab.id,
+ popup: 'another_popup.html'
+ });
+ chrome.test.notifyPass();
+ });
+ </script>
+ </body>
+</html>
diff --git a/chrome/test/data/extensions/api_test/page_action/add_popup/icon.png b/chrome/test/data/extensions/api_test/page_action/add_popup/icon.png
new file mode 100755
index 0000000..9a79a46
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action/add_popup/icon.png
Binary files differ
diff --git a/chrome/test/data/extensions/api_test/page_action/add_popup/manifest.json b/chrome/test/data/extensions/api_test/page_action/add_popup/manifest.json
new file mode 100755
index 0000000..d2f45c3
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action/add_popup/manifest.json
@@ -0,0 +1,12 @@
+{
+ "name": "A page action which adds a popup.",
+ "version": "1.0",
+ "background_page": "background.html",
+ "permissions": [
+ "tabs", "http://*/*"
+ ],
+ "page_action": {
+ "default_title": "Popup Title",
+ "default_icon": "icon.png"
+ }
+}
diff --git a/chrome/test/data/extensions/api_test/page_action/remove_popup/a_popup.html b/chrome/test/data/extensions/api_test/page_action/remove_popup/a_popup.html
new file mode 100755
index 0000000..4e0a93f
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action/remove_popup/a_popup.html
@@ -0,0 +1,5 @@
+<head>
+</head>
+<body>
+<div id="test">I am a popup!</div>
+</body>
diff --git a/chrome/test/data/extensions/api_test/page_action/remove_popup/background.html b/chrome/test/data/extensions/api_test/page_action/remove_popup/background.html
new file mode 100644
index 0000000..4b6e470
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action/remove_popup/background.html
@@ -0,0 +1,10 @@
+<html>
+ <body>
+ <script>
+ chrome.tabs.getSelected(null, function(tab) {
+ chrome.pageAction.show(tab.id);
+ chrome.test.notifyPass();
+ });
+ </script>
+ </body>
+</html>
diff --git a/chrome/test/data/extensions/api_test/page_action/remove_popup/icon.png b/chrome/test/data/extensions/api_test/page_action/remove_popup/icon.png
new file mode 100755
index 0000000..9a79a46
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action/remove_popup/icon.png
Binary files differ
diff --git a/chrome/test/data/extensions/api_test/page_action/remove_popup/manifest.json b/chrome/test/data/extensions/api_test/page_action/remove_popup/manifest.json
new file mode 100755
index 0000000..50a28f8
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action/remove_popup/manifest.json
@@ -0,0 +1,13 @@
+{
+ "name": "A page action which removes a popup.",
+ "version": "1.0",
+ "background_page": "background.html",
+ "permissions": [
+ "tabs", "http://*/*"
+ ],
+ "page_action": {
+ "default_title": "Popup Title",
+ "default_icon": "icon.png",
+ "default_popup": "a_popup.html"
+ }
+}
diff --git a/chrome/test/data/extensions/api_test/page_action/remove_popup/remove_popup.html b/chrome/test/data/extensions/api_test/page_action/remove_popup/remove_popup.html
new file mode 100644
index 0000000..05acc68
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/page_action/remove_popup/remove_popup.html
@@ -0,0 +1,13 @@
+<html>
+ <body>
+ <script>
+ chrome.tabs.getSelected(null, function(tab) {
+ chrome.pageAction.setPopup({
+ tabId: tab.id,
+ popup: '' // No popup.
+ });
+ chrome.test.notifyPass();
+ });
+ </script>
+ </body>
+</html>