Index: ui/file_manager/file_manager/common/js/mock_entry.js |
diff --git a/ui/file_manager/file_manager/common/js/mock_entry.js b/ui/file_manager/file_manager/common/js/mock_entry.js |
index 26b9541daed4494141740ac56167db226b46da77..7f3515529380cb33e0652ba7f3bf13b0f86d1c67 100644 |
--- a/ui/file_manager/file_manager/common/js/mock_entry.js |
+++ b/ui/file_manager/file_manager/common/js/mock_entry.js |
@@ -91,6 +91,7 @@ function MockEntry(filesystem, fullPath) { |
filesystem.entries[fullPath] = this; |
this.filesystem = filesystem; |
this.fullPath = fullPath; |
+ this.removed_ = false; |
} |
MockEntry.prototype = { |
@@ -168,12 +169,20 @@ MockEntry.prototype.copyTo = |
* @param {function(Object)} onError Callback invoked with an error object. |
*/ |
MockEntry.prototype.remove = function(onSuccess, onError) { |
+ this.removed_ = true; |
Promise.resolve().then(function() { |
this.filesystem.entries[this.fullPath] = null; |
}.bind(this)).then(onSuccess, onError); |
}; |
/** |
+ * Asserts that the entry was removed. |
+ */ |
+MockEntry.prototype.assertRemoved = function() { |
+ assertTrue(this.removed_); |
+}; |
+ |
+/** |
* Clones the entry with the new fullpath. |
* |
* @param {string} fullpath New fullpath. |