3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/debugger-test.js"></script>
5 <script src=
"../editor/editor-test.js"></script>
6 <script src=
"./debugger/resources/edit-me.js"></script>
11 InspectorTest
.showScriptSource("edit-me.js", onSourceFrame
);
13 function onSourceFrame(sourceFrame
)
15 InspectorTest
.addSniffer(WebInspector
.JavaScriptCompiler
.prototype, "_compilationFinishedForTest", onCompilationFinished
.bind(null, sourceFrame
));
16 sourceFrame
.textEditor
.setSelection(WebInspector
.TextRange
.createFromLocation(0, 0));
17 InspectorTest
.typeIn(sourceFrame
.textEditor
, "test!");
20 function onCompilationFinished(sourceFrame
)
22 for (var line
in sourceFrame
._rowMessageBuckets
) {
23 var bubble
= sourceFrame
._rowMessageBuckets
[line
];
24 for (var rowMessage
of bubble
._messages
) {
25 var message
= rowMessage
.message();
26 InspectorTest
.addResult(String
.sprintf("%d:%d [%s] %s", message
.lineNumber(), message
.columnNumber(), message
.level(), message
.messageText()));
29 InspectorTest
.completeTest();
37 <body onload=
"runTest()">
38 <p>Verifies proactive javascript compilation.
</p>