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

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

Issue 230073002: Files.app: Reland r261616: Add a test to rename a file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 fb327118243878dfa4ddf28dcd5c883d4182f210..548c7ff53737bfa66fa8023783fe8d4219896e7e 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
@@ -340,6 +340,29 @@ function waitUntilTaskExecutes(windowId, taskId) {
}
/**
+ * Sends fake key down event.
mtomasz 2014/04/09 03:38:54 nit: fake -> a fake
hirono 2014/04/09 20:01:13 Done.
+ * @param {string} windowId Window ID.
+ * @param {string} query Query for target element.
mtomasz 2014/04/09 03:38:54 nit: target -> the target
hirono 2014/04/09 20:01:13 Done.
+ * @param {string} keyIdentifer Key identifier.
+ * @param {boolean} ctrlKey Control key flag.
+ * @return {Promise} Promise to be fulfilled or rejected depending on the
+ * result.
+ */
+function fakeKeyDown(windowId, query, keyIdentifer, ctrlKey) {
+ return new Promise(function(fulfill, reject) {
+ callRemoteTestUtil('fakeKeyDown',
+ windowId,
+ [query, keyIdentifer, ctrlKey],
+ function(result) {
+ if (result)
+ fulfill();
+ else
+ reject(new Error('Fail to fake key down.'));
+ });
+ });
+}
+
+/**
* Executes a sequence of test steps.
* @constructor
*/
@@ -721,7 +744,7 @@ function setupAndWaitUntilReady(appState, initialRoot, callback) {
*/
function checkIfNoErrorsOccured(callback) {
callRemoteTestUtil('getErrorCount', null, [], function(count) {
- chrome.test.assertEq(0, count);
+ chrome.test.assertEq(0, count, 'The error count is not 0.');
callback();
});
}

Powered by Google App Engine
This is Rietveld 408576698