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

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

Issue 762593006: Prototype implementation of MediaImportHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to master. Created 6 years 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 * A fake media scanner for testing.
7 * @constructor
8 * @struct
9 */
10 function MockMediaScanner() {
11 /** @private {!Array<!FileEntry>} */
12 this.results_ = [];
13 }
14
15 /**
16 * Returns scan "results".
17 * @return {!Promise<!Array<!FileEntry>>}
18 */
19 MockMediaScanner.prototype.scan = function(entries) {
20 return Promise.resolve(this.results_);
21 };
22
23 /**
24 * Sets the entries that the scanner will return.
25 * @param {!Array<!FileEntry>} entries
26 */
27 MockMediaScanner.prototype.setScanResults = function(entries) {
28 this.results_ = entries;
29 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698