Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: LayoutTests/inspector/console/console-timestamp.html

Issue 185713007: DevTools: Add timestamp support in the console (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed apavlov's comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..48529bfd472abc03c2ac28b67cbb686fbd12b007
--- /dev/null
+++ b/LayoutTests/inspector/console/console-timestamp.html
@@ -0,0 +1,50 @@
+<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(messageText, timestamp)
+ {
+ var message = new WebInspector.ConsoleMessage(
+ WebInspector.ConsoleMessage.MessageSource.Other, // source
+ WebInspector.ConsoleMessage.MessageLevel.Log, // level
+ 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
+ }
+
+ InspectorTest.addResult("Console messages with timestamps disabled:");
+ addMessageWithFixedTimestamp("<Before>");
+ addMessageWithFixedTimestamp("<Before>");
+ addMessageWithFixedTimestamp("<Before>", 1400000000456);
+
+ InspectorTest.dumpConsoleMessages();
+
+ InspectorTest.addResult("Console messages with timestamps enabled:");
+ WebInspector.settings.consoleTimestampsEnabled.set(true);
+
+ addMessageWithFixedTimestamp("<After>");
+ addMessageWithFixedTimestamp("<After>");
+ addMessageWithFixedTimestamp("<After>", 1400000000456);
+
+ InspectorTest.dumpConsoleMessages();
+ InspectorTest.completeTest();
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>
+Tests the console timestamp setting.
+</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698