summaryrefslogtreecommitdiffstats
path: root/chrome/test/data
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-01 08:07:50 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-01 08:07:50 +0000
commit7256c50408de6476ecedf55d1c6fd6165cf08f95 (patch)
tree686d2607d7ba3ff337ec54be155ff225538038c9 /chrome/test/data
parentb95653996536e6733ad9327c7aa1a6c909cc5899 (diff)
downloadchromium_src-7256c50408de6476ecedf55d1c6fd6165cf08f95.zip
chromium_src-7256c50408de6476ecedf55d1c6fd6165cf08f95.tar.gz
chromium_src-7256c50408de6476ecedf55d1c6fd6165cf08f95.tar.bz2
Revert "Clean-up of the asynchronous behaviour of the experimental extension popup API. "
This reverts http://codereview.chromium.org/1512007 TBR=twiz Review URL: http://codereview.chromium.org/1735026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46184 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data')
-rw-r--r--chrome/test/data/extensions/api_test/popup/toolband.html66
-rw-r--r--chrome/test/data/extensions/api_test/popup/toolband_popup_a.html12
-rw-r--r--chrome/test/data/extensions/api_test/popup/toolband_popup_b.html12
3 files changed, 4 insertions, 86 deletions
diff --git a/chrome/test/data/extensions/api_test/popup/toolband.html b/chrome/test/data/extensions/api_test/popup/toolband.html
index eb3fd43..5d04350 100644
--- a/chrome/test/data/extensions/api_test/popup/toolband.html
+++ b/chrome/test/data/extensions/api_test/popup/toolband.html
@@ -111,7 +111,8 @@ window.onload = function() {
},
function popupBlackBorder() {
// Ensure that the test waits until the popup is dismissed.
- chrome.test.listenOnce(chrome.experimental.popup.onClosed);
+ chrome.test.listenOnce(chrome.experimental.popup.onClosed,
+ function() {});
// Validate that displaying a pop-up with a black border still invokes
// the callback successfully. Note that this test does not validate
@@ -126,62 +127,6 @@ window.onload = function() {
chrome.experimental.extension.getPopupView().close();
}));
},
- function disallowMultiplePopups() {
- // This test ensures that for a given extension with a popup displayed,
- // displaying a subsequent popup will dismiss the first.
- var showDetails1 = {
- "relativeTo": document.getElementById("anchorHere"),
- };
-
- var showDetails2 = {
- "relativeTo": document.getElementById("anchorHere2"),
- "borderStyle": "rectangle"
- };
-
- // Track the number of popups opened and closed, so that we can signal
- // the test as completed when appropriate.
- var numberClosed = 0;
- var doneListening = chrome.test.listenForever(
- chrome.experimental.popup.onClosed,
- function() {
- // This test expects to open and close two popups, so signify that
- // the test has succeeded, after closing the second popup.
- if (++numberClosed == 2) {
- doneListening();
- }
- });
-
- chrome.experimental.popup.show("toolband_popup_a.html",
- showDetails1,
- function() {
- // Validate that the popup view returned is the one we expect.
- chrome.test.assertEq(
- 'a',
- chrome.experimental.extension.getPopupView().getIdentity());
-
- // Ensure that only one popup is open.
- chrome.test.assertEq(
- 1,
- chrome.extension.getViews({type: "popup"}).length);
-
- chrome.experimental.popup.show("toolband_popup_b.html",
- showDetails2,
- function() {
- // Validate that the first popup view is fully closed, and that
- // getPopupView returns the most recently opened popup.
- chrome.test.assertEq(
- 'b',
- chrome.experimental.extension.getPopupView().getIdentity());
-
- // Ensure that only one popup is open.
- chrome.test.assertEq(
- 1,
- chrome.extension.getViews({type: 'popup'}).length);
-
- chrome.experimental.extension.getPopupView().close();
- });
- });
- },
function popupChromeSizing() {
// Ensure that the test waits until the popup is dismissed.
chrome.test.listenOnce(chrome.experimental.popup.onClosed);
@@ -214,11 +159,8 @@ window.onload = function() {
</script>
</head>
<body>
-<div id="anchorHere">
-<span>TEST</span>
-</div>
-<div id="anchorHere2">
-<span>TESTING 2</span>
+<div>
+<span id="anchorHere">TEST</span>
</div>
<form>
<input id="entryForm" onfocus="onFormFocused();" onblur="onFormBlurred();"/>
diff --git a/chrome/test/data/extensions/api_test/popup/toolband_popup_a.html b/chrome/test/data/extensions/api_test/popup/toolband_popup_a.html
deleted file mode 100644
index 09979f1..0000000
--- a/chrome/test/data/extensions/api_test/popup/toolband_popup_a.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html>
-<head>
-<script>
-function getIdentity() {
- return 'a';
-}
-</script>
-</head>
-<body>
-Popup-A-Contents
-</body>
-</html> \ No newline at end of file
diff --git a/chrome/test/data/extensions/api_test/popup/toolband_popup_b.html b/chrome/test/data/extensions/api_test/popup/toolband_popup_b.html
deleted file mode 100644
index 82f24aa..0000000
--- a/chrome/test/data/extensions/api_test/popup/toolband_popup_b.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html>
-<head>
-<script>
-function getIdentity() {
- return 'b';
-}
-</script>
-</head>
-<body>
-Popup-B-Contents
-</body>
-</html> \ No newline at end of file