| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../http/tests/inspector/debugger-test.js"></script> |
| 5 <script src="../http/tests/inspector/isolated-filesystem-test.js"></script> | 5 <script src="../http/tests/inspector/isolated-filesystem-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 function test() | 7 function test() |
| 8 { | 8 { |
| 9 function fileSystemUISourceCodes() | 9 function fileSystemUISourceCodes() |
| 10 { | 10 { |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 var file = fs.root.mkdir("test").addFile("hello.js", "123456"); | 291 var file = fs.root.mkdir("test").addFile("hello.js", "123456"); |
| 292 fs.reportCreated(function() { }); | 292 fs.reportCreated(function() { }); |
| 293 InspectorTest.waitForScriptSource("hello.js", onUISourceCode); | 293 InspectorTest.waitForScriptSource("hello.js", onUISourceCode); |
| 294 var uiSourceCode; | 294 var uiSourceCode; |
| 295 var originalURL; | 295 var originalURL; |
| 296 function onUISourceCode(sourceCode) | 296 function onUISourceCode(sourceCode) |
| 297 { | 297 { |
| 298 uiSourceCode = sourceCode; | 298 uiSourceCode = sourceCode; |
| 299 originalURL = uiSourceCode.url(); | 299 originalURL = uiSourceCode.url(); |
| 300 InspectorTest.addResult('URL before rename: ' + originalURL); | 300 InspectorTest.addResult('URL before rename: ' + originalURL); |
| 301 uiSourceCode.rename('goodbye.js', renamed); | 301 uiSourceCode.rename('goodbye.js').then(renamed); |
| 302 } | 302 } |
| 303 | 303 |
| 304 function renamed() | 304 function renamed() |
| 305 { | 305 { |
| 306 InspectorTest.addResult('URL after rename: ' + uiSourceCode.url(
)); | 306 InspectorTest.addResult('URL after rename: ' + uiSourceCode.url(
)); |
| 307 if (uiSourceCode.project().workspace().uiSourceCodeForURL(origin
alURL)) | 307 if (uiSourceCode.project().workspace().uiSourceCodeForURL(origin
alURL)) |
| 308 InspectorTest.addResult('ERROR: Still found original URL in
workspace.'); | 308 InspectorTest.addResult('ERROR: Still found original URL in
workspace.'); |
| 309 if (!uiSourceCode.project().workspace().uiSourceCodeForURL(uiSou
rceCode.url())) | 309 if (!uiSourceCode.project().workspace().uiSourceCodeForURL(uiSou
rceCode.url())) |
| 310 InspectorTest.addResult('ERROR: Could not find new URL in wo
rkspace.'); | 310 InspectorTest.addResult('ERROR: Could not find new URL in wo
rkspace.'); |
| 311 next(); | 311 next(); |
| 312 } | 312 } |
| 313 } | 313 } |
| 314 ]); | 314 ]); |
| 315 }; | 315 }; |
| 316 </script> | 316 </script> |
| 317 </head> | 317 </head> |
| 318 <body onload="runTest()"> | 318 <body onload="runTest()"> |
| 319 <p>Tests file system project.</p> | 319 <p>Tests file system project.</p> |
| 320 </body> | 320 </body> |
| 321 </html> | 321 </html> |
| OLD | NEW |