Web Inspector: performance: restore 'log 300 messages into console' test.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jan 2012 14:44:06 +0000 (14:44 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jan 2012 14:44:06 +0000 (14:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=76170

It was removed in order of transition from layout tests to perf tests.

Reviewed by Yury Semikhatsky.

PerformanceTests:

* inspector/console-300-lines.html: Added.

Source/WebCore:

* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._scheduleScrollIntoView.scrollIntoView):
(WebInspector.ConsoleView.prototype._scheduleScrollIntoView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104822 268f45cc-cd09-0410-ab3c-d52691b4dbfc

PerformanceTests/ChangeLog
PerformanceTests/inspector/console-300-lines.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/ConsoleView.js

index 8124974..73032fb 100644 (file)
@@ -1,5 +1,16 @@
 2012-01-12  Ilya Tikhonovsky  <loislo@chromium.org>
 
+        Web Inspector: performance: restore 'log 300 messages into console' test.
+        https://bugs.webkit.org/show_bug.cgi?id=76170
+
+        It was removed in order of transition from layout tests to perf tests.
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/console-300-lines.html: Added.
+
+2012-01-12  Ilya Tikhonovsky  <loislo@chromium.org>
+
         Web Inspector: performance tests: fix memory leak in first-open-resources test.
         https://bugs.webkit.org/show_bug.cgi?id=76049
 
diff --git a/PerformanceTests/inspector/console-300-lines.html b/PerformanceTests/inspector/console-300-lines.html
new file mode 100644 (file)
index 0000000..a801947
--- /dev/null
@@ -0,0 +1,80 @@
+<html>
+<head>
+<script src="../../LayoutTests/http/tests/inspector/inspector-test.js"></script>
+<script src="performance-test.js"></script>
+<script>
+
+function makeConsoleEvents(count)
+{
+    for (var i = 0; i < count; ++i)
+        console.log("Console log: " + i);
+}
+
+function test()
+{
+    var message = {
+        "method":"Console.messageAdded",
+        "params":{
+            "message":{
+                "source":"console-api",
+                "level":"log",
+                "text":"Console log message",
+                "type":"log",
+                "line":10,
+                "url":"file://./console-300-lines.html",
+                "repeatCount":1,
+                "parameters":[{
+                    "type":"string",
+                    "value":"Console log: 42"
+                }],
+                "stackTrace":[
+                    {
+                        "functionName":"makeConsoleEvents",
+                        "url":"file://./console-300-lines.html",
+                        "lineNumber":10,
+                        "columnNumber":17
+                    },
+                    {
+                        "functionName":"",
+                        "url":"file://./console-300-lines.html",
+                        "lineNumber":37,
+                        "columnNumber":9
+                    }
+                ]
+            }
+        }
+    };
+
+    WebInspector.showPanel("console");
+
+    function test(timer)
+    {
+        WebInspector.console.clearMessages();
+        InspectorTest.addSniffer(WebInspector.consoleView.promptElement, "scrollIntoView", finish);
+
+        var cookie = timer.start("console-300-lines");
+        for (var i = 0; i < 300; ++i)
+            InspectorBackend.dispatch(message);
+
+        function finish()
+        {
+            timer.finish(cookie);
+            timer.done("panel-update");
+        }
+    }
+
+    InspectorTest.runPerformanceTest(test, 10000);
+}
+
+if (!window.layoutTestController) {
+    setTimeout(function() {
+        makeConsoleEvents(300);
+    }, 3000);
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+</body>
+</html>
index ad30a08..95c3413 100644 (file)
@@ -1,3 +1,16 @@
+2012-01-12  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: performance: restore 'log 300 messages into console' test.
+        https://bugs.webkit.org/show_bug.cgi?id=76170
+
+        It was removed in order of transition from layout tests to perf tests.
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/ConsoleView.js:
+        (WebInspector.ConsoleView.prototype._scheduleScrollIntoView.scrollIntoView):
+        (WebInspector.ConsoleView.prototype._scheduleScrollIntoView):
+
 2012-01-12  Hans Wennborg  <hans@chromium.org>
 
         Speech input: Send text to correct element even if focus has changed
index 2b7387c..adde069 100644 (file)
@@ -277,8 +277,8 @@ WebInspector.ConsoleView.prototype = {
 
         function scrollIntoView()
         {
-            this.promptElement.scrollIntoView(true);
             delete this._scrollIntoViewTimer;
+            this.promptElement.scrollIntoView(true);
         }
         this._scrollIntoViewTimer = setTimeout(scrollIntoView.bind(this), 20);
     },