summaryrefslogtreecommitdiffstats
path: root/ui/file_manager/integration_tests/audio_player/background.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/file_manager/integration_tests/audio_player/background.js')
-rw-r--r--ui/file_manager/integration_tests/audio_player/background.js30
1 files changed, 1 insertions, 29 deletions
diff --git a/ui/file_manager/integration_tests/audio_player/background.js b/ui/file_manager/integration_tests/audio_player/background.js
index 757bbf3..4c101c6 100644
--- a/ui/file_manager/integration_tests/audio_player/background.js
+++ b/ui/file_manager/integration_tests/audio_player/background.js
@@ -52,34 +52,6 @@ function launch(testVolumeName, volumeType, entries, opt_selected) {
}
/**
- * Verifies if there are no Javascript errors in any of the app windows.
- * @param {function()} Completion callback.
- */
-function checkIfNoErrorsOccured(callback) {
- var countPromise = remoteCallAudioPlayer.callRemoteTestUtil(
- 'getErrorCount', null, []);
- countPromise.then(function(count) {
- chrome.test.assertEq(0, count, 'The error count is not 0.');
- callback();
- });
-}
-
-/**
- * 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);
- });
-};
-
-/**
* Namespace for test cases.
*/
var testcase = {};
@@ -117,7 +89,7 @@ window.addEventListener('load', function() {
// Specify the name of test to the test system.
targetTest.generatedName = testCaseName;
chrome.test.runTests([function() {
- return testPromise(targetTest());
+ return testPromiseAndApps(targetTest(), [remoteCallAudioPlayer]);
}]);
}
];