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

Side by Side Diff: LayoutTests/inspector-protocol/timeline/timeline-start-bufferEvents.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: minor changes Created 6 years, 5 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
(Empty)
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script>
5
6 function testFunction()
7 {
8 console.timeStamp("Timestamp");
9 }
10
11 function test()
12 {
13 InspectorTest.eventHandler["Timeline.eventRecorded"] = eventRecorded;
14 InspectorTest.log("Recording started");
15 InspectorTest.sendCommand("Timeline.start", { bufferEvents: true }, onStart) ;
16
17 function onStart(response)
18 {
19 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "testFunct ion()" }, didEvaluate);
20 }
21
22 function didEvaluate(response)
23 {
24 InspectorTest.sendCommand("Timeline.stop", {}, onStop);
25 }
26
27 function eventRecorded(event)
28 {
29 InspectorTest.log("FAIL: event recorded: " + event.params.record.type);
30 }
31
32 function onStop(response)
33 {
34 InspectorTest.log("Recording stopped");
35 InspectorTest.log("Events:");
36 var events = response.result.events;
37 for (var i = 0; i < events.length; ++i)
38 dump(events[i], "");
39 InspectorTest.completeTest();
40 }
41
42 function dump(event, prefix)
43 {
44 var eventTypes = { "FunctionCall":true, "TimeStamp":true, "TimerInstall" :true, "TimerFire":true };
45 if (event.type in eventTypes)
46 InspectorTest.log(prefix + event.type);
47 for (var i = 0; event.children && i < event.children.length; ++i)
48 dump(event.children[i], " " + prefix);
49 }
50 }
51 </script>
52 </head>
53 <body onLoad="runTest();">
54 </body>
55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698