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"); |
(...skipping 19 matching lines...) Expand all Loading... |
30 } | 30 } |
31 | 31 |
32 InspectorTest.addResult("Console messages with timestamps disabled:"); | 32 InspectorTest.addResult("Console messages with timestamps disabled:"); |
33 addMessageWithFixedTimestamp("<Before>"); | 33 addMessageWithFixedTimestamp("<Before>"); |
34 addMessageWithFixedTimestamp("<Before>", baseTimestamp + 456); | 34 addMessageWithFixedTimestamp("<Before>", baseTimestamp + 456); |
35 addMessageWithFixedTimestamp("<Before>"); | 35 addMessageWithFixedTimestamp("<Before>"); |
36 | 36 |
37 InspectorTest.dumpConsoleMessages(); | 37 InspectorTest.dumpConsoleMessages(); |
38 | 38 |
39 InspectorTest.addResult("Console messages with timestamps enabled:"); | 39 InspectorTest.addResult("Console messages with timestamps enabled:"); |
40 Common.settingForTest("consoleTimestampFormat").set(Console.ConsoleViewMessa
ge.TimestampFormat.Full); | 40 Common.settingForTest("consoleTimestampsEnabled").set(true); |
41 | 41 |
42 addMessageWithFixedTimestamp("<After>", baseTimestamp + 1000); | 42 addMessageWithFixedTimestamp("<After>", baseTimestamp + 1000); |
43 addMessageWithFixedTimestamp("<After>", baseTimestamp + 1000); | 43 addMessageWithFixedTimestamp("<After>", baseTimestamp + 1000); |
44 addMessageWithFixedTimestamp("<After>", baseTimestamp + 1456); | 44 addMessageWithFixedTimestamp("<After>", baseTimestamp + 1456); |
45 | 45 |
46 Common.settingForTest("consoleTimestampFormat").set(Console.ConsoleViewMessa
ge.TimestampFormat.None); | 46 Common.settingForTest("consoleTimestampsEnabled").set(false); |
47 Common.settingForTest("consoleTimestampFormat").set(Console.ConsoleViewMessa
ge.TimestampFormat.Full); | 47 Common.settingForTest("consoleTimestampsEnabled").set(true); |
48 | 48 |
49 InspectorTest.dumpConsoleMessages(); | 49 InspectorTest.dumpConsoleMessages(); |
50 | |
51 InspectorTest.addResult("Console messages with short timestamps:"); | |
52 Common.settingForTest("consoleTimestampFormat").set(Console.ConsoleViewMessa
ge.TimestampFormat.Short); | |
53 InspectorTest.dumpConsoleMessages(); | |
54 InspectorTest.completeTest(); | 50 InspectorTest.completeTest(); |
55 } | 51 } |
56 </script> | 52 </script> |
57 </head> | 53 </head> |
58 <body onload="runTest()"> | 54 <body onload="runTest()"> |
59 <p> | 55 <p> |
60 Tests the console timestamp setting. | 56 Tests the console timestamp setting. |
61 </p> | 57 </p> |
62 </body> | 58 </body> |
63 </html> | 59 </html> |
OLD | NEW |