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 var tzOffset = new Date(Date.now()).getTimezoneOffset() * 60 * 1000; | 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. |
| 10 var baseDate = Date.parse("2014-05-13T16:53:20.123Z"); |
| 11 var tzOffset = new Date(baseDate).getTimezoneOffset() * 60 * 1000; |
9 var baseTimestamp = 1400000000000 + tzOffset; | 12 var baseTimestamp = 1400000000000 + tzOffset; |
10 | 13 |
11 function addMessageWithFixedTimestamp(messageText, timestamp) | 14 function addMessageWithFixedTimestamp(messageText, timestamp) |
12 { | 15 { |
13 var message = new WebInspector.ConsoleMessage( | 16 var message = new WebInspector.ConsoleMessage( |
14 WebInspector.consoleModel.target(), | 17 WebInspector.consoleModel.target(), |
15 WebInspector.ConsoleMessage.MessageSource.Other, // source | 18 WebInspector.ConsoleMessage.MessageSource.Other, // source |
16 WebInspector.ConsoleMessage.MessageLevel.Log, // level | 19 WebInspector.ConsoleMessage.MessageLevel.Log, // level |
17 messageText, | 20 messageText, |
18 undefined, // type | 21 undefined, // type |
(...skipping 29 matching lines...) Expand all Loading... |
48 InspectorTest.completeTest(); | 51 InspectorTest.completeTest(); |
49 } | 52 } |
50 </script> | 53 </script> |
51 </head> | 54 </head> |
52 <body onload="runTest()"> | 55 <body onload="runTest()"> |
53 <p> | 56 <p> |
54 Tests the console timestamp setting. | 57 Tests the console timestamp setting. |
55 </p> | 58 </p> |
56 </body> | 59 </body> |
57 </html> | 60 </html> |
OLD | NEW |