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

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

Issue 432753003: DevTools: Fix url assignment when renaming files in workspace (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added a test and fixed correctly Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/workspace-test.js » ('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 InspectorTest.createIsolatedFileSystemManager = function(workspace, fileSystemMa pping) 3 InspectorTest.createIsolatedFileSystemManager = function(workspace, fileSystemMa pping)
4 { 4 {
5 var manager = new MockIsolatedFileSystemManager(); 5 var manager = new MockIsolatedFileSystemManager();
6 manager.fileSystemWorkspaceBinding = new WebInspector.FileSystemWorkspaceBin ding(manager, workspace); 6 manager.fileSystemWorkspaceBinding = new WebInspector.FileSystemWorkspaceBin ding(manager, workspace);
7 manager.fileSystemMapping = fileSystemMapping; 7 manager.fileSystemMapping = fileSystemMapping;
8 return manager; 8 return manager;
9 } 9 }
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 }, 50 },
51 51
52 requestFilesRecursive: function(path, callback) 52 requestFilesRecursive: function(path, callback)
53 { 53 {
54 this._callback = callback; 54 this._callback = callback;
55 if (!this._files) 55 if (!this._files)
56 return; 56 return;
57 this._innerRequestFilesRecursive(); 57 this._innerRequestFilesRecursive();
58 }, 58 },
59 59
60 renameFile: function(filePath, newName, callback)
61 {
62 callback(true, newName);
63 },
64
60 _innerRequestFilesRecursive: function() 65 _innerRequestFilesRecursive: function()
61 { 66 {
62 if (!this._callback) 67 if (!this._callback)
63 return; 68 return;
64 var files = Object.keys(this._files); 69 var files = Object.keys(this._files);
65 for (var i = 0; i < files.length; ++i) { 70 for (var i = 0; i < files.length; ++i) {
66 var isExcluded = false; 71 var isExcluded = false;
67 for (var j = 0; j < files[i].length; ++j) { 72 for (var j = 0; j < files[i].length; ++j) {
68 if (files[i][j] === "/") { 73 if (files[i][j] === "/") {
69 if (this._manager.mapping().isFileExcluded(this._path, files [i].substr(0, j + 1))) 74 if (this._manager.mapping().isFileExcluded(this._path, files [i].substr(0, j + 1)))
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 WebInspector.isolatedFileSystemManager._onFileSystemAdded({data: {fileSystem : fileSystem}}); 137 WebInspector.isolatedFileSystemManager._onFileSystemAdded({data: {fileSystem : fileSystem}});
133 return MockIsolatedFileSystem._isolatedFileSystemMocks[path]; 138 return MockIsolatedFileSystem._isolatedFileSystemMocks[path];
134 } 139 }
135 140
136 InspectorTest.addFilesToMockFileSystem = function(path, files) 141 InspectorTest.addFilesToMockFileSystem = function(path, files)
137 { 142 {
138 MockIsolatedFileSystem._isolatedFileSystemMocks[path]._addFiles(files); 143 MockIsolatedFileSystem._isolatedFileSystemMocks[path]._addFiles(files);
139 } 144 }
140 145
141 }; 146 };
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/workspace-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698