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

Unified Diff: chrome/browser/resources/file_manager/background/js/test_util.js

Issue 177443006: [AudioPlayer] Add test for opening another file from Files.app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adressed the comment 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
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/file_manager_browsertest/background.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/background/js/test_util.js
diff --git a/chrome/browser/resources/file_manager/background/js/test_util.js b/chrome/browser/resources/file_manager/background/js/test_util.js
index 75d45cb73b6e17e4d9fa522d21963517279c8364..e69b9d7d26fcc122437b62725621e60d4a95aca9 100644
--- a/chrome/browser/resources/file_manager/background/js/test_util.js
+++ b/chrome/browser/resources/file_manager/background/js/test_util.js
@@ -72,6 +72,21 @@ test.util.sync.getWindows = function() {
};
/**
+ * Closes the specified window.
+ *
+ * @param {string} appId AppId of window to be closed.
+ * @return {boolean} Result: True if success, false otherwise.
+ */
+test.util.sync.closeWindow = function(appId) {
+ if (appId in background.appWindows &&
+ background.appWindows[appId].contentWindow) {
+ background.appWindows[appId].close();
+ return true;
+ }
+ return false;
+};
+
+/**
* Gets a document in the Files.app's window, including iframes.
*
* @param {Window} contentWindow Window to be used.
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/file_manager_browsertest/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698