| 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 reportCreated: function(callback) | 35 reportCreated: function(callback) |
| 36 { | 36 { |
| 37 var fileSystemPath = this.fileSystemPath; | 37 var fileSystemPath = this.fileSystemPath; |
| 38 InspectorTest.TestFileSystem._instances[this.fileSystemPath] = this; | 38 InspectorTest.TestFileSystem._instances[this.fileSystemPath] = this; |
| 39 InspectorFrontendHost.events.dispatchEventToListeners(InspectorFrontendH
ostAPI.Events.FileSystemAdded, { | 39 InspectorFrontendHost.events.dispatchEventToListeners(InspectorFrontendH
ostAPI.Events.FileSystemAdded, { |
| 40 fileSystem: { fileSystemPath: this.fileSystemPath, | 40 fileSystem: { fileSystemPath: this.fileSystemPath, |
| 41 fileSystemName: this.fileSystemPath } | 41 fileSystemName: this.fileSystemPath } |
| 42 }); | 42 }); |
| 43 | 43 |
| 44 Workspace.isolatedFileSystemManager.addEventListener(Workspace.IsolatedF
ileSystemManager.Events.FileSystemAdded, created); | 44 Persistence.isolatedFileSystemManager.addEventListener(Persistence.Isola
tedFileSystemManager.Events.FileSystemAdded, created); |
| 45 | 45 |
| 46 function created(event) | 46 function created(event) |
| 47 { | 47 { |
| 48 var fileSystem = event.data; | 48 var fileSystem = event.data; |
| 49 if (fileSystem.path() !== fileSystemPath) | 49 if (fileSystem.path() !== fileSystemPath) |
| 50 return; | 50 return; |
| 51 Workspace.isolatedFileSystemManager.removeEventListener(Workspace.Is
olatedFileSystemManager.Events.FileSystemAdded, created); | 51 Persistence.isolatedFileSystemManager.removeEventListener(Persistenc
e.IsolatedFileSystemManager.Events.FileSystemAdded, created); |
| 52 callback(fileSystem); | 52 callback(fileSystem); |
| 53 } | 53 } |
| 54 }, | 54 }, |
| 55 | 55 |
| 56 reportRemoved: function() | 56 reportRemoved: function() |
| 57 { | 57 { |
| 58 delete InspectorTest.TestFileSystem._instances[this.fileSystemPath]; | 58 delete InspectorTest.TestFileSystem._instances[this.fileSystemPath]; |
| 59 InspectorFrontendHost.events.dispatchEventToListeners(InspectorFrontendH
ostAPI.Events.FileSystemRemoved, this.fileSystemPath); | 59 InspectorFrontendHost.events.dispatchEventToListeners(InspectorFrontendH
ostAPI.Events.FileSystemRemoved, this.fileSystemPath); |
| 60 }, | 60 }, |
| 61 | 61 |
| 62 addFileMapping: function(urlPrefix, pathPrefix) | 62 addFileMapping: function(urlPrefix, pathPrefix) |
| 63 { | 63 { |
| 64 var fileSystemMapping = new Persistence.FileSystemMapping(Workspace.isol
atedFileSystemManager); | 64 var fileSystemMapping = new Persistence.FileSystemMapping(Persistence.is
olatedFileSystemManager); |
| 65 fileSystemMapping.addFileSystem(this.fileSystemPath); | 65 fileSystemMapping.addFileSystem(this.fileSystemPath); |
| 66 fileSystemMapping.addFileMapping(this.fileSystemPath, urlPrefix, pathPre
fix); | 66 fileSystemMapping.addFileMapping(this.fileSystemPath, urlPrefix, pathPre
fix); |
| 67 fileSystemMapping.dispose(); | 67 fileSystemMapping.dispose(); |
| 68 Persistence.fileSystemMapping._loadFromSettings(); | 68 Persistence.fileSystemMapping._loadFromSettings(); |
| 69 }, | 69 }, |
| 70 | 70 |
| 71 /** | 71 /** |
| 72 * @param {string} path | 72 * @param {string} path |
| 73 * @param {string} content | 73 * @param {string} content |
| 74 * @param {number} lastModified | 74 * @param {number} lastModified |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 truncate: function(num) | 281 truncate: function(num) |
| 282 { | 282 { |
| 283 this._entry._timestamp += this._modificationTimesDelta; | 283 this._entry._timestamp += this._modificationTimesDelta; |
| 284 this._entry.content = this._entry.content.slice(0, num); | 284 this._entry.content = this._entry.content.slice(0, num); |
| 285 if (this.onwriteend) | 285 if (this.onwriteend) |
| 286 this.onwriteend(); | 286 this.onwriteend(); |
| 287 } | 287 } |
| 288 } | 288 } |
| 289 | 289 |
| 290 }; | 290 }; |
| OLD | NEW |