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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-timestamp.js

Issue 2954093003: [DevTools] Migrate inspector-protocol/runtime tests to new harness (Closed)
Patch Set: fail: Created 3 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
OLDNEW
(Empty)
1 (async function(testRunner) {
2 let {page, session, dp} = await testRunner.startBlank(``);
3
4 var messages = [];
5 dp.Runtime.onConsoleAPICalled(data => {
6 var payload = data.params;
7 if (messages.length > 0)
8 testRunner.log('Message ' + messages.length + ' has non-decreasing timesta mp: ' + (payload.timestamp >= messages[messages.length - 1].timestamp));
9 messages.push(payload);
10 testRunner.log('Message has timestamp: ' + !!payload.timestamp);
11 testRunner.log(`Message timestamp doesn't differ too much from current time (one minute interval): ` + (Math.abs(new Date().getTime() - payload.timestamp) < 60000));
12 if (messages.length === 3)
13 testRunner.completeTest();
14 });
15 dp.Runtime.enable();
16 dp.Runtime.evaluate({ expression: `console.log('testUnique'); for (var i = 0; i < 2; ++i) console.log('testDouble');` });
17 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698