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

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
hirono 2014/12/04 04:44:24 @struct?
Ben Kwa 2014/12/04 19:53:01 Done.
8 */
9 function MockMediaScanner() {
10 /** @private {!Array<!FileEntry>} */
11 this.results = [];
hirono 2014/12/04 04:44:25 Please add '_' at the end for private members.
Ben Kwa 2014/12/04 19:53:01 Done.
12 }
13
14 /**
15 * Returns scan "results".
16 * @return {!Promise<!Array<!FileEntry>>}
hirono 2014/12/04 04:44:25 !Promise.<!Array.<!FileEntry>>
Ben Kwa 2014/12/04 19:53:01 Acknowledged.
17 */
18 MockMediaScanner.prototype.scan = function(entries) {
19 return Promise.resolve(this.results);
20 };
21
22 /**
23 * Sets the entries that the scanner will return.
24 * @param {!Array<!FileEntry>} entries
hirono 2014/12/04 04:44:24 !Array.<!FileEntry>
Ben Kwa 2014/12/04 19:53:01 Acknowledged.
25 */
26 MockMediaScanner.prototype.setScanResults = function(entries) {
27 this.results = entries;
28 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698