| Index: chrome/test/data/file_manager/unit_tests/mocks/mock_progress_center.js
|
| diff --git a/chrome/test/data/file_manager/unit_tests/mocks/mock_progress_center.js b/chrome/test/data/file_manager/unit_tests/mocks/mock_progress_center.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b0570362b7ee621838724b41303e9d77edc71695
|
| --- /dev/null
|
| +++ b/chrome/test/data/file_manager/unit_tests/mocks/mock_progress_center.js
|
| @@ -0,0 +1,34 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +'use strict';
|
| +
|
| +/**
|
| + * Mock of Progress Center.
|
| + * @constructor
|
| + */
|
| +function MockProgressCenter() {
|
| + /**
|
| + * Items stored in the progress center.
|
| + * @type {Object.<string, ProgressCenterItem>}
|
| + */
|
| + this.items = {};
|
| +
|
| + Object.seal(this);
|
| +}
|
| +
|
| +/**
|
| + * Stores an item to the progress center.
|
| + * @param {ProgressCenterItem} item Progress center item to be stored.
|
| + */
|
| +MockProgressCenter.prototype.updateItem = function(item) {
|
| + this.items[item.id] = item;
|
| +};
|
| +
|
| +/**
|
| + * Obtains an item stored in the progress center.
|
| + * @param {string} id ID spcifying the progress item.
|
| + */
|
| +MockProgressCenter.prototype.getItemById = function(id) {
|
| + return this.items[id];
|
| +};
|
|
|