| 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 function test() |
| 10 { |
| 11 var foo_js = { |
| 12 content: "console.log('foo.js!');", |
| 13 time: new Date("December 1, 1989") |
| 14 }; |
| 15 |
| 16 var automappingTest = new InspectorTest.AutomappingTest(new WebInspector.Wor
kspace()); |
| 17 var fs = new InspectorTest.TestFileSystem("file:///var/www"); |
| 18 fs.reportCreated(onFileSystemCreated); |
| 19 |
| 20 function onFileSystemCreated() |
| 21 { |
| 22 InspectorTest.runTestSuite(tests); |
| 23 } |
| 24 |
| 25 var tests = [ |
| 26 function addNetworkResource(next) |
| 27 { |
| 28 automappingTest.addNetworkResources({ |
| 29 "http://example.com/path/foo.js": foo_js, |
| 30 }); |
| 31 automappingTest.waitUntilMappingIsStabilized(next); |
| 32 }, |
| 33 |
| 34 function addFileSystemUISourceCode(next) |
| 35 { |
| 36 InspectorTest.addFiles(fs, { |
| 37 "scripts/foo.js": foo_js, |
| 38 }); |
| 39 automappingTest.waitUntilMappingIsStabilized(next); |
| 40 }, |
| 41 |
| 42 function removeNetworkUISourceCode(next) |
| 43 { |
| 44 automappingTest.removeResources(["http://example.com/path/foo.js"]); |
| 45 automappingTest.waitUntilMappingIsStabilized(next); |
| 46 }, |
| 47 |
| 48 function reAddNetworkUISourceCode(next) |
| 49 { |
| 50 automappingTest.addNetworkResources({ |
| 51 // Make sure simple resource gets mapped. |
| 52 "http://example.com/path/foo.js": foo_js, |
| 53 }); |
| 54 automappingTest.waitUntilMappingIsStabilized(next); |
| 55 }, |
| 56 |
| 57 function removeFileSystem(next) |
| 58 { |
| 59 fs.reportRemoved(); |
| 60 automappingTest.waitUntilMappingIsStabilized(next); |
| 61 }, |
| 62 ]; |
| 63 } |
| 64 </script> |
| 65 </head> |
| 66 <body onload="runTest()"> |
| 67 <p>Verify that automapping works property when UISourceCodes come and go.</p> |
| 68 </body> |
| 69 </html> |
| OLD | NEW |