| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../inspector-test.js"></script> |
| 4 <script src="../isolated-filesystem-test.js"></script> |
| 5 <script src="./persistence-test.js"></script> |
| 6 <script src="./automapping-test.js"></script> |
| 7 <script> |
| 8 |
| 9 async function test() |
| 10 { |
| 11 // Disable default-running automapping so that it doesn't conflict |
| 12 // with AutomappingTest. |
| 13 InspectorTest.initializeTestMapping(); |
| 14 |
| 15 var foo_js = { |
| 16 content: "console.log('foo.js!');", |
| 17 time: null |
| 18 }; |
| 19 |
| 20 var automappingTest = new InspectorTest.AutomappingTest(Workspace.workspace)
; |
| 21 automappingTest.addNetworkResources({ |
| 22 "http://example.com/path/foo.js": foo_js, |
| 23 }); |
| 24 |
| 25 var fs = new InspectorTest.TestFileSystem("file:///var/www"); |
| 26 InspectorTest.addFiles(fs, { |
| 27 "scripts/foo.js": foo_js, |
| 28 }); |
| 29 await new Promise(fulfill => fs.reportCreated(fulfill)); |
| 30 |
| 31 await automappingTest.waitUntilMappingIsStabilized(); |
| 32 |
| 33 InspectorTest.markStep('Rename foo.js => bar.js'); |
| 34 var fileUISourceCode = await InspectorTest.waitForUISourceCode('foo.js', Wor
kspace.projectTypes.FileSystem); |
| 35 await fileUISourceCode.rename('bar.js'); |
| 36 await automappingTest.waitUntilMappingIsStabilized(); |
| 37 |
| 38 InspectorTest.markStep('Rename bar.js => foo.js'); |
| 39 fileUISourceCode.rename('foo.js'); |
| 40 await automappingTest.waitUntilMappingIsStabilized(); |
| 41 |
| 42 InspectorTest.completeTest(); |
| 43 } |
| 44 </script> |
| 45 </head> |
| 46 <body onload="runTest()"> |
| 47 <p>Verify that automapping is sane.</p> |
| 48 </body> |
| 49 </html> |
| OLD | NEW |