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

Side by Side Diff: LayoutTests/inspector/console/console-timestamp.html

Issue 185713007: DevTools: Add timestamp support in the console (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-timestamp-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script>
6 function test()
7 {
8 var tzOffset = new Date(Date.now()).getTimezoneOffset() * 60 * 1000;
9 var baseTimestamp = 1400000000000 + tzOffset;
10
11 function addMessageWithFixedTimestamp(messageText, timestamp)
12 {
13 var message = new WebInspector.ConsoleMessage(
14 WebInspector.ConsoleMessage.MessageSource.Other, // source
15 WebInspector.ConsoleMessage.MessageLevel.Log, // level
16 messageText,
17 undefined, // type
18 undefined, // url
19 undefined, // line
20 undefined, // column
21 undefined, // requestId
22 undefined, // parameters
23 undefined, // stackTrace
24 timestamp || baseTimestamp + 123, // timestamp: 2014-05-13T16:53:20. 123Z
25 false); // isOutdated
26 WebInspector.console.addMessage(message, true); // allowGrouping
27 }
28
29 InspectorTest.addResult("Console messages with timestamps disabled:");
30 addMessageWithFixedTimestamp("<Before>");
31 addMessageWithFixedTimestamp("<Before>");
32 addMessageWithFixedTimestamp("<Before>", baseTimestamp + 456);
33
34 InspectorTest.dumpConsoleMessages();
35
36 InspectorTest.addResult("Console messages with timestamps enabled:");
37 WebInspector.settings.consoleTimestampsEnabled.set(true);
38
39 addMessageWithFixedTimestamp("<After>");
40 addMessageWithFixedTimestamp("<After>");
41 addMessageWithFixedTimestamp("<After>", baseTimestamp + 456);
42
43 InspectorTest.dumpConsoleMessages();
44 InspectorTest.completeTest();
45 }
46 </script>
47 </head>
48 <body onload="runTest()">
49 <p>
50 Tests the console timestamp setting.
51 </p>
52 </body>
53 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-timestamp-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698