diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-16 21:06:26 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-16 21:06:26 +0000 |
commit | 0c11955c34b929f50ad6f35a36ef0a9d6b163151 (patch) | |
tree | 05f82c81c94dc9c91a8d317c04e1e095df5b15ab | |
parent | 0540b17672e859e9c5df2ca8f9de160ccec108f9 (diff) | |
download | chromium_src-0c11955c34b929f50ad6f35a36ef0a9d6b163151.zip chromium_src-0c11955c34b929f50ad6f35a36ef0a9d6b163151.tar.gz chromium_src-0c11955c34b929f50ad6f35a36ef0a9d6b163151.tar.bz2 |
Adding an image so I can try my change in the try servers.
BUG=None
TEST=None
TBR=aa
Review URL: https://chromiumcodereview.appspot.com/9418020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122355 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/test/data/extensions/api_test/keybinding/basics/background.js | 15 | ||||
-rw-r--r-- | chrome/test/data/extensions/api_test/keybinding/basics/icon.png | bin | 0 -> 2799 bytes | |||
-rw-r--r-- | chrome/test/data/extensions/api_test/keybinding/basics/manifest.json | 25 |
3 files changed, 40 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/api_test/keybinding/basics/background.js b/chrome/test/data/extensions/api_test/keybinding/basics/background.js new file mode 100644 index 0000000..fab08d1 --- /dev/null +++ b/chrome/test/data/extensions/api_test/keybinding/basics/background.js @@ -0,0 +1,15 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Called when the user clicks on the browser action. +chrome.browserAction.onClicked.addListener(function(windowId) { + chrome.tabs.executeScript(null, { code: "document.body.bgColor='red'" }); +}); + +// Called when the user activates the command. +chrome.experimental.keybinding.onCommand.addListener(function(command) { + chrome.tabs.executeScript(null, { code: "document.body.bgColor='blue'" }); +}); + +chrome.test.notifyPass(); diff --git a/chrome/test/data/extensions/api_test/keybinding/basics/icon.png b/chrome/test/data/extensions/api_test/keybinding/basics/icon.png Binary files differnew file mode 100644 index 0000000..84c4be3 --- /dev/null +++ b/chrome/test/data/extensions/api_test/keybinding/basics/icon.png diff --git a/chrome/test/data/extensions/api_test/keybinding/basics/manifest.json b/chrome/test/data/extensions/api_test/keybinding/basics/manifest.json new file mode 100644 index 0000000..eed6bd4 --- /dev/null +++ b/chrome/test/data/extensions/api_test/keybinding/basics/manifest.json @@ -0,0 +1,25 @@ +{ + "name": "A browser action with no icon that makes the page red", + "version": "1.0", + "manifest_version": 2, + "background": { + "scripts": ["background.js"] + }, + "permissions": [ + "tabs", "http://*/*", "experimental", "keybinding" + ], + "browser_action": { + "default_title": "Make this page red", + "default_icon": "icon.png" + }, + "commands": { + "toggle-feature": { + "key": " Ctrl - Shift - Y ", + "description": "Toggle feature foo" + }, + "browserAction": { + "key": "Ctrl+Shift+F", + "description": "" + } + } +} |