| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 this._childrenMap[name] = child; | 102 this._childrenMap[name] = child; |
| 103 this._children.push(child); | 103 this._children.push(child); |
| 104 child.parent = this; | 104 child.parent = this; |
| 105 child.content = new Blob([content], {type: 'text/plain'}); | 105 child.content = new Blob([content], {type: 'text/plain'}); |
| 106 return child; | 106 return child; |
| 107 }, | 107 }, |
| 108 | 108 |
| 109 setContent: function(content) | 109 setContent: function(content) |
| 110 { | 110 { |
| 111 this.content = new Blob([content], {type: 'text/plain'}); | 111 this.content = new Blob([content], {type: 'text/plain'}); |
| 112 this._timestamp += 1000; |
| 112 var fullPath = this._fileSystem.fileSystemPath + this.fullPath; | 113 var fullPath = this._fileSystem.fileSystemPath + this.fullPath; |
| 113 InspectorFrontendHost.events.dispatchEventToListeners(InspectorFrontendH
ostAPI.Events.FileSystemFilesChanged, [fullPath]); | 114 InspectorFrontendHost.events.dispatchEventToListeners(InspectorFrontendH
ostAPI.Events.FileSystemFilesChanged, [fullPath]); |
| 114 }, | 115 }, |
| 115 | 116 |
| 116 createReader: function() | 117 createReader: function() |
| 117 { | 118 { |
| 118 return new InspectorTest.TestFileSystem.Reader(this._children); | 119 return new InspectorTest.TestFileSystem.Reader(this._children); |
| 119 }, | 120 }, |
| 120 | 121 |
| 121 createWriter: function(success, failure) | 122 createWriter: function(success, failure) |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 truncate: function(num) | 208 truncate: function(num) |
| 208 { | 209 { |
| 209 this._entry._timestamp += this._modificationTimesDelta; | 210 this._entry._timestamp += this._modificationTimesDelta; |
| 210 this._entry.content = this._entry.content.slice(0, num); | 211 this._entry.content = this._entry.content.slice(0, num); |
| 211 if (this.onwriteend) | 212 if (this.onwriteend) |
| 212 this.onwriteend(); | 213 this.onwriteend(); |
| 213 } | 214 } |
| 214 } | 215 } |
| 215 | 216 |
| 216 }; | 217 }; |
| OLD | NEW |