| Index: ui/file_manager/file_manager/common/js/unittest_util.js
|
| diff --git a/ui/file_manager/file_manager/common/js/unittest_util.js b/ui/file_manager/file_manager/common/js/unittest_util.js
|
| index a61fe34b8e1241058187746a1bf28241489ca00d..7f0b0cf9a2bba1b78d8e80badc907ff28fe95763 100644
|
| --- a/ui/file_manager/file_manager/common/js/unittest_util.js
|
| +++ b/ui/file_manager/file_manager/common/js/unittest_util.js
|
| @@ -233,3 +233,28 @@ MockChromeStorageAPI.prototype.set_ = function(values, opt_callback) {
|
| if (opt_callback)
|
| opt_callback();
|
| };
|
| +
|
| +/**
|
| + * Mocks chrome.commandLinePrivate.
|
| + * @constructor
|
| + */
|
| +function MockCommandLinePrivate() {
|
| + this.flags_ = {};
|
| + if (!chrome) {
|
| + chrome = {};
|
| + }
|
| + if (!chrome.commandLinePrivate) {
|
| + chrome.commandLinePrivate = {};
|
| + }
|
| + chrome.commandLinePrivate.hasSwitch = function(name, callback) {
|
| + callback(name in this.flags_);
|
| + }.bind(this);
|
| +}
|
| +
|
| +/**
|
| + * Add a switch.
|
| + * @param {string} name of the switch to add.
|
| + */
|
| +MockCommandLinePrivate.prototype.addSwitch = function(name) {
|
| + this.flags_[name] = true;
|
| +};
|
|
|