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.
6 * Mock class for FolderShortcutDataModel.
7 * @param {...MockEntry} var_args List of the initial shortcuts.
8 * @extends {cr.ui.ArrayDataModel}
11 function MockFolderShortcutDataModel(var_args) {
12 cr.ui.ArrayDataModel.apply(this, arguments);
15 MockFolderShortcutDataModel.prototype = {
16 __proto__: cr.ui.ArrayDataModel.prototype
20 * Mock function for FolderShortcutDataModel.compare().
21 * @param {MockEntry} a First parameter to be compared.
22 * @param {MockEntry} b Second parameter to be compared with.
23 * @return {number} Negative if a < b, positive if a > b, or zero if a == b.
25 MockFolderShortcutDataModel.prototype.compare = function(a, b) {
26 return a.fullPath.localeCompare(b.fullPath);