summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authortwiz@google.com <twiz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 20:38:01 +0000
committertwiz@google.com <twiz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 20:38:01 +0000
commitfac63935827a5cdc34bea6e0c72ecde405e703a9 (patch)
tree389eeb6bec69b38edb25df9da02e3fcad9ca5723 /chrome/test
parent08be8a78fdca57d62b5b3a942a17e414af091fca (diff)
downloadchromium_src-fac63935827a5cdc34bea6e0c72ecde405e703a9.zip
chromium_src-fac63935827a5cdc34bea6e0c72ecde405e703a9.tar.gz
chromium_src-fac63935827a5cdc34bea6e0c72ecde405e703a9.tar.bz2
Addition of "optional" tag to chrome.exerpimental.popup routines that may return an undefined value.chrome.experimental.extension.getPopupView() may return undefined if no pop-up is currently displayed.chrome.experimental.popup.getParentWindow() may return undefined if called from a non-popup view.BUG=28045TEST=extension_popup_apitest.cc
Review URL: http://codereview.chromium.org/400023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32387 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/extensions/api_test/popup_api/toolband.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/api_test/popup_api/toolband.html b/chrome/test/data/extensions/api_test/popup_api/toolband.html
index 0d346a2..cde3a31 100644
--- a/chrome/test/data/extensions/api_test/popup_api/toolband.html
+++ b/chrome/test/data/extensions/api_test/popup_api/toolband.html
@@ -5,6 +5,18 @@ var globalValue = "I am not 42.";
window.onload = function() {
chrome.test.runTests([
+ function noPopup() {
+ chrome.test.assertTrue(
+ undefined === chrome.experimental.extension.getPopupView(),
+ "Popup view is defined when no popup shown.");
+ chrome.test.succeed();
+ },
+ function noParentWindow() {
+ chrome.test.assertTrue(
+ undefined === chrome.experimental.popup.getParentWindow(),
+ "Parent );
+ chrome.test.succeed();
+ },
function show() {
var showDetails = {
"relativeTo": document.getElementById("anchorHere")