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

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

Issue 275493006: Files.app: Fix selection on creating new folder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed the comment Created 6 years, 7 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 0ac4292cbd709a083592963e27dde606de3de39e..12ef690a6008d9eec649b329fadbb3433a3147e9 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
@@ -319,6 +319,21 @@ function waitUntilTaskExecutes(windowId, taskId) {
}
/**
+ * Adds check of chrome.test to the end of the given promise.
+ * @param {Promise} promise Promise.
+ */
+function testPromise(promise) {
+ promise.then(function() {
+ return new Promise(checkIfNoErrorsOccured);
+ }).then(chrome.test.callbackPass(function() {
+ // The callbacPass is necessary to avoid prematurely finishing tests.
+ // Don't put chrome.test.succeed() here to avoid doubled success log.
+ }), function(error) {
+ chrome.test.fail(error.stack || error);
+ });
+};
+
+/**
* Sends a fake key down event.
* @param {string} windowId Window ID.
* @param {string} query Query for the target element.

Powered by Google App Engine
This is Rietveld 408576698