| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function startWorker() | 6 function startWorker() |
| 7 { | 7 { |
| 8 var workerScript = "postMessage('Done.');"; | 8 var workerScript = "postMessage('Done.');"; |
| 9 var blob = new Blob([workerScript], { type: "text/javascript" }); | 9 var blob = new Blob([workerScript], { type: "text/javascript" }); |
| 10 var worker = new Worker(URL.createObjectURL(blob)); | 10 var worker = new Worker(URL.createObjectURL(blob)); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 } | 274 } |
| 275 | 275 |
| 276 function step2(uiSourceCode) | 276 function step2(uiSourceCode) |
| 277 { | 277 { |
| 278 uiSourceCode.rename("Snippet1", function() { }); | 278 uiSourceCode.rename("Snippet1", function() { }); |
| 279 var content = "2+2;\n"; | 279 var content = "2+2;\n"; |
| 280 uiSourceCode.setWorkingCopy(content); | 280 uiSourceCode.setWorkingCopy(content); |
| 281 evaluateSnippetAndDumpEvaluationDetails(uiSourceCode, context, n
ext); | 281 evaluateSnippetAndDumpEvaluationDetails(uiSourceCode, context, n
ext); |
| 282 } | 282 } |
| 283 }, | 283 }, |
| 284 |
| 285 function testDangerousNames(next) |
| 286 { |
| 287 resetSnippetsSettings(); |
| 288 |
| 289 WebInspector.scriptSnippetModel.project().createFile("", null, "", s
tep2.bind(this)); |
| 290 |
| 291 function step2(uiSourceCode) |
| 292 { |
| 293 uiSourceCode.rename("toString", function() { }); |
| 294 InspectorTest.showUISourceCode(uiSourceCode,step3.bind(this)); |
| 295 } |
| 296 |
| 297 function step3() |
| 298 { |
| 299 WebInspector.scriptSnippetModel.project().createFile("", null, "
", step4.bind(this)); |
| 300 } |
| 301 |
| 302 function step4(uiSourceCode) |
| 303 { |
| 304 uiSourceCode.rename("myfile.toString", function() { }); |
| 305 InspectorTest.showUISourceCode(uiSourceCode,next); |
| 306 } |
| 307 } |
| 284 ]); | 308 ]); |
| 285 }; | 309 }; |
| 286 </script> | 310 </script> |
| 287 </head> | 311 </head> |
| 288 <body onload="runTest()"> | 312 <body onload="runTest()"> |
| 289 <p>Tests script snippet model.</p> | 313 <p>Tests script snippet model.</p> |
| 290 </body> | 314 </body> |
| 291 </html> | 315 </html> |
| OLD | NEW |