Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5208)

Unified Diff: chrome/test/data/extensions/api_test/file_manager_browsertest/background.js

Issue 188253002: Revert of [AudioPlayer] Add test for opening another file from Files.app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/file_manager_browsertest/background.js
diff --git a/chrome/test/data/extensions/api_test/file_manager_browsertest/background.js b/chrome/test/data/extensions/api_test/file_manager_browsertest/background.js
index b07b3f30a2939cf4246e3d49857def85f0b1d733..33fd18e54d66a94b64ff7aa6d40a9eea551d7d18 100644
--- a/chrome/test/data/extensions/api_test/file_manager_browsertest/background.js
+++ b/chrome/test/data/extensions/api_test/file_manager_browsertest/background.js
@@ -115,8 +115,8 @@
/**
* Waits until a window having the given ID prefix appears.
- * @param {string} windowIdPrefix ID prefix of the requested window.
- * @return {Promise} promise Promise to be fulfilled with a found window's ID.
+ * @param {string} appIdPrefix ID prefix of the requested window.
+ * @param {Promise} promise Promise to be fulfilled with a found window's ID.
*/
function waitForWindow(windowIdPrefix) {
return repeatUntil(function() {
@@ -128,40 +128,6 @@
return pending('Window with the prefix %s is not found.', windowIdPrefix);
});
});
-}
-
-/**
- * Closes a window and waits until the window is closed.
- *
- * @param {string} windowId ID of the window to close.
- * @return {Promise} promise Promise to be fulfilled with the result (true:
- * success, false: failed).
- */
-function closeWindowAndWait(windowId) {
- // Closes the window.
- return callRemoteTestUtil('closeWindow', null, [windowId]).then(
- function(result) {
- // Returns false when the closing is failed.
- if (!result)
- return false;
-
- return repeatUntil(function() {
- return callRemoteTestUtil('getWindows', null, []).then(
- function(windows) {
- for (var id in windows) {
- if (id === windowId) {
- // Window is still available. Continues waiting.
- return pending('Window with the prefix %s is not found.',
- windowId);
- }
- }
- // Window is not available. Closing is done successfully.
- return true;
- }
- );
- });
- }
- );
}
/**

Powered by Google App Engine
This is Rietveld 408576698