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

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

Issue 98363003: Files.app: Add a unit test of ProgressCenterHandler class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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 'use strict';
5
6 /**
7 * Mock of Progress Center.
8 * @constructor
9 */
10 function MockProgressCenter() {
11 /**
12 * Items stored in the progress center.
13 * @type {Object.<string, ProgressCenterItem>}
14 */
15 this.items = {};
16
17 Object.seal(this);
18 }
19
20 /**
21 * Stores an item to the progress center.
22 * @param {ProgressCenterItem} item Progress center item to be stored.
23 */
24 MockProgressCenter.prototype.updateItem = function(item) {
25 this.items[item.id] = item;
26 };
27
28 /**
29 * Obtains an item stored in the progress center.
30 * @param {string} id ID spcifying the progress item.
31 */
32 MockProgressCenter.prototype.getItemById = function(id) {
33 return this.items[id];
34 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698