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 25 matching lines...) Expand all Loading... |
36 }, | 36 }, |
37 | 37 |
38 reportRemoved: function() | 38 reportRemoved: function() |
39 { | 39 { |
40 delete InspectorTest.TestFileSystem._instances[this.fileSystemPath]; | 40 delete InspectorTest.TestFileSystem._instances[this.fileSystemPath]; |
41 InspectorFrontendHost.events.dispatchEventToListeners(InspectorFrontendH
ostAPI.Events.FileSystemRemoved, this.fileSystemPath); | 41 InspectorFrontendHost.events.dispatchEventToListeners(InspectorFrontendH
ostAPI.Events.FileSystemRemoved, this.fileSystemPath); |
42 }, | 42 }, |
43 | 43 |
44 addFileMapping: function(urlPrefix, pathPrefix) | 44 addFileMapping: function(urlPrefix, pathPrefix) |
45 { | 45 { |
46 var fileSystemMapping = new Workspace.FileSystemMapping(Workspace.isolat
edFileSystemManager); | 46 var fileSystemMapping = new Persistence.FileSystemMapping(Workspace.isol
atedFileSystemManager); |
47 fileSystemMapping.addFileSystem(this.fileSystemPath); | 47 fileSystemMapping.addFileSystem(this.fileSystemPath); |
48 fileSystemMapping.addFileMapping(this.fileSystemPath, urlPrefix, pathPre
fix); | 48 fileSystemMapping.addFileMapping(this.fileSystemPath, urlPrefix, pathPre
fix); |
49 fileSystemMapping.dispose(); | 49 fileSystemMapping.dispose(); |
50 Workspace.fileSystemMapping._loadFromSettings(); | 50 Persistence.fileSystemMapping._loadFromSettings(); |
51 }, | 51 }, |
52 | 52 |
53 /** | 53 /** |
54 * @param {string} path | 54 * @param {string} path |
55 * @param {string} content | 55 * @param {string} content |
56 * @param {number} lastModified | 56 * @param {number} lastModified |
57 */ | 57 */ |
58 addFile: function(path, content, lastModified) | 58 addFile: function(path, content, lastModified) |
59 { | 59 { |
60 var pathTokens = path.split("/"); | 60 var pathTokens = path.split("/"); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 truncate: function(num) | 234 truncate: function(num) |
235 { | 235 { |
236 this._entry._timestamp += this._modificationTimesDelta; | 236 this._entry._timestamp += this._modificationTimesDelta; |
237 this._entry.content = this._entry.content.slice(0, num); | 237 this._entry.content = this._entry.content.slice(0, num); |
238 if (this.onwriteend) | 238 if (this.onwriteend) |
239 this.onwriteend(); | 239 this.onwriteend(); |
240 } | 240 } |
241 } | 241 } |
242 | 242 |
243 }; | 243 }; |
OLD | NEW |