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

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

Issue 2530483002: DevTools: teach UISourceCodeFrame to merge messages (Closed)
Patch Set: improve test 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 bucket of sourceFrame._rowMessageBuckets.values()) { 22 InspectorTest.dumpSourceFrameMessages(sourceFrame);
23 for (var rowMessage of bucket._messages) {
24 var message = rowMessage.message();
25 InspectorTest.addResult(String.sprintf("%d:%d [%s] %s", message. lineNumber(), message.columnNumber(), message.level(), message.text()));
26 }
27 }
28 InspectorTest.completeTest(); 23 InspectorTest.completeTest();
29 } 24 }
30 } 25 }
31 26
32 </script> 27 </script>
33 28
34 </head> 29 </head>
35 30
36 <body onload="runTest()"> 31 <body onload="runTest()">
37 <p>Verifies proactive javascript compilation.</p> 32 <p>Verifies proactive javascript compilation.</p>
38 </body> 33 </body>
39 </html> 34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698