3 <script type=
"text/javascript" src=
"../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
11 function messageAdded(data
)
13 var payload
= data
.params
.message
;
15 if (messages
.length
> 0)
16 InspectorTest
.log("Message " + messages
.length
+ " has non-decreasing timestamp: " + (payload
.timestamp
>= messages
[messages
.length
- 1].timestamp
));
18 messages
.push(payload
);
19 InspectorTest
.log("Message has timestamp: " + !!payload
.timestamp
);
21 InspectorTest
.log("Message timestamp doesn't differ too much from current time (one minute interval): " + (Math
.abs(new Date().getTime() / 1000 - payload
.timestamp
) < 60));
22 if (messages
.length
=== 3)
23 InspectorTest
.completeTest();
26 InspectorTest
.eventHandler
["Console.messageAdded"] = messageAdded
;
27 InspectorTest
.sendCommand("Console.enable", {});
29 InspectorTest
.sendCommand("Runtime.evaluate", { expression
: "console.log('testUnique'); for (var i = 0; i < 2; ++i) console.log('testDouble');" });
34 <body onload=
"runTest()">