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(); |
}); |
} |