| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../http/tests/inspector/console-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 // It is essential that we calculate timezone for this particular moment of
time | 8 // It is essential that we calculate timezone for this particular moment of
time |
| 9 // otherwise the time zone offset could be different because of DST. | 9 // otherwise the time zone offset could be different because of DST. |
| 10 var baseDate = Date.parse("2014-05-13T16:53:20.123Z"); | 10 var baseDate = Date.parse("2014-05-13T16:53:20.123Z"); |
| 11 var tzOffset = new Date(baseDate).getTimezoneOffset() * 60 * 1000; | 11 var tzOffset = new Date(baseDate).getTimezoneOffset() * 60 * 1000; |
| 12 var baseTimestamp = 1400000000000 + tzOffset; | 12 var baseTimestamp = 1400000000000 + tzOffset; |
| 13 | 13 |
| 14 function addMessageWithFixedTimestamp(messageText, timestamp) | 14 function addMessageWithFixedTimestamp(messageText, timestamp) |
| 15 { | 15 { |
| 16 var message = new SDK.ConsoleMessage( | 16 var message = new ConsoleModel.ConsoleMessage( |
| 17 InspectorTest.mainTarget, | 17 InspectorTest.mainTarget, |
| 18 SDK.ConsoleMessage.MessageSource.Other, // source | 18 ConsoleModel.ConsoleMessage.MessageSource.Other, // source |
| 19 SDK.ConsoleMessage.MessageLevel.Info, // level | 19 ConsoleModel.ConsoleMessage.MessageLevel.Info, // level |
| 20 messageText, | 20 messageText, |
| 21 undefined, // type | 21 undefined, // type |
| 22 undefined, // url | 22 undefined, // url |
| 23 undefined, // line | 23 undefined, // line |
| 24 undefined, // column | 24 undefined, // column |
| 25 undefined, // requestId | 25 undefined, // requestId |
| 26 undefined, // parameters | 26 undefined, // parameters |
| 27 undefined, // stackTrace | 27 undefined, // stackTrace |
| 28 timestamp || baseTimestamp + 123); // timestamp: 2014-05-13T16:53:20
.123Z | 28 timestamp || baseTimestamp + 123); // timestamp: 2014-05-13T16:53:20
.123Z |
| 29 InspectorTest.consoleModel.addMessage(message, true); // allowGrouping | 29 InspectorTest.consoleModel.addMessage(message, true); // allowGrouping |
| (...skipping 20 matching lines...) Expand all Loading... |
| 50 InspectorTest.completeTest(); | 50 InspectorTest.completeTest(); |
| 51 } | 51 } |
| 52 </script> | 52 </script> |
| 53 </head> | 53 </head> |
| 54 <body onload="runTest()"> | 54 <body onload="runTest()"> |
| 55 <p> | 55 <p> |
| 56 Tests the console timestamp setting. | 56 Tests the console timestamp setting. |
| 57 </p> | 57 </p> |
| 58 </body> | 58 </body> |
| 59 </html> | 59 </html> |
| OLD | NEW |