Chromium Code Reviews| Index: chrome/test/data/file_manager/unit_tests/mocks/mock_folder_shortcut_data_model.js |
| diff --git a/chrome/test/data/file_manager/unit_tests/mocks/mock_folder_shortcut_data_model.js b/chrome/test/data/file_manager/unit_tests/mocks/mock_folder_shortcut_data_model.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d5963c54b378af796f3511d004023ae70b3a6d7d |
| --- /dev/null |
| +++ b/chrome/test/data/file_manager/unit_tests/mocks/mock_folder_shortcut_data_model.js |
| @@ -0,0 +1,25 @@ |
| +// 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. |
| + |
| +/** |
| + * Mock class for FolderShortcutDataModel. |
| + * @inherits {cr.ui.ArrayDataModel} |
|
mtomasz
2013/10/29 07:28:17
nit: @extends
yoshiki
2013/10/31 09:07:23
Done.
|
| + */ |
|
mtomasz
2013/10/29 07:28:17
nit: @constructor missing
yoshiki
2013/10/31 09:07:23
Done.
|
| +function MockFolderShortcutDataModel(var_args) { |
|
mtomasz
2013/10/29 07:28:17
jsdoc missing for var_args
yoshiki
2013/10/31 09:07:23
Done.
|
| + cr.ui.ArrayDataModel.apply(this, arguments); |
| +}; |
|
mtomasz
2013/10/29 07:28:17
nit: ; is redundant after a function() without an
yoshiki
2013/10/31 09:07:23
Done.
|
| + |
| +MockFolderShortcutDataModel.prototype = { |
| + __proto__: cr.ui.ArrayDataModel.prototype, |
|
mtomasz
2013/10/29 07:28:17
nit: , redundant here
yoshiki
2013/10/31 09:07:23
Done.
|
| +}; |
| + |
| +/** |
| + * Mock function for FolderShortcutDataModel.compare(). |
| + * @param {string} a First parameter to be compared. |
| + * @param {string} b Second parameter to be compared with. |
| + * @return {number} Negative if a < b, positive if a > b, or zero if a == b. |
| + */ |
| +MockFolderShortcutDataModel.prototype.compare = function(a, b) { |
| + return a.localeCompare(b); |
| +}; |