| 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 10 matching lines...) Expand all Loading... |
| 21 return result.join('\n'); | 21 return result.join('\n'); |
| 22 | 22 |
| 23 function dfs(node, indent) { | 23 function dfs(node, indent) { |
| 24 result.push(indent + node.name); | 24 result.push(indent + node.name); |
| 25 var newIndent = indent + ' '; | 25 var newIndent = indent + ' '; |
| 26 for (var child of node._children) | 26 for (var child of node._children) |
| 27 dfs(child, newIndent); | 27 dfs(child, newIndent); |
| 28 } | 28 } |
| 29 }, | 29 }, |
| 30 | 30 |
| 31 reportCreatedPromise: function() { |
| 32 return new Promise(fulfill => this.reportCreated(fulfill)); |
| 33 }, |
| 34 |
| 31 reportCreated: function(callback) | 35 reportCreated: function(callback) |
| 32 { | 36 { |
| 33 var fileSystemPath = this.fileSystemPath; | 37 var fileSystemPath = this.fileSystemPath; |
| 34 InspectorTest.TestFileSystem._instances[this.fileSystemPath] = this; | 38 InspectorTest.TestFileSystem._instances[this.fileSystemPath] = this; |
| 35 InspectorFrontendHost.events.dispatchEventToListeners(InspectorFrontendH
ostAPI.Events.FileSystemAdded, { | 39 InspectorFrontendHost.events.dispatchEventToListeners(InspectorFrontendH
ostAPI.Events.FileSystemAdded, { |
| 36 fileSystem: { fileSystemPath: this.fileSystemPath, | 40 fileSystem: { fileSystemPath: this.fileSystemPath, |
| 37 fileSystemName: this.fileSystemPath } | 41 fileSystemName: this.fileSystemPath } |
| 38 }); | 42 }); |
| 39 | 43 |
| 40 Workspace.isolatedFileSystemManager.addEventListener(Workspace.IsolatedF
ileSystemManager.Events.FileSystemAdded, created); | 44 Workspace.isolatedFileSystemManager.addEventListener(Workspace.IsolatedF
ileSystemManager.Events.FileSystemAdded, created); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 truncate: function(num) | 258 truncate: function(num) |
| 255 { | 259 { |
| 256 this._entry._timestamp += this._modificationTimesDelta; | 260 this._entry._timestamp += this._modificationTimesDelta; |
| 257 this._entry.content = this._entry.content.slice(0, num); | 261 this._entry.content = this._entry.content.slice(0, num); |
| 258 if (this.onwriteend) | 262 if (this.onwriteend) |
| 259 this.onwriteend(); | 263 this.onwriteend(); |
| 260 } | 264 } |
| 261 } | 265 } |
| 262 | 266 |
| 263 }; | 267 }; |
| OLD | NEW |