| Index: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-timestamp.js
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-timestamp.js b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-timestamp.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8c523c3920f618db6c7a6518e0773e1eb7e0ed32
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-timestamp.js
|
| @@ -0,0 +1,17 @@
|
| +(async function(testRunner) {
|
| + let {page, session, dp} = await testRunner.startBlank(``);
|
| +
|
| + var messages = [];
|
| + dp.Runtime.onConsoleAPICalled(data => {
|
| + var payload = data.params;
|
| + if (messages.length > 0)
|
| + testRunner.log('Message ' + messages.length + ' has non-decreasing timestamp: ' + (payload.timestamp >= messages[messages.length - 1].timestamp));
|
| + messages.push(payload);
|
| + testRunner.log('Message has timestamp: ' + !!payload.timestamp);
|
| + testRunner.log(`Message timestamp doesn't differ too much from current time (one minute interval): ` + (Math.abs(new Date().getTime() - payload.timestamp) < 60000));
|
| + if (messages.length === 3)
|
| + testRunner.completeTest();
|
| + });
|
| + dp.Runtime.enable();
|
| + dp.Runtime.evaluate({ expression: `console.log('testUnique'); for (var i = 0; i < 2; ++i) console.log('testDouble');` });
|
| +})
|
|
|