Index: LayoutTests/inspector/console/console-timestamp.html |
diff --git a/LayoutTests/inspector/console/console-timestamp.html b/LayoutTests/inspector/console/console-timestamp.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ba3f57dbc39c1bc5728bb8a7f92c558bf14c82b4 |
--- /dev/null |
+++ b/LayoutTests/inspector/console/console-timestamp.html |
@@ -0,0 +1,51 @@ |
+<html> |
+<head> |
+<script src="../../http/tests/inspector/inspector-test.js"></script> |
+<script src="../../http/tests/inspector/console-test.js"></script> |
+<script> |
+function test() |
+{ |
+ function addMessageWithFixedTimestamp(timestamp) |
+ { |
+ var message = new WebInspector.ConsoleMessage( |
+ WebInspector.ConsoleMessage.MessageSource.Other, // source |
+ WebInspector.ConsoleMessage.MessageLevel.Log, // level |
+ "Console message text.", // messageText |
+ undefined, // type |
+ undefined, // url |
+ undefined, // line |
+ undefined, // column |
+ undefined, // requestId |
+ undefined, // parameters |
+ undefined, // stackTrace |
+ timestamp || 1400000000123, // timestamp: 2014-05-13T16:53:20.123Z |
+ false); // isOutdated |
+ WebInspector.console.addMessage(message, true); // allowGrouping |
+ } |
+ |
+ // 1. Ensure no timestamp, just message. |
apavlov
2014/03/21 09:30:46
unnecessary comment. Instead, add
InspectorTest.ad
|
+ for (var i = 0; i < 2; i++) { |
apavlov
2014/03/21 09:30:46
You can just write
addMessageWithFixedTimestamp();
|
+ addMessageWithFixedTimestamp(); |
+ } |
+ addMessageWithFixedTimestamp(1400000000456); |
+ |
+ InspectorTest.dumpConsoleMessages(); |
+ |
+ WebInspector.settings.consoleTimestampsEnabled.set(true); |
+ |
+ for (var i = 0; i < 2; i++) { |
apavlov
2014/03/21 09:30:46
Ditto
|
+ addMessageWithFixedTimestamp(); |
+ } |
+ addMessageWithFixedTimestamp(1400000000456); |
+ |
+ InspectorTest.dumpConsoleMessages(); |
apavlov
2014/03/21 09:30:46
Add
InspectorTest.addResult("Console messages with
|
+ InspectorTest.completeTest(); |
+} |
+</script> |
+</head> |
+<body onload="runTest()"> |
+<p> |
+Tests the console timestamp setting |
+</p> |
+</body> |
+</html> |