diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-31 04:24:17 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-31 04:24:17 +0000 |
commit | 711abaeaaec2bb552d9fe161200778f449fd2da0 (patch) | |
tree | 043dec5763dbb378464f0a9d813b08892c62a40a /chrome/renderer/resources | |
parent | 2f7c97fec82e0a4bebdf0fced4cf9db7ac574497 (diff) | |
download | chromium_src-711abaeaaec2bb552d9fe161200778f449fd2da0.zip chromium_src-711abaeaaec2bb552d9fe161200778f449fd2da0.tar.gz chromium_src-711abaeaaec2bb552d9fe161200778f449fd2da0.tar.bz2 |
Adding API tests for getViews and infobars.
Also fixing a bug where the wrong window id was returned
back after creating the infobar, and changing html path param
when calling show() from htlpPath to path as requrested by aa.
TEST=See chrome_tests.gypi
BUG=26463
Review URL: http://codereview.chromium.org/1561003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/resources')
-rw-r--r-- | chrome/renderer/resources/extension_process_bindings.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/renderer/resources/extension_process_bindings.js b/chrome/renderer/resources/extension_process_bindings.js index 5d80919..fe8499c 100644 --- a/chrome/renderer/resources/extension_process_bindings.js +++ b/chrome/renderer/resources/extension_process_bindings.js @@ -419,8 +419,18 @@ var chrome = chrome || {}; }); } - apiFunctions["extension.getViews"].handleRequest = function() { - return GetExtensionViews(-1, "ALL"); + apiFunctions["extension.getViews"].handleRequest = function(properties) { + var windowId = -1; + var type = "ALL"; + if (typeof(properties) != "undefined") { + if (typeof(properties.type) != "undefined") { + type = properties.type; + } + if (typeof(properties.windowId) != "undefined") { + windowId = properties.windowId; + } + } + return GetExtensionViews(windowId, type) || null; } apiFunctions["extension.getBackgroundPage"].handleRequest = function() { |