| Index: third_party/WebKit/LayoutTests/inspector/file-system-project.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/file-system-project.html b/third_party/WebKit/LayoutTests/inspector/file-system-project.html
|
| index 7402cefb61e27da4aaad11a6d392c6851343b506..2f158067f25844e2c08f290d662e3f4d9f84d2ec 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector/file-system-project.html
|
| +++ b/third_party/WebKit/LayoutTests/inspector/file-system-project.html
|
| @@ -211,7 +211,11 @@ function test()
|
| dumpWorkspaceUISourceCodes();
|
|
|
| dir.addFile("bar.js", "");
|
| - InspectorFrontendHost.events.dispatchEventToListeners(InspectorFrontendHostAPI.Events.FileSystemFilesChanged, ["/var/www4/html/bar.js"]);
|
| + InspectorFrontendHost.events.dispatchEventToListeners(InspectorFrontendHostAPI.Events.FileSystemFilesChangedAddedRemoved, {
|
| + changed: [],
|
| + added:["/var/www4/html/bar.js"],
|
| + removed: []
|
| + });
|
|
|
| InspectorTest.addResult("-- File added externally --");
|
| dumpWorkspaceUISourceCodes();
|
| @@ -280,6 +284,33 @@ function test()
|
| InspectorTest.addResult(" modification time: " + metadata.modificationTime.toISOString());
|
| }
|
| },
|
| +
|
| + function testFileRename(next)
|
| + {
|
| + var fs = new InspectorTest.TestFileSystem("file:///var/www3");
|
| + var file = fs.root.mkdir("test").addFile("hello.js", "123456");
|
| + fs.reportCreated(function() { });
|
| + InspectorTest.waitForScriptSource("hello.js", onUISourceCode);
|
| + var uiSourceCode;
|
| + var originalURL;
|
| + function onUISourceCode(sourceCode)
|
| + {
|
| + uiSourceCode = sourceCode;
|
| + originalURL = uiSourceCode.url();
|
| + InspectorTest.addResult('URL before rename: ' + originalURL);
|
| + uiSourceCode.rename('goodbye.js', renamed);
|
| + }
|
| +
|
| + function renamed()
|
| + {
|
| + InspectorTest.addResult('URL after rename: ' + uiSourceCode.url());
|
| + if (uiSourceCode.project().workspace().uiSourceCodeForURL(originalURL))
|
| + InspectorTest.addResult('ERROR: Still found original URL in workspace.');
|
| + if (!uiSourceCode.project().workspace().uiSourceCodeForURL(uiSourceCode.url()))
|
| + InspectorTest.addResult('ERROR: Could not find new URL in workspace.');
|
| + next();
|
| + }
|
| + }
|
| ]);
|
| };
|
| </script>
|
|
|