| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | |
| 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | |
| 5 <script> | |
| 6 function startWorker() | |
| 7 { | |
| 8 var workerScript = "postMessage('Done.');"; | |
| 9 var blob = new Blob([workerScript], { type: "text/javascript" }); | |
| 10 var worker = new Worker(URL.createObjectURL(blob)); | |
| 11 } | |
| 12 | |
| 13 function test() | |
| 14 { | |
| 15 var uiSourceCode; | |
| 16 | |
| 17 window.confirm = confirmOverride; | |
| 18 | |
| 19 Snippets.scriptSnippetModel.project().createFile("", null, "", onCreated.bin
d(this)); | |
| 20 function onCreated(usc) | |
| 21 { | |
| 22 uiSourceCode = usc; | |
| 23 uiSourceCode.requestContent().then(onContentAvailable); | |
| 24 } | |
| 25 | |
| 26 function onContentAvailable() | |
| 27 { | |
| 28 uiSourceCode.setWorkingCopy("var a = 0;"); | |
| 29 uiSourceCode.checkContentUpdated(true, onUpdated); | |
| 30 } | |
| 31 | |
| 32 function confirmOverride() | |
| 33 { | |
| 34 InspectorTest.addResult("FAILED: confirmation dialog appeared"); | |
| 35 } | |
| 36 | |
| 37 function onUpdated() | |
| 38 { | |
| 39 InspectorTest.completeTest(); | |
| 40 } | |
| 41 } | |
| 42 </script> | |
| 43 </head> | |
| 44 <body onload="runTest()"> | |
| 45 <p>Tests that checking content on the dirty snippet does not wipe it out.</p> | |
| 46 </body> | |
| 47 </html> | |
| OLD | NEW |