Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/compile-javascript.html

Issue 2514323008: DevTools: move message management from UISourceCodeFrame to UISourceCode (Closed)
Patch Set: address comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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(Common.TextRange.createFromLocation( 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 for (var line in sourceFrame._rowMessageBuckets) { 22 for (var bucket of sourceFrame._rowMessageBuckets.values()) {
23 var bubble = sourceFrame._rowMessageBuckets[line]; 23 for (var rowMessage of bucket._messages) {
24 for (var rowMessage of bubble._messages) {
25 var message = rowMessage.message(); 24 var message = rowMessage.message();
26 InspectorTest.addResult(String.sprintf("%d:%d [%s] %s", message. lineNumber(), message.columnNumber(), message.level(), message.text())); 25 InspectorTest.addResult(String.sprintf("%d:%d [%s] %s", message. lineNumber(), message.columnNumber(), message.level(), message.text()));
27 } 26 }
28 } 27 }
29 InspectorTest.completeTest(); 28 InspectorTest.completeTest();
30 } 29 }
31 } 30 }
32 31
33 </script> 32 </script>
34 33
35 </head> 34 </head>
36 35
37 <body onload="runTest()"> 36 <body onload="runTest()">
38 <p>Verifies proactive javascript compilation.</p> 37 <p>Verifies proactive javascript compilation.</p>
39 </body> 38 </body>
40 </html> 39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698