Title: [117862] trunk/PerformanceTests
Revision
117862
Author
[email protected]
Date
2012-05-21 17:53:41 -0700 (Mon, 21 May 2012)

Log Message

Add performance tests for <textarea>
https://bugs.webkit.org/show_bug.cgi?id=86994

Reviewed by Ryosuke Niwa.

* DOM/textarea-dom.html: Added.
* DOM/textarea-edit.html: Added.
* Parser/textarea-parsing.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/PerformanceTests/ChangeLog (117861 => 117862)


--- trunk/PerformanceTests/ChangeLog	2012-05-22 00:51:05 UTC (rev 117861)
+++ trunk/PerformanceTests/ChangeLog	2012-05-22 00:53:41 UTC (rev 117862)
@@ -1,3 +1,14 @@
+2012-05-21  Kent Tamura  <[email protected]>
+
+        Add performance tests for <textarea>
+        https://bugs.webkit.org/show_bug.cgi?id=86994
+
+        Reviewed by Ryosuke Niwa.
+
+        * DOM/textarea-dom.html: Added.
+        * DOM/textarea-edit.html: Added.
+        * Parser/textarea-parsing.html: Added.
+
 2012-05-18  Ilya Tikhonovsky  <[email protected]>
 
         Web Inspector: upstream build dominators tree procedure from v8.

Added: trunk/PerformanceTests/DOM/textarea-dom.html (0 => 117862)


--- trunk/PerformanceTests/DOM/textarea-dom.html	                        (rev 0)
+++ trunk/PerformanceTests/DOM/textarea-dom.html	2012-05-22 00:53:41 UTC (rev 117862)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<body>
+<style>
+textarea:valid {
+    background-color: lime;
+}
+textarea:invalid {
+    background-color: red;
+}
+</style>
+<script src=""
+<textarea maxlength=2147483647 id="container"></textarea>
+<script>
+var container = document.getElementById('container');
+var nodes = [];
+var childCount = 1000;
+for (var i = 0; i < childCount; ++i)
+    nodes.push(document.createTextNode('A quick brown fox jumps over the lazy dog.\n'));
+PerfTestRunner.runPerSecond({run: function() {
+    for (var i = 0; i < childCount; ++i)
+        container.appendChild(nodes[i]);
+    container.innerHTML = '';
+}});
+</script>
+</body>
Property changes on: trunk/PerformanceTests/DOM/textarea-dom.html
___________________________________________________________________

Added: svn:eol-style

Added: trunk/PerformanceTests/DOM/textarea-edit.html (0 => 117862)


--- trunk/PerformanceTests/DOM/textarea-edit.html	                        (rev 0)
+++ trunk/PerformanceTests/DOM/textarea-edit.html	2012-05-22 00:53:41 UTC (rev 117862)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<body>
+<style>
+textarea:valid {
+    background-color: lime;
+}
+textarea:invalid {
+    background-color: red;
+}
+</style>
+<script src=""
+<textarea maxlength=2147483647 id="container"></textarea>
+<script>
+var container = document.getElementById('container');
+container.focus();
+PerfTestRunner.runPerSecond({run: function() {
+    for (var i = 0; i < 500; ++i)
+        document.execCommand('insertText', false, 'A quick brown fox jumps over the lazy dog.\n');
+    container.value = '';
+}});
+</script>
+</body>
Property changes on: trunk/PerformanceTests/DOM/textarea-edit.html
___________________________________________________________________

Added: svn:eol-style

Added: trunk/PerformanceTests/Parser/textarea-parsing.html (0 => 117862)


--- trunk/PerformanceTests/Parser/textarea-parsing.html	                        (rev 0)
+++ trunk/PerformanceTests/Parser/textarea-parsing.html	2012-05-22 00:53:41 UTC (rev 117862)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<body>
+<style>
+textarea:valid {
+    background-color: lime;
+}
+textarea:invalid {
+    background-color: red;
+}
+</style>
+<script src=""
+<div id="container"></div>
+<script>
+var htmlText = "<textarea maxlength=2147483647>";
+for (var i = 0; i < 1000; ++i) {
+    htmlText += "A quick brown fox jumps over the lazy dog.\n" +
+        "A quick brown fox jumps over the lazy dog.\n" +
+        "<!-- comment -->\n";
+}
+htmlText += "</textarea>"
+
+var container = document.getElementById('container');
+PerfTestRunner.runPerSecond({run: function() {
+    container.innerHTML = htmlText;
+}});
+</script>
+</body>
Property changes on: trunk/PerformanceTests/Parser/textarea-parsing.html
___________________________________________________________________

Added: svn:eol-style

_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to