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

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

Issue 98363003: Files.app: Add a unit test of ProgressCenterHandler class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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_file_operation_manager.js
diff --git a/chrome/test/data/file_manager/unit_tests/mocks/mock_file_operation_manager.js b/chrome/test/data/file_manager/unit_tests/mocks/mock_file_operation_manager.js
new file mode 100644
index 0000000000000000000000000000000000000000..6d34d7daabe74af1853ff06c9465ccaf24320476
--- /dev/null
+++ b/chrome/test/data/file_manager/unit_tests/mocks/mock_file_operation_manager.js
@@ -0,0 +1,30 @@
+// 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.
+
+'use strict';
+
+/**
+ * Mock class of FileOperationManager.
+ * @constructor
+ */
+function MockFileOperationManager() {
+ cr.EventTarget.call(this);
+
+ /**
+ * Event to be dispatched when requestTaskCancel is called.
+ * @type {Event}
+ */
+ this.cancelEvent = null;
+}
+
+MockFileOperationManager.prototype = {
+ __proto__: cr.EventTarget.prototype
+};
+
+/**
+ * Dispatches a pre-specified cancel event.
+ */
+MockFileOperationManager.prototype.requestTaskCancel = function() {
+ this.dispatchEvent(this.cancelEvent);
+};

Powered by Google App Engine
This is Rietveld 408576698