| 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..e6f7ee13aed57147db542a4f691b976c3ef62f10 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 a fake key down event.
|
| + * @param {string} windowId Window ID.
|
| + * @param {string} query Query for the target element.
|
| + * @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();
|
| });
|
| }
|
|
|