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..ec1a43cb0c1353022abfec1e01189e34f3e68977 |
--- /dev/null |
+++ b/chrome/test/data/file_manager/unit_tests/mocks/mock_folder_shortcut_data_model.js |
@@ -0,0 +1,27 @@ |
+// 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. |
+ * @param {...string} var_args List of the initial shortcuts. |
+ * @extends {cr.ui.ArrayDataModel} |
+ * @constructor |
+ */ |
+function MockFolderShortcutDataModel(var_args) { |
+ cr.ui.ArrayDataModel.apply(this, arguments); |
+} |
+ |
+MockFolderShortcutDataModel.prototype = { |
+ __proto__: cr.ui.ArrayDataModel.prototype |
+}; |
+ |
+/** |
+ * 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); |
+}; |