summaryrefslogtreecommitdiffstats
path: root/ui/file_manager/integration_tests/video_player/background.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/file_manager/integration_tests/video_player/background.js')
-rw-r--r--ui/file_manager/integration_tests/video_player/background.js30
1 files changed, 1 insertions, 29 deletions
diff --git a/ui/file_manager/integration_tests/video_player/background.js b/ui/file_manager/integration_tests/video_player/background.js
index f1caec0..0a541b1 100644
--- a/ui/file_manager/integration_tests/video_player/background.js
+++ b/ui/file_manager/integration_tests/video_player/background.js
@@ -75,34 +75,6 @@ function openSingleVideo(volumeName, volumeType, entry) {
};
/**
- * Verifies if there are no Javascript errors in any of the app windows.
- * @param {function()} Completion callback.
- */
-function checkIfNoErrorsOccured(callback) {
- var countPromise = remoteCallVideoPlayer.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 = {};
@@ -140,7 +112,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(), [remoteCallVideoPlayer]);
}]);
}
];