2011-02-03 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Feb 2011 04:02:02 +0000 (04:02 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Feb 2011 04:02:02 +0000 (04:02 +0000)
        Reviewed by Eric Seidel.

        Add PerformanceTest for XSSFilter
        https://bugs.webkit.org/show_bug.cgi?id=53741

        This performance tests covers the case of a large POST data and many
        small event handlers.

        * XSSFilter: Added.
        * XSSFilter/large-post-many-events.html: Added.

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

PerformanceTests/ChangeLog
PerformanceTests/XSSFilter/large-post-many-events.html [new file with mode: 0644]

index 4690968..99d5abb 100644 (file)
@@ -1,3 +1,16 @@
+2011-02-03  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        Add PerformanceTest for XSSFilter
+        https://bugs.webkit.org/show_bug.cgi?id=53741
+
+        This performance tests covers the case of a large POST data and many
+        small event handlers.
+
+        * XSSFilter: Added.
+        * XSSFilter/large-post-many-events.html: Added.
+
 2011-02-02  Adam Barth  <abarth@webkit.org>
 
         Rubber-stamped by Eric Seidel.
 2011-02-02  Adam Barth  <abarth@webkit.org>
 
         Rubber-stamped by Eric Seidel.
diff --git a/PerformanceTests/XSSFilter/large-post-many-events.html b/PerformanceTests/XSSFilter/large-post-many-events.html
new file mode 100644 (file)
index 0000000..c26181f
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> 
+<title>WebKit test - use for detect speed differences when submitting the form</title> 
+<style type="text/css">
+BODY { background-color: #F0F0F0 }
+
+BODY, TABLE, TD {
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  font-size: 12px;
+}
+.funcDesc {  background-color:#9F8E1C; color:#000000;  /* background-color:#ffffbb; */ }
+.t { font-family:courier; }
+.tro { font-family:courier; background-color: #EBEBE4; }
+.ro { background-color: #EBEBE4; }
+#tableHeaders th { background-color:#F0F0F0; }
+#tableRowstd { background-color:#F0F0F0; }
+</style>
+<script>
+window.onload = function() {
+    document.getElementById("score").textContent = window.performance.timing.domContentLoadedEventStart - window.performance.timing.responseStart;
+}
+</script>
+</head>
+<body>
+
+<form id="frmName" name="frmName" method="post" action="large-post-many-events.html">
+
+<div style="margin:0 auto; width:600px; background-color:#bbb; padding:20px;">
+Score (smaller is better): <span id="score">Running...</span>
+</div>
+
+<input type="submit" value="Request Page Again">
+<br><br>
+
+
+<div id="divMainTable" style="padding:0; border:0; overflow:auto; height:450px;">
+<table id="tableRows" border="0" cellpadding="3" cellspacing="1" style="background-color:black; width:;">
+
+
+<script>
+for (var i=0; i < 400; ++i) {
+    document.write("<tr><td><a href=\"changed-name.php?ID=" + i + "\" target=\"_blank\">ChangedName, ChangedName</a></td> <td width=\"80px\">22331133</td> <td>06.02.2010</td> <td ondblclick=\"tR('" + i + "_1865_5721','')\">&nbsp;&nbsp;22:15&nbsp;&nbsp;</td> <td><input type=\"text\"  name=\"frmI1_" + i + "_1865_5721\" onblur=\"chkT(this);\" size=\"5\" class=\"t\" value=\"00:00\"></td> <td><input type=\"text\"  name=\"frmU1_" + i + "_1865_5721\" onblur=\"chkT(this);\" size=\"5\" class=\"t\" value=\"00:00\"></td> <td><input type=\"text\"  name=\"frmI2_" + i + "_1865_5721\" onblur=\"chkT(this);\" size=\"5\" class=\"t\" value=\"00:00\"></td> <td><input type=\"text\"  name=\"frmU2_" + i + "_1865_5721\" onblur=\"chkT(this);\" size=\"5\" class=\"t\" value=\"00:00\"></td> <td><input type=\"text\"  name=\"frmLU_" + i + "_1865_5721\" onblur=\"chkT(this);\" size=\"5\" class=\"t\" value=\"00:00\"></td> <td> <select name=\"frmOK_" + i + "_1865_5721\" onblur=\"checkFlag(this)\" onchange=\"tOK(this)\" > <option value=\"0\" selected=\"selected\">Nei</option> <option value=\"1\">Ja</option></td> </select> <td><a href=\"changed-another-name.php?ID=1865\">Changed name</a></td> <td>Changed name</td> <td>&nbsp;&nbsp;&nbsp;BLS&nbsp;&nbsp;&nbsp;</td> <td align=\"center\">&nbsp;&nbsp;&nbsp;201&nbsp;&nbsp;&nbsp;</td> <td><div style=\"display:none;\"><input type=\"checkbox\" id=\"funcFlag_" + i + "_1865_5721\" value=\"\" name=\"funcFlag[]\"></div> <select name=\"frmUarr_" + i + "_1865_5721\" onchange=\"chkVFunc(this)\" style=\"background-color:#FFFFFF;\"> <option value=\"5719\" style=\"background-color:#FFFFFF;\">Changed1 (22:15 - 05:00)</option> <option value=\"5720\" style=\"background-color:#FFFFFF;\">Changed2 (22:15 - 05:00)</option> <option value=\"5721\" selected=\"selected\" style=\"background-color:#FFFFFF;\">Changed3 (22:15 - 05:00)</option> <option value=\"5787\" style=\"background-color:#FF8800\">Changed4 (22:15 - 22:30)</option> <option class=\"funcDesc\" value=\"0\" disabled=\"disabled\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Changed text here as well</option> <option class=\"funcDesc\" value=\"0\" disabled=\"disabled\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Changed text here also</option> </select><input type=\"hidden\" id=\"frmUarr_" + i + "_1865_5721_h\" value=\"5721\"></td> <td align=\"center\" > <select name=\"frmJobb_" + i + "_1865_5721\" title=\"JA\" onchange=\"checkFlag(this)\"> <option value=\"1\">Chan</option> <option value=\"2\" disabled=\"disabled\">Chan</option> <option value=\"3\" selected=\"selected\">Chan</option> </select></td> <td><input class=\"ro\" type=\"text\" readonly=\"readonly\" onblur=\"checkFlag(this)\" name=\"frmKommArb_" + i + "_1865_5721\" value=\"\" size=\"20\"></td> <td><input class=\"ro\" type=\"text\" readonly=\"readonly\" onblur=\"checkFlag(this)\" name=\"frmKommKru_" + i + "_1865_5721\" value=\"\" size=\"20\"></td> <td><input type=\"text\" onblur=\"checkFlag(this)\" name=\"frmKomm_" + i + "_1865_5721\" value=\"\" size=\"20\"></td> <td align=\"center\" style=\"\"><input type=\"checkbox\" onclick=\"checkUncheckOpptatt(this,this.value)\" id=\"O_" + i + "_1\" name=\"frmAnsOppt[]\" value=\"" + i + "_2010-02-06\" style=\"margin-left:20px; margin-right:20px;\"></td> </tr>");
+}
+</script>
+</table>
+</form>
+</div>
+</body>
+</html>