| OLD | NEW |
| 1 var initialize_IsolatedFileSystemTest = function() { | 1 var initialize_IsolatedFileSystemTest = function() { |
| 2 | 2 |
| 3 InspectorFrontendHost.isolatedFileSystem = function(name) | 3 InspectorFrontendHost.isolatedFileSystem = function(name) |
| 4 { | 4 { |
| 5 return InspectorTest.TestFileSystem._instances[name]; | 5 return InspectorTest.TestFileSystem._instances[name]; |
| 6 } | 6 } |
| 7 | 7 |
| 8 InspectorTest.TestFileSystem = function(fileSystemPath) | 8 InspectorTest.TestFileSystem = function(fileSystemPath) |
| 9 { | 9 { |
| 10 this.root = new InspectorTest.TestFileSystem.Entry(this, "", true, null); | 10 this.root = new InspectorTest.TestFileSystem.Entry(this, "", true, null); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 { | 207 { |
| 208 success({ | 208 success({ |
| 209 modificationTime: new Date(this._timestamp), | 209 modificationTime: new Date(this._timestamp), |
| 210 size: this.isDirectory ? 0 : this.content.size | 210 size: this.isDirectory ? 0 : this.content.size |
| 211 }); | 211 }); |
| 212 }, | 212 }, |
| 213 | 213 |
| 214 moveTo: function(parent, newName, callback, errorCallback) | 214 moveTo: function(parent, newName, callback, errorCallback) |
| 215 { | 215 { |
| 216 this._parent._children.remove(this); | 216 this._parent._children.remove(this); |
| 217 delete this._parent._childrenMap[this.name] |
| 217 this._parent = parent; | 218 this._parent = parent; |
| 218 this._parent._children.push(this); | 219 this._parent._children.push(this); |
| 219 this.name = newName; | 220 this.name = newName; |
| 221 this._parent._childrenMap[this.name] = this; |
| 220 callback(this); | 222 callback(this); |
| 221 }, | 223 }, |
| 222 | 224 |
| 223 getParent: function(callback, errorCallback) | 225 getParent: function(callback, errorCallback) |
| 224 { | 226 { |
| 225 callback(this._parent); | 227 callback(this._parent); |
| 226 } | 228 } |
| 227 } | 229 } |
| 228 | 230 |
| 229 InspectorTest.TestFileSystem.Reader = function(children) | 231 InspectorTest.TestFileSystem.Reader = function(children) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 258 truncate: function(num) | 260 truncate: function(num) |
| 259 { | 261 { |
| 260 this._entry._timestamp += this._modificationTimesDelta; | 262 this._entry._timestamp += this._modificationTimesDelta; |
| 261 this._entry.content = this._entry.content.slice(0, num); | 263 this._entry.content = this._entry.content.slice(0, num); |
| 262 if (this.onwriteend) | 264 if (this.onwriteend) |
| 263 this.onwriteend(); | 265 this.onwriteend(); |
| 264 } | 266 } |
| 265 } | 267 } |
| 266 | 268 |
| 267 }; | 269 }; |
| OLD | NEW |