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

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: Fixed apavlov's comments 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
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 function addMessageWithFixedTimestamp(messageText, timestamp)
9 {
10 var message = new WebInspector.ConsoleMessage(
11 WebInspector.ConsoleMessage.MessageSource.Other, // source
12 WebInspector.ConsoleMessage.MessageLevel.Log, // level
13 messageText,
14 undefined, // type
15 undefined, // url
16 undefined, // line
17 undefined, // column
18 undefined, // requestId
19 undefined, // parameters
20 undefined, // stackTrace
21 timestamp || 1400000000123, // timestamp: 2014-05-13T16:53:20.123Z
22 false); // isOutdated
23 WebInspector.console.addMessage(message, true); // allowGrouping
24 }
25
26 InspectorTest.addResult("Console messages with timestamps disabled:");
27 addMessageWithFixedTimestamp("<Before>");
28 addMessageWithFixedTimestamp("<Before>");
29 addMessageWithFixedTimestamp("<Before>", 1400000000456);
30
31 InspectorTest.dumpConsoleMessages();
32
33 InspectorTest.addResult("Console messages with timestamps enabled:");
34 WebInspector.settings.consoleTimestampsEnabled.set(true);
35
36 addMessageWithFixedTimestamp("<After>");
37 addMessageWithFixedTimestamp("<After>");
38 addMessageWithFixedTimestamp("<After>", 1400000000456);
39
40 InspectorTest.dumpConsoleMessages();
41 InspectorTest.completeTest();
42 }
43 </script>
44 </head>
45 <body onload="runTest()">
46 <p>
47 Tests the console timestamp setting.
48 </p>
49 </body>
50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698