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(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> |
OLD | NEW |