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

Side by Side Diff: LayoutTests/inspector/timeline/timeline-bound-function.html

Issue 399043002: DevTools: switch Timeline frontend into buffered mode and remove the corresponding experiment. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: timeline-websocket-event rebaselined Created 6 years, 4 months 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 | Annotate | Revision Log
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/timeline-test.js"></script> 4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script> 5 <script>
6 6
7 function original() { } 7 function original() { }
8 8
9 function performActions() 9 function performActions()
10 { 10 {
11 var b = document.getElementById("btn"); 11 var b = document.getElementById("btn");
12 var foo = original.bind(); 12 var foo = original.bind();
13 b.onclick = foo; 13 b.onclick = foo;
14 b.click(); 14 b.click();
15 } 15 }
16 16
17 function test() 17 function test()
18 { 18 {
19 InspectorTest.startTimeline(); 19 InspectorTest.evaluateWithTimeline("performActions()", finish);
20 InspectorTest.waitForRecordType("FunctionCall", finish);
21 InspectorTest.evaluateInPage("performActions()");
22 20
23 function finish() 21 function finish()
24 { 22 {
25 function formatter(record) 23 function formatter(record)
26 { 24 {
27 if (record.type === "FunctionCall") { 25 if (record.type === "FunctionCall") {
28 var scriptName = record.data.scriptName; 26 var scriptName = record.data.scriptName;
29 var scriptNameShort = scriptName.substring(scriptName.lastIndexO f("/") + 1); 27 var scriptNameShort = scriptName.substring(scriptName.lastIndexO f("/") + 1);
30 InspectorTest.addResult(record.type + " " + scriptNameShort + ": " + record.data.scriptLine); 28 if (scriptNameShort !== "InjectedScript")
29 InspectorTest.addResult(record.type + " " + scriptNameShort + ":" + record.data.scriptLine);
31 } 30 }
32 } 31 }
33 InspectorTest.printTimelineRecords(null, formatter); 32 InspectorTest.printTimelineRecords(null, formatter);
34 InspectorTest.completeTest(); 33 InspectorTest.completeTest();
35 } 34 }
36 } 35 }
37 36
38 </script> 37 </script>
39 </head> 38 </head>
40 39
41 <body onload="runTest()"> 40 <body onload="runTest()">
42 <p> 41 <p>
43 Tests extracting information about original functions from bound ones 42 Tests extracting information about original functions from bound ones
44 </p> 43 </p>
45 <button id="btn"></button> 44 <button id="btn"></button>
46 </body> 45 </body>
47 </html> 46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698