| 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="../isolated-filesystem-test.js"></script> | 5 <script src="../isolated-filesystem-test.js"></script> |
| 6 <script src="./persistence-test.js"></script> | 6 <script src="./persistence-test.js"></script> |
| 7 <script src="./resources/foo.js"></script> | 7 <script src="./resources/foo.js"></script> |
| 8 <script> | 8 <script> |
| 9 | 9 |
| 10 function test() | 10 function test() |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten
tSyncedForTest", dumpWorkingCopiesAndNext.bind(null, next)); | 39 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten
tSyncedForTest", dumpWorkingCopiesAndNext.bind(null, next)); |
| 40 fsEntry.setContent("window.foo3 = 3;"); | 40 fsEntry.setContent("window.foo3 = 3;"); |
| 41 }, | 41 }, |
| 42 | 42 |
| 43 function addFileSystemWorkingCopy(next) | 43 function addFileSystemWorkingCopy(next) |
| 44 { | 44 { |
| 45 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten
tSyncedForTest", dumpWorkingCopiesAndNext.bind(null, next)); | 45 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten
tSyncedForTest", dumpWorkingCopiesAndNext.bind(null, next)); |
| 46 fileSystemCode.setWorkingCopy("window.foo4 = 4;"); | 46 fileSystemCode.setWorkingCopy("window.foo4 = 4;"); |
| 47 }, | 47 }, |
| 48 | 48 |
| 49 function resetFileSystemWorkingCopy(next) |
| 50 { |
| 51 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten
tSyncedForTest", dumpWorkingCopiesAndNext.bind(null, next)); |
| 52 fileSystemCode.resetWorkingCopy(); |
| 53 }, |
| 54 |
| 49 function setNetworkRevision(next) | 55 function setNetworkRevision(next) |
| 50 { | 56 { |
| 51 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten
tSyncedForTest", dumpWorkingCopiesAndNext.bind(null, next)); | 57 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten
tSyncedForTest", dumpWorkingCopiesAndNext.bind(null, next)); |
| 52 networkCode.addRevision("window.foo2 = 2;"); | 58 networkCode.addRevision("window.foo2 = 2;"); |
| 53 }, | 59 }, |
| 54 | 60 |
| 55 function setNetworkWorkingCopy(next) | 61 function setNetworkWorkingCopy(next) |
| 56 { | 62 { |
| 57 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten
tSyncedForTest", dumpWorkingCopiesAndNext.bind(null, next)); | 63 InspectorTest.addSniffer(Persistence.Persistence.prototype, "_conten
tSyncedForTest", dumpWorkingCopiesAndNext.bind(null, next)); |
| 58 networkCode.setWorkingCopy("window.foo5 = 5;"); | 64 networkCode.setWorkingCopy("window.foo5 = 5;"); |
| 59 }, | 65 }, |
| 60 ]); | 66 ]); |
| 61 | 67 |
| 62 function dumpWorkingCopiesAndNext(next) { | 68 function dumpWorkingCopiesAndNext(next) { |
| 63 InspectorTest.addResult(`network code: '${networkCode.workingCopy()}'`); | 69 InspectorTest.addResult(`network code: '${networkCode.workingCopy()}'`); |
| 64 InspectorTest.addResult(`fileSystem code: '${fileSystemCode.workingCopy(
)}'`); | 70 InspectorTest.addResult(`fileSystem code: '${fileSystemCode.workingCopy(
)}'`); |
| 65 next(); | 71 next(); |
| 66 } | 72 } |
| 67 }; | 73 }; |
| 68 </script> | 74 </script> |
| 69 </head> | 75 </head> |
| 70 <body onload="runTest()"> | 76 <body onload="runTest()"> |
| 71 <p>Tests that persistence syncs network and filesystem UISourceCodes.</p> | 77 <p>Tests that persistence syncs network and filesystem UISourceCodes.</p> |
| 72 </body> | 78 </body> |
| 73 </html> | 79 </html> |
| OLD | NEW |