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

Side by Side Diff: chrome/test/data/file_manager/unit_tests/test_util.js

Issue 663513003: Add an unittest for background/volume_manager.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed variables. Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * Invokes a callback function depending on the result of promise.
7 *
8 * @param {Promise} promise Promise.
9 * @param {function(boolean)} calllback Callback function. True is passed if the
10 * test failed.
11 */
12 function reportPromise(promise, callback) {
13 promise.then(function() {
14 callback(/* error */ false);
15 }, function(error) {
16 console.error(error.stack || error);
17 callback(/* error */ true);
18 });
19 }
20
21
hirono 2014/10/30 09:35:50 nit: The last line is not needed.
yawano 2014/10/30 10:18:30 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698