3 <script type=
"text/javascript" src=
"../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
9 InspectorTest
.eventHandler
["Timeline.eventRecorded"] = eventRecorded
;
11 InspectorTest
.sendCommand("Timeline.start", {}, timelineStarted
);
13 function timelineStarted()
15 log
.push("Timeline started");
16 InspectorTest
.sendCommand("Page.enable", {}, pageAgentEnabled
);
19 function pageAgentEnabled()
21 log
.push("Page enabled");
22 InspectorTest
.sendCommand("Page.disable", {}, pageAgentDisabled
);
25 function pageAgentDisabled()
27 log
.push("Page disabled");
28 InspectorTest
.sendCommand("NotExistingCommand", {}, didRoundTripOverProtocol
);
31 function didRoundTripOverProtocol()
33 InspectorTest
.sendCommand("Timeline.stop", {}, timelineStopped
);
36 function timelineStopped(next
)
38 log
.push("Timeline stopped");
39 for (var i
= 0; i
< log
.length
; ++i
)
40 InspectorTest
.log(log
[i
]);
41 InspectorTest
.completeTest();
44 function eventRecorded(msg
)
46 if (msg
.params
.record
.type
=== "Program") {
47 var children
= msg
.params
.record
.children
;
48 for (var i
= 0; i
< children
.length
; ++i
) {
49 var record
= children
[i
];
50 if (record
.type
=== "GCEvent")
52 log
.push("Timeline.eventRecorded: " + record
.type
);
56 InspectorTest
.log("FAIL: Unexpected records arrived");
57 InspectorTest
.logObject(msg
);
62 <link href=
"resources/style.css" rel=
"stylesheet">
64 <body onload=
"runTest()">