OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
4 <script src="../debugger-test.js"></script> | 4 <script src="../debugger-test.js"></script> |
5 <script src="../console-test.js"></script> | 5 <script src="../console-test.js"></script> |
6 <script src="../isolated-filesystem-test.js"></script> | 6 <script src="../isolated-filesystem-test.js"></script> |
7 <script src="./persistence-test.js"></script> | 7 <script src="./persistence-test.js"></script> |
8 <script src="./resources/foo.js"></script> | 8 <script src="./resources/foo.js"></script> |
9 <script> | 9 <script> |
10 | 10 |
11 function test() | 11 function test() |
12 { | 12 { |
| 13 var testMapping = InspectorTest.initializeTestMapping(); |
13 var fs = new InspectorTest.TestFileSystem("file:///var/www"); | 14 var fs = new InspectorTest.TestFileSystem("file:///var/www"); |
14 InspectorTest.addFooJSFile(fs); | 15 InspectorTest.addFooJSFile(fs); |
15 fs.reportCreated(function() { }); | 16 fs.reportCreated(function() { }); |
16 | 17 |
17 InspectorTest.runTestSuite([ | 18 InspectorTest.runTestSuite([ |
18 function waitForUISourceCodes(next) | 19 function waitForUISourceCodes(next) |
19 { | 20 { |
20 Promise.all([ | 21 Promise.all([ |
21 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp
es.Network) | 22 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp
es.Network) |
22 .then(uiSourceCode => uiSourceCode.setWorkingCopy("dirty."))
, | 23 .then(uiSourceCode => uiSourceCode.setWorkingCopy("dirty."))
, |
23 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp
es.FileSystem) | 24 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp
es.FileSystem) |
24 ]).then(next); | 25 ]).then(next); |
25 }, | 26 }, |
26 | 27 |
27 function addFileSystemMapping(next) | 28 function addFileSystemMapping(next) |
28 { | 29 { |
29 InspectorTest.addSniffer(Persistence.Persistence.prototype, '_preval
idationFailedForTest', onPrevalidationFailed); | 30 InspectorTest.addSniffer(Persistence.Persistence.prototype, '_preval
idationFailedForTest', onPrevalidationFailed); |
30 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http:
//127.0.0.1:8000", "/"); | 31 testMapping.addBinding('foo.js'); |
31 | 32 |
32 function onPrevalidationFailed(binding) | 33 function onPrevalidationFailed(binding) |
33 { | 34 { |
34 InspectorTest.addResult("Failed to create binding: " + binding); | 35 InspectorTest.addResult("Failed to create binding: " + binding); |
35 next(); | 36 next(); |
36 } | 37 } |
37 }, | 38 }, |
38 ]); | 39 ]); |
39 }; | 40 }; |
40 </script> | 41 </script> |
41 </head> | 42 </head> |
42 <body onload="runTest()"> | 43 <body onload="runTest()"> |
43 <p>Verify that dirty uiSourceCodes are not bound.</p> | 44 <p>Verify that dirty uiSourceCodes are not bound.</p> |
44 </body> | 45 </body> |
45 </html> | 46 </html> |
OLD | NEW |