Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4210)

Unified Diff: chrome/test/data/file_manager/unit_tests/mocks/mock_folder_shortcut_data_model.js

Issue 48623002: [Files.app] Add an unittest of NavigationListModel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
+};

Powered by Google App Engine
This is Rietveld 408576698