| 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 src="../editor/editor-test.js"></script> | 5 <script src="../editor/editor-test.js"></script> |
| 6 <script src="./debugger/resources/edit-me.js"></script> | 6 <script src="./debugger/resources/edit-me.js"></script> |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 function test() | 9 function test() |
| 10 { | 10 { |
| 11 InspectorTest.showScriptSource("edit-me.js", onSourceFrame); | 11 InspectorTest.showScriptSource("edit-me.js", onSourceFrame); |
| 12 | 12 |
| 13 function onSourceFrame(sourceFrame) | 13 function onSourceFrame(sourceFrame) |
| 14 { | 14 { |
| 15 InspectorTest.addSniffer(Sources.JavaScriptCompiler.prototype, "_compila
tionFinishedForTest", onCompilationFinished.bind(null, sourceFrame)); | 15 InspectorTest.addSniffer(Sources.JavaScriptCompiler.prototype, "_compila
tionFinishedForTest", onCompilationFinished.bind(null, sourceFrame)); |
| 16 sourceFrame.textEditor.setSelection(Common.TextRange.createFromLocation(
0, 0)); | 16 sourceFrame.textEditor.setSelection(TextUtils.TextRange.createFromLocati
on(0, 0)); |
| 17 InspectorTest.typeIn(sourceFrame.textEditor, "test!"); | 17 InspectorTest.typeIn(sourceFrame.textEditor, "test!"); |
| 18 } | 18 } |
| 19 | 19 |
| 20 function onCompilationFinished(sourceFrame) | 20 function onCompilationFinished(sourceFrame) |
| 21 { | 21 { |
| 22 InspectorTest.dumpSourceFrameMessages(sourceFrame); | 22 InspectorTest.dumpSourceFrameMessages(sourceFrame); |
| 23 InspectorTest.completeTest(); | 23 InspectorTest.completeTest(); |
| 24 } | 24 } |
| 25 } | 25 } |
| 26 | 26 |
| 27 </script> | 27 </script> |
| 28 | 28 |
| 29 </head> | 29 </head> |
| 30 | 30 |
| 31 <body onload="runTest()"> | 31 <body onload="runTest()"> |
| 32 <p>Verifies proactive javascript compilation.</p> | 32 <p>Verifies proactive javascript compilation.</p> |
| 33 </body> | 33 </body> |
| 34 </html> | 34 </html> |
| OLD | NEW |