OLD | NEW |
---|---|
(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(timestamp) | |
9 { | |
10 var message = new WebInspector.ConsoleMessage( | |
11 WebInspector.ConsoleMessage.MessageSource.Other, // source | |
12 WebInspector.ConsoleMessage.MessageLevel.Log, // level | |
13 "Console message text.", // 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 // 1. Ensure no timestamp, just message. | |
apavlov
2014/03/21 09:30:46
unnecessary comment. Instead, add
InspectorTest.ad
| |
27 for (var i = 0; i < 2; i++) { | |
apavlov
2014/03/21 09:30:46
You can just write
addMessageWithFixedTimestamp();
| |
28 addMessageWithFixedTimestamp(); | |
29 } | |
30 addMessageWithFixedTimestamp(1400000000456); | |
31 | |
32 InspectorTest.dumpConsoleMessages(); | |
33 | |
34 WebInspector.settings.consoleTimestampsEnabled.set(true); | |
35 | |
36 for (var i = 0; i < 2; i++) { | |
apavlov
2014/03/21 09:30:46
Ditto
| |
37 addMessageWithFixedTimestamp(); | |
38 } | |
39 addMessageWithFixedTimestamp(1400000000456); | |
40 | |
41 InspectorTest.dumpConsoleMessages(); | |
apavlov
2014/03/21 09:30:46
Add
InspectorTest.addResult("Console messages with
| |
42 InspectorTest.completeTest(); | |
43 } | |
44 </script> | |
45 </head> | |
46 <body onload="runTest()"> | |
47 <p> | |
48 Tests the console timestamp setting | |
49 </p> | |
50 </body> | |
51 </html> | |
OLD | NEW |