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

Unified Diff: ui/file_manager/file_manager/common/js/mock_entry.js

Issue 945933003: Add support for log file rotation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge w/ master. Created 5 years, 10 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: 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.

Powered by Google App Engine
This is Rietveld 408576698