Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/isolated-filesystem-test.js

Issue 2417083002: DevTools: introduce WI.UISourceCode.requestMetadata() (Closed)
Patch Set: normalize test + address nit Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/file-system-project.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/file-system-project.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698