Some perf tests time out when ran by run-perf-tests
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 21:50:52 +0000 (21:50 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 21:50:52 +0000 (21:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=76612

Reviewed by Dirk Pranke and Eric Seidel.

PerformanceTests:

Replace all images in html5.html by geenbox.png to avoid accessing whatwg.org when
running the parser tests. Also call dumpAsText, waitUntilDone, and notifyDone automatically
inside runner.js to avoid having to call them in individual tests.

* Bindings/event-target-wrapper.html: Removed calls to layoutTestController methods since
they are now called by runner.js automatically.
* Parser/resources/greenbox.png: Copied from LayoutTests/fast/css/resources/greenbox.png.
* Parser/resources/html5.html:
* Parser/resources/runner.js:
(runLoop):

Tools:

Always pass --no-timeout to DumpRenderTree from run-perf-tests.
Otherwise some tests such as Parser/xml-parser.html will timeout.

--no-timeout option is currently supported by Chromium and Mac ports.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.to.create_driver):
* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumDriver.__init__):
(ChromiumDriver._wrapper_options):
* Scripts/webkitpy/layout_tests/port/driver.py:
(Driver.__init__):
(DriverProxy.__init__):
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitDriver.__init__):
(WebKitDriver.cmd_line):
* Scripts/webkitpy/layout_tests/port/webkit_unittest.py:
(WebKitDriverTest.test_read_binary_block):
(WebKitDriverTest):
(WebKitDriverTest.test_no_timeout):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(get_tests_run.RecordingTestDriver.__init__):
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._parse_args):
(PerfTestsRunner._run_tests_set):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(create_runner):

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

14 files changed:
PerformanceTests/Bindings/event-target-wrapper.html
PerformanceTests/ChangeLog
PerformanceTests/Parser/resources/greenbox.png [new file with mode: 0644]
PerformanceTests/Parser/resources/html5.html
PerformanceTests/Parser/resources/runner.js
Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/base.py
Tools/Scripts/webkitpy/layout_tests/port/chromium.py
Tools/Scripts/webkitpy/layout_tests/port/driver.py
Tools/Scripts/webkitpy/layout_tests/port/webkit.py
Tools/Scripts/webkitpy/layout_tests/port/webkit_unittest.py
Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py
Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py

index ebc6b77..e3670d2 100644 (file)
@@ -18,19 +18,11 @@ link.addEventListener('click', function(event) {
         for (var x = 0; x < kIteratonsPerTest; x++) {
             e.target;
         }
-    }, 10, function() {
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
-    });
+    }, 10);
 
     return false;
 }, false);
 
-if (window.layoutTestController) {
-    layoutTestController.waitUntilDone();
-    layoutTestController.dumpAsText();
-}
-
 if (window.eventSender) {
     eventSender.mouseMoveTo(link.offsetLeft + 5, link.offsetTop + 5);
     eventSender.mouseDown();
index a10100e..e52d2a5 100644 (file)
@@ -1,3 +1,21 @@
+2012-01-19  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Some perf tests time out when ran by run-perf-tests
+        https://bugs.webkit.org/show_bug.cgi?id=76612
+
+        Reviewed by Dirk Pranke and Eric Seidel.
+
+        Replace all images in html5.html by geenbox.png to avoid accessing whatwg.org when
+        running the parser tests. Also call dumpAsText, waitUntilDone, and notifyDone automatically
+        inside runner.js to avoid having to call them in individual tests.
+
+        * Bindings/event-target-wrapper.html: Removed calls to layoutTestController methods since
+        they are now called by runner.js automatically.
+        * Parser/resources/greenbox.png: Copied from LayoutTests/fast/css/resources/greenbox.png.
+        * Parser/resources/html5.html:
+        * Parser/resources/runner.js:
+        (runLoop):
+
 2012-01-18  Ryosuke Niwa  <rniwa@webkit.org>
 
         run-perf-tests should support Skipped list
diff --git a/PerformanceTests/Parser/resources/greenbox.png b/PerformanceTests/Parser/resources/greenbox.png
new file mode 100644 (file)
index 0000000..6e555e3
Binary files /dev/null and b/PerformanceTests/Parser/resources/greenbox.png differ
index 2c62039..337238b 100644 (file)
   relative to other specifications can be best summed up as
   follows:</p>
 
-  <p><img alt="It consists of everything else, above such core technologies as HTTP, URI/IRIs, DOM Core, XML, Unicode, and ECMAScript; below presentation-layer technologies like CSS, XBL, and the NPAPI; and to the side of technologies like Geolocation, SVG, MathML, and XHR." height=359 src=http://images.whatwg.org/abstract.png width=398></p>
+  <p><img alt="It consists of everything else, above such core technologies as HTTP, URI/IRIs, DOM Core, XML, Unicode, and ECMAScript; below presentation-layer technologies like CSS, XBL, and the NPAPI; and to the side of technologies like Geolocation, SVG, MathML, and XHR." height=359 src=greenbox.png width=398></p>
 
 
 
@@ -11207,7 +11207,7 @@ Transport Protocol"&gt;HTTP&lt;/abbr&gt; today.&lt;/p&gt;</pre>
    <i>start edge</i> of the paragraph, the resulting rendering could
    be as follows:</p>
 
-   <p><img alt="Each paragraph rendered as a separate block, with the paragraphs left-aligned except the second paragraph and the last one, which would  be right aligned, with the usernames ('Student' and 'Teacher' in this example) flush right, with a colon to their left, and the text first to the left of that." src=http://images.whatwg.org/im.png></p>
+   <p><img alt="Each paragraph rendered as a separate block, with the paragraphs left-aligned except the second paragraph and the last one, which would  be right aligned, with the usernames ('Student' and 'Teacher' in this example) flush right, with a colon to their left, and the text first to the left of that." src=greenbox.png></p>
 
    <p>As noted earlier, the <code title=attr-dir-auto><a href=#attr-dir-auto>auto</a></code>
    value is not a panacea. The final paragraph in this example is
@@ -11675,7 +11675,7 @@ background: transparent"&gt;blue&lt;/span&gt;.&lt;/p&gt;</pre>
 
   <p><object data=images/content-venn.svg height=288 width=1000><img alt="Sectioning content, heading content, phrasing content, and
   embedded content are all types of flow content. Embedded content is
-  also a type of phrasing content." src=http://images.whatwg.org/content-venn.png></object></p>
+  also a type of phrasing content." src=greenbox.png></object></p>
 
   <p>Other categories are also used for specific purposes, e.g. form
   controls are specified using a number of categories to define common
@@ -21461,7 +21461,7 @@ wormhole connection.&lt;/mark&gt;&lt;/p&gt;</pre>
 
    <p>This might be rendered as:</p>
 
-   <p><img alt="The two main ideographs, each with its annotation in hiragana rendered in a smaller font above it." height=78 src=http://images.whatwg.org/sample-ruby-ja.png width=171></p>
+   <p><img alt="The two main ideographs, each with its annotation in hiragana rendered in a smaller font above it." height=78 src=greenbox.png width=171></p>
 
   </div>
 
@@ -21477,7 +21477,7 @@ wormhole connection.&lt;/mark&gt;&lt;/p&gt;</pre>
 
    <p>This might be rendered as:</p>
 
-   <p><img alt="The two main ideographs, each with its bopomofo annotation rendered in a smaller font next to it." height=100 src=http://images.whatwg.org/sample-ruby-bopomofo.png width=78></p>
+   <p><img alt="The two main ideographs, each with its bopomofo annotation rendered in a smaller font next to it." height=100 src=greenbox.png width=78></p>
 
   </div>
 
@@ -21493,7 +21493,7 @@ wormhole connection.&lt;/mark&gt;&lt;/p&gt;</pre>
 
    <p>This might be rendered as:</p>
 
-   <p><img alt="The two main ideographs, each with its pinyin annotation rendered in a smaller font above it." height=79 src=http://images.whatwg.org/sample-ruby-pinyin.png width=173></p>
+   <p><img alt="The two main ideographs, each with its pinyin annotation rendered in a smaller font above it." height=79 src=greenbox.png width=173></p>
 
   </div>
 
@@ -37557,7 +37557,7 @@ hairline width with transform. ack Shaun Morris.
 
   <!-- this is filler to make sure the TCP packet boundary doesn't fall in the middle of one of the NCRs below -->
   <!-- (because otherwise the parser in anolis screws it up) -->
-  <p><img alt="The top of the em square is roughly at the top of the glyphs in a font, the hanging baseline is where some glyphs like &#2310; are anchored, the middle is half-way between the top of the em square and the bottom of the em square, the alphabetic baseline is where characters like &Aacute;, &yuml;, f, and &Omega; are anchored, the ideographic baseline is where glyphs like &#31169; and &#36948; are anchored, and the bottom of the em square is roughly at the bottom of the glyphs in a font. The top and bottom of the bounding box can be far from these baselines, due to glyphs extending far outside the em square." height=300 src=http://images.whatwg.org/baselines.png width=738></p>
+  <p><img alt="The top of the em square is roughly at the top of the glyphs in a font, the hanging baseline is where some glyphs like &#2310; are anchored, the middle is half-way between the top of the em square and the bottom of the em square, the alphabetic baseline is where characters like &Aacute;, &yuml;, f, and &Omega; are anchored, the ideographic baseline is where glyphs like &#31169; and &#36948; are anchored, and the bottom of the em square is roughly at the bottom of the glyphs in a font. The top and bottom of the bounding box can be far from these baselines, due to glyphs extending far outside the em square." height=300 src=greenbox.png width=738></p>
 
   <p>The keywords map to these alignment points as follows:</p>
 
@@ -37939,7 +37939,7 @@ v6DVT (also check for '- -' bits in the part above) --><p>The <dfn id=dom-contex
     <p>Draws the given image onto the canvas. The arguments are
     interpreted as follows:</p>
 
-    <p><img alt="The sx and sy parameters give the x and y coordinates of the source rectangle; the sw and sh arguments give the width and height of the source rectangle; the dx and dy give the x and y coordinates of the destination rectangle; and the dw and dh arguments give the width and height of the destination rectangle." height=356 src=http://images.whatwg.org/drawImage.png width=356></p>
+    <p><img alt="The sx and sy parameters give the x and y coordinates of the source rectangle; the sw and sh arguments give the width and height of the source rectangle; the dx and dy give the x and y coordinates of the destination rectangle; and the dw and dh arguments give the width and height of the destination rectangle." height=356 src=greenbox.png width=356></p>
 
     <p>If the first argument isn't an <code><a href=#the-img-element>img</a></code>,
     <code><a href=#the-canvas-element>canvas</a></code>, or <code><a href=#the-video-element>video</a></code> element, throws a
@@ -39048,7 +39048,7 @@ function AddCloud(data, x, y) { ... }</pre>
 
    <p>Consider an image that looks as follows:</p>
 
-   <p><img alt="A line with four shapes in it, equally spaced: a red hollow box, a green circle, a blue triangle, and a yellow four-pointed star." height=150 src=http://images.whatwg.org/sample-usemap.png width=600></p>
+   <p><img alt="A line with four shapes in it, equally spaced: a red hollow box, a green circle, a blue triangle, and a yellow four-pointed star." height=150 src=greenbox.png width=600></p>
 
    <p>If we wanted just the colored areas to be clickable, we could
    do it as follows:</p>
@@ -40819,7 +40819,7 @@ the cell that corresponds to the values of the two dice.
    them.</p>
 
    <!-- image source: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/151 -->
-   <img alt="" height=256 src=http://images.whatwg.org/table-scope-diagram.png width=459><!-- (alt is empty because the diagram is completely described by the previous paragraphs) --></div>
+   <img alt="" height=256 src=greenbox.png width=459><!-- (alt is empty because the diagram is completely described by the previous paragraphs) --></div>
 
 
 
@@ -45032,7 +45032,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
    <code>http://www.w3.org/TR/XForms/</code> in the recent past, then
    the rendering might look like this:</p>
 
-   <p><img alt='A text box with an icon on the left followed by the text "www.w3" and a cursor, with a drop down button on the right hand side; with, below, a drop down box containing a list of six URLs on the left, with the first four having grayed out labels on the right; and a scroll bar to the right of the drow down box, indicating further values are available.' height=134 src=http://images.whatwg.org/sample-url.png width=472></p>
+   <p><img alt='A text box with an icon on the left followed by the text "www.w3" and a cursor, with a drop down button on the right hand side; with, below, a drop down box containing a list of six URLs on the left, with the first four having grayed out labels on the right; and a scroll bar to the right of the drow down box, indicating further values are available.' height=134 src=greenbox.png width=472></p>
 
    <p>The first four URLs in this sample consist of the four URLs in
    the author-specified list that match the text the user has entered,
@@ -46680,7 +46680,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
 
    <p>...might render as:</p>
 
-   <p><img alt="A vertical slider control whose primary color is black and whose background color is beige, with the slider having five tick marks, one long one at each extremity, and three short ones clustered around the midpoint." height=75 src=http://images.whatwg.org/sample-range.png width=49><p>Note how the UA determined the orientation of the control from
+   <p><img alt="A vertical slider control whose primary color is black and whose background color is beige, with the slider having five tick marks, one long one at each extremity, and three short ones clustered around the midpoint." height=75 src=greenbox.png width=49><p>Note how the UA determined the orientation of the control from
    the ratio of the style-sheet-specified height and width properties.
    The colors were similiarly derived from the style sheet. The tick
    marks, however, were derived from the markup. In particular, the
@@ -46702,11 +46702,11 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
 
    <p>A user agent could display in a variety of ways, for instance:</p>
 
-   <p><img alt="As a dial." height=57 src=http://images.whatwg.org/sample-range-2a.png width=231></p>
+   <p><img alt="As a dial." height=57 src=greenbox.png width=231></p>
 
    <p>Or, alternatively, for instance:</p>
 
-   <p><img alt="As a long horizontal slider with tick marks." height=56 src=http://images.whatwg.org/sample-range-2b.png width=445></p>
+   <p><img alt="As a long horizontal slider with tick marks." height=56 src=greenbox.png width=445></p>
 
    <p>The user agent could pick which one to display based on the
    dimensions given in the style sheet. This would allow it to
@@ -48192,7 +48192,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
    user agent might suggest these two e-mail addresses to the
    user.</p>
 
-   <p><img alt="" height=140 src=http://images.whatwg.org/sample-email-1.png width=500></p>
+   <p><img alt="" height=140 src=greenbox.png width=500></p>
 
    <p>The page could also link in the user's contacts database from the site:</p>
 
@@ -48211,7 +48211,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
    earlier, as well as the "astrophy" and "astronomy" values given in
    the <code><a href=#the-datalist-element>datalist</a></code> element.</p>
 
-   <p><img alt="" height=171 src=http://images.whatwg.org/sample-email-2.png width=500></p>
+   <p><img alt="" height=171 src=greenbox.png width=500></p>
 
   </div>
 
@@ -51285,7 +51285,7 @@ and a height of &lt;meter value=2&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <stron
  &lt;/li&gt;
 &lt;/ul&gt;</pre>
    <p>Might be rendered as follows:</p>
-   <p><img alt="With the <meter> elements rendered as inline green bars of varying lengths." height=178 src=http://images.whatwg.org/sample-meter.png width=332></p>
+   <p><img alt="With the <meter> elements rendered as inline green bars of varying lengths." height=178 src=greenbox.png width=332></p>
   </div>
 
   <p>User agents <span class=impl>may</span> combine the value of
@@ -53649,7 +53649,7 @@ fur
    in a list to allow the user to collapse a set of fields down to a
    small set of headings, with the ability to open each one.</p>
 
-   <p class=details-example><img alt="" height=611 src=http://images.whatwg.org/sample-details-1.png width=345><img alt="" height=666 src=http://images.whatwg.org/sample-details-2.png width=345></p>
+   <p class=details-example><img alt="" height=611 src=greenbox.png width=345><img alt="" height=666 src=greenbox.png width=345></p>
 
    <p>In these examples, the summary really just summarises what the
    controls can change, and not the actual values, which is less than
@@ -54024,7 +54024,7 @@ fur
 
   <p>In a supporting user agent, this might look like this:</p>
 
-  <p><img alt="A toolbar with three buttons, labeled 'File', 'Edit', and 'Help'; where if you select the 'Edit' button you get a drop-down menu with three more options, 'Copy', 'Cut', and 'Paste'." height=101 src=http://images.whatwg.org/sample-toolbar-1.png width=303></p>
+  <p><img alt="A toolbar with three buttons, labeled 'File', 'Edit', and 'Help'; where if you select the 'Edit' button you get a drop-down menu with three more options, 'Copy', 'Cut', and 'Paste'." height=101 src=greenbox.png width=303></p>
 
   <p>In a legacy user agent, the above would look like a bulleted list
   with three items, the first of which has four buttons, the second of
@@ -71298,7 +71298,7 @@ interface <dfn id=navigatorcontentutils>NavigatorContentUtils</dfn> {
   <p>The <code title=dom-navigator-registerContentHandler><a href=#dom-navigator-registercontenthandler>registerContentHandler()</a></code>
   method could display a modal dialog box:</p>
 
-  <p><img alt="The modal dialog box could have the title 'Content Handler Registration', and could say 'This Web page: Kittens at work http://kittens.example.org/ ...would like permission to handle files of type: application/x-meowmeow using the following Web-based application: Kittens-at-work displayer http://kittens.example.org/?show=%s Do you trust the administrators of the &quot;kittens.example.org&quot; domain?' with two buttons, 'Trust kittens.example.org' and 'Cancel'." height=374 src=http://images.whatwg.org/sample-content-handler-registration.png width=534></p>
+  <p><img alt="The modal dialog box could have the title 'Content Handler Registration', and could say 'This Web page: Kittens at work http://kittens.example.org/ ...would like permission to handle files of type: application/x-meowmeow using the following Web-based application: Kittens-at-work displayer http://kittens.example.org/?show=%s Do you trust the administrators of the &quot;kittens.example.org&quot; domain?' with two buttons, 'Trust kittens.example.org' and 'Cancel'." height=374 src=greenbox.png width=534></p>
 
   <p>In this dialog box, "Kittens at work" is the title of the page
   that invoked the method, "http://kittens.example.org/" is the URL of
@@ -71316,7 +71316,7 @@ interface <dfn id=navigatorcontentutils>NavigatorContentUtils</dfn> {
   "application/x-meowmeow" <a href=#mime-type>MIME type</a>, then it might
   display a dialog as follows:</p>
 
-  <p><img alt="The dialog box could have the title 'Unknown File Type' and could say 'You have attempted to access:' followed by a URL, followed by a prompt such as 'How would you like FerretBrowser to handle this resource?' with three radio buttons, one saying 'Contact the FerretBrowser plugin registry to see if there is an official way to handle this resource.', one saying 'Pass this URL to a local application' with an application selector, and one saying 'Pass this URL to the &quot;Kittens-at-work displayer&quot; application at &quot;kittens.example.org&quot;', with a checkbox labeled 'Always do this for resources using the &quot;application/x-meowmeow&quot; type in future.', and with two buttons, 'Ok' and 'Cancel'." height=428 src=http://images.whatwg.org/sample-content-handler.png width=577></p>
+  <p><img alt="The dialog box could have the title 'Unknown File Type' and could say 'You have attempted to access:' followed by a URL, followed by a prompt such as 'How would you like FerretBrowser to handle this resource?' with three radio buttons, one saying 'Contact the FerretBrowser plugin registry to see if there is an official way to handle this resource.', one saying 'Pass this URL to a local application' with an application selector, and one saying 'Pass this URL to the &quot;Kittens-at-work displayer&quot; application at &quot;kittens.example.org&quot;', with a checkbox labeled 'Always do this for resources using the &quot;application/x-meowmeow&quot; type in future.', and with two buttons, 'Ok' and 'Cancel'." height=428 src=greenbox.png width=577></p>
 
   <p>In this dialog, the third option is the one that was primed by
   the site registering itself earlier.</p>
@@ -75435,7 +75435,7 @@ interface <dfn id=navigatorusermediaerrorcallback>NavigatorUserMediaErrorCallbac
   change when the parent is finished.) When such a fork's parent
   finishes, the fork is also said to have finished.</p>
 
-  <p><img alt="" src=http://images.whatwg.org/media-stream-1.png></p><!-- no alt since
+  <p><img alt="" src=greenbox.png></p><!-- no alt since
   it's all described in the previous paragraphs: this is just a
   summary -->
 
@@ -75555,7 +75555,7 @@ function mediaStream(c,x,y,vid) {
   peer (e.g. in response to the user using a "video mute"
   feature).</p>
 
-  <p><img alt="" src=http://images.whatwg.org/media-stream-2.png></p><!-- again, no
+  <p><img alt="" src=greenbox.png></p><!-- again, no
   alt since it's all described in the previous paragraphs: this is
   just a summary -->
 
@@ -83785,7 +83785,7 @@ dictionary <dfn id=storageeventinit>StorageEventInit</dfn> : <a href=#eventinit>
 
   <h4 id=overview-of-the-parsing-model><span class=secno>13.2.1 </span>Overview of the parsing model</h4>
 
-  <p class=overview><object data=images/parsing-model-overview.svg height=450 width=345><img alt="" height=450 src=http://images.whatwg.org/parsing-model-overview.png width=345></object></p>
+  <p class=overview><object data=images/parsing-model-overview.svg height=450 width=345><img alt="" height=450 src=greenbox.png width=345></object></p>
 
   <p>The input to the HTML parsing process consists of a stream of
   Unicode code points, which is passed through a
@@ -95034,7 +95034,7 @@ progress { binding: <i title="">progress</i>; }</pre>
 
   <!-- http://software.hixie.ch/utilities/js/canvas/?c.clearRect(0%2C%200%2C%20640%2C%20480)%3B%0Ac.save()%3B%0Atry%20{%0A%20%20c.fillStyle%20%3D%20'black'%3B%0A%20%20c.font%20%3D%20'8px%20sans-serif'%3B%0A%20%20c.fillText('Wide'%2C%2043%2C105)%3B%0A%20%20c.fillText('Tall'%2C%20100%2C105)%3B%0A%20%20c.fillText('Square'%2C%20128%2C105)%3B%0A%20%20c.font%20%3D%20'700%2010px%20sans-serif'%3B%0A%20%20c.fillText('Progress%20Bars'%2C%2013%2C30)%3B%0A%20%20c.font%20%3D%20'100%2010px%20sans-serif'%3B%0A%20%20c.fillText('(80%25)'%2C%2037%2C45)%3B%0A%20%20c.beginPath()%3B%0A%20%20var%20g%20%3D%20c.createLinearGradient(10%2C0%2C80%2C0)%3B%0A%20%20g.addColorStop(0%2C%20'%2300FF00')%3B%0A%20%20g.addColorStop(0.8%2C%20'%2300FF00')%3B%0A%20%20g.addColorStop(0.9%2C%20'%23FFFF00')%3B%0A%20%20c.fillStyle%20%3D%20g%3B%0A%20%20c.rect(10%2C80%2C80%2C15)%3B%0A%20%20c.fill()%3B%0A%20%20c.strokeStyle%20%3D%20'black'%3B%0A%20%20c.stroke()%3B%0A%20%20c.beginPath()%3B%0A%20%20var%20g%20%3D%20c.createLinearGradient(0%2C80%2C0%2C20)%3B%0A%20%20g.addColorStop(0%2C%20'%2300FF00')%3B%0A%20%20g.addColorStop(0.75%2C%20'%2300FF00')%3B%0A%20%20g.addColorStop(0.85%2C%20'%23FFFF00')%3B%0A%20%20c.fillStyle%20%3D%20g%3B%0A%20%20c.rect(100%2C15%2C15%2C80)%3B%0A%20%20c.fill()%3B%0A%20%20c.strokeStyle%20%3D%20'black'%3B%0A%20%20c.stroke()%3B%0A%0A%20%20c.beginPath()%3B%0A%20%20c.fillStyle%20%3D%20'yellow'%3B%0A%20%20c.arc(140%2C80%2C15%2C0%2C2*Math.PI%2C%20true)%3B%0A%20%20c.fill()%3B%0A%20%20c.beginPath()%3B%0A%20%20c.fillStyle%20%3D%20'lime'%3B%0A%20%20c.moveTo(140%2C80)%3B%0A%20%20c.arc(140%2C80%2C15%2C-Math.PI%2F2%2C1.2*Math.PI%2C%20false)%3B%0A%20%20c.fill()%3B%0A%20%20c.beginPath()%3B%0A%20%20c.arc(140%2C80%2C15%2C0%2C2*Math.PI%2C%20true)%3B%0A%20%20c.strokeStyle%20%3D%20'black'%3B%0A%20%20c.stroke()%3B%0A}%20finally%20{%0A%20%20c.restore()%3B%0A}%0A -->
 
-  <p> <img alt="" class=extra src=http://images.whatwg.org/sample-progress.png>
+  <p> <img alt="" class=extra src=greenbox.png>
   When the element is wider than it is tall, the element is
   expected to be depicted as a horizontal progress bar, with the start
   on the right and the end on the left if the 'direction' property on
@@ -95635,7 +95635,7 @@ time[datetime] { binding: <i title="">time</i>; }</pre>
    same both in the drop down, and in the box showing the current
    selection.</p>
 
-   <p><img alt="" height=105 src=http://images.whatwg.org/bidiselect.png width=206></p> <!-- no need for alt text, the previous paragraph
+   <p><img alt="" height=105 src=greenbox.png width=206></p> <!-- no need for alt text, the previous paragraph
    describes it completely -->
 
   </div>
index 68b6e3c..b043589 100644 (file)
@@ -74,6 +74,8 @@ function runLoop()
     } else {
         logStatistics(times);
         window.doneFunction();
+        if (window.layoutTestController)
+            layoutTestController.notifyDone();
     }
 }
 
@@ -101,3 +103,8 @@ function start(runCount, runFunction, loopsPerRun, doneFunction) {
     log("Running " + runCount + " times");
     runLoop();
 }
+
+if (window.layoutTestController) {
+    layoutTestController.waitUntilDone();
+    layoutTestController.dumpAsText();
+}
index f44e585..90679e3 100644 (file)
@@ -1,3 +1,38 @@
+2012-01-19  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Some perf tests time out when ran by run-perf-tests
+        https://bugs.webkit.org/show_bug.cgi?id=76612
+
+        Reviewed by Dirk Pranke and Eric Seidel.
+
+        Always pass --no-timeout to DumpRenderTree from run-perf-tests.
+        Otherwise some tests such as Parser/xml-parser.html will timeout.
+
+        --no-timeout option is currently supported by Chromium and Mac ports.
+
+        * Scripts/webkitpy/layout_tests/port/base.py:
+        (Port.to.create_driver):
+        * Scripts/webkitpy/layout_tests/port/chromium.py:
+        (ChromiumDriver.__init__):
+        (ChromiumDriver._wrapper_options):
+        * Scripts/webkitpy/layout_tests/port/driver.py:
+        (Driver.__init__):
+        (DriverProxy.__init__):
+        * Scripts/webkitpy/layout_tests/port/webkit.py:
+        (WebKitDriver.__init__):
+        (WebKitDriver.cmd_line):
+        * Scripts/webkitpy/layout_tests/port/webkit_unittest.py:
+        (WebKitDriverTest.test_read_binary_block):
+        (WebKitDriverTest):
+        (WebKitDriverTest.test_no_timeout):
+        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+        (get_tests_run.RecordingTestDriver.__init__):
+        * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+        (PerfTestsRunner._parse_args):
+        (PerfTestsRunner._run_tests_set):
+        * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+        (create_runner):
+
 2012-01-19  Ben Wells  <benwells@chromium.org>
 
         Add support for window.print to chromium DRT
index 5270480..753e6ee 100755 (executable)
@@ -740,9 +740,9 @@ class Port(object):
         results_filename in a users' browser."""
         return self.host.user.open_url(path.abspath_to_uri(results_filename))
 
-    def create_driver(self, worker_number):
+    def create_driver(self, worker_number, no_timeout=False):
         """Return a newly created Driver subclass for starting/stopping the test driver."""
-        return driver.DriverProxy(self, worker_number, self._driver_class(), pixel_tests=self.get_option('pixel_tests'))
+        return driver.DriverProxy(self, worker_number, self._driver_class(), pixel_tests=self.get_option('pixel_tests'), no_timeout=no_timeout)
 
     def start_helper(self):
         """If a port needs to reconfigure graphics settings or do other
index 6566e9b..bd5100e 100755 (executable)
@@ -391,8 +391,8 @@ class ChromiumPort(Port):
 
 # FIXME: This should inherit from WebKitDriver now that Chromium has a DumpRenderTree process like the rest of WebKit.
 class ChromiumDriver(Driver):
-    def __init__(self, port, worker_number, pixel_tests):
-        Driver.__init__(self, port, worker_number, pixel_tests)
+    def __init__(self, port, worker_number, pixel_tests, no_timeout=False):
+        Driver.__init__(self, port, worker_number, pixel_tests, no_timeout)
         self._proc = None
         self._image_path = None
         if self._pixel_tests:
@@ -406,6 +406,8 @@ class ChromiumDriver(Driver):
         # FIXME: This is not None shouldn't be necessary, unless --js-flags="''" changes behavior somehow?
         if self._port.get_option('js_flags') is not None:
             cmd.append('--js-flags="' + self._port.get_option('js_flags') + '"')
+        if self._no_timeout:
+            cmd.append("--no-timeout")
 
         # FIXME: We should be able to build this list using only an array of
         # option names, the options (optparse.Values) object, and the orignal
index 93125be..5d5ac6c 100644 (file)
@@ -63,7 +63,7 @@ class DriverOutput(object):
 class Driver(object):
     """Abstract interface for the DumpRenderTree interface."""
 
-    def __init__(self, port, worker_number, pixel_tests):
+    def __init__(self, port, worker_number, pixel_tests, no_timeout=False):
         """Initialize a Driver to subsequently run tests.
 
         Typically this routine will spawn DumpRenderTree in a config
@@ -75,6 +75,7 @@ class Driver(object):
         self._port = port
         self._worker_number = worker_number
         self._pixel_tests = pixel_tests
+        self._no_timeout = no_timeout
 
     def run_test(self, driver_input):
         """Run a single test and return the results.
@@ -142,12 +143,12 @@ class DriverProxy(object):
     one without. This allows us to handle plain text tests and ref tests with a
     single driver."""
 
-    def __init__(self, port, worker_number, driver_instance_constructor, pixel_tests):
-        self._driver = driver_instance_constructor(port, worker_number, pixel_tests)
+    def __init__(self, port, worker_number, driver_instance_constructor, pixel_tests, no_timeout):
+        self._driver = driver_instance_constructor(port, worker_number, pixel_tests, no_timeout)
         if pixel_tests:
             self._reftest_driver = self._driver
         else:
-            self._reftest_driver = driver_instance_constructor(port, worker_number, pixel_tests=True)
+            self._reftest_driver = driver_instance_constructor(port, worker_number, pixel_tests, no_timeout)
 
     def is_http_test(self, test_name):
         return self._driver.is_http_test(test_name)
index c6183e1..cbac69e 100644 (file)
@@ -448,8 +448,8 @@ class WebKitPort(Port):
 class WebKitDriver(Driver):
     """WebKit implementation of the DumpRenderTree/WebKitTestRunner interface."""
 
-    def __init__(self, port, worker_number, pixel_tests):
-        Driver.__init__(self, port, worker_number, pixel_tests)
+    def __init__(self, port, worker_number, pixel_tests, no_timeout=False):
+        Driver.__init__(self, port, worker_number, pixel_tests, no_timeout)
         self._driver_tempdir = port._filesystem.mkdtemp(prefix='%s-' % self._port.driver_name())
         # WebKitTestRunner can report back subprocess crashes by printing
         # "#CRASHED - PROCESSNAME".  Since those can happen at any time
@@ -481,6 +481,8 @@ class WebKitDriver(Driver):
             cmd.append('--complex-text')
         if self._port.get_option('threaded'):
             cmd.append('--threaded')
+        if self._no_timeout:
+            cmd.append('--no-timeout')
         # FIXME: We need to pass --timeout=SECONDS to WebKitTestRunner for WebKit2.
 
         cmd.extend(self._port.get_option('additional_drt_flag', []))
index 134c362..d2056fb 100755 (executable)
@@ -284,3 +284,8 @@ class WebKitDriverTest(unittest.TestCase):
         self.assertEquals(content_block.content_hash, 'actual')
         self.assertEquals(content_block.content, '12345678')
         self.assertEquals(content_block.decoded_content, '12345678')
+
+    def test_no_timeout(self):
+        port = TestWebKitPort()
+        driver = WebKitDriver(port, 0, pixel_tests=True, no_timeout=True)
+        self.assertEquals(driver.cmd_line(), ['MOCK output of child process/DumpRenderTree', '--pixel-tests', '--no-timeout', '-'])
index 0ff5f20..e3f6980 100755 (executable)
@@ -150,7 +150,7 @@ def get_tests_run(extra_args=None, tests_included=False, flatten_batches=False,
 
     class RecordingTestDriver(TestDriver):
         def __init__(self, port, worker_number):
-            TestDriver.__init__(self, port, worker_number, pixel_tests=port.get_option('pixel_test'))
+            TestDriver.__init__(self, port, worker_number, pixel_tests=port.get_option('pixel_test'), no_timeout=False)
             self._current_test_batch = None
 
         def stop(self):
index f075477..ceda74e 100644 (file)
@@ -79,7 +79,7 @@ class PerfTestsRunner(object):
                                 help="Check to ensure the DumpRenderTree build is up-to-date (default)."),
             optparse.make_option("--build-directory",
                                  help="Path to the directory under which build files are kept (should not include configuration)"),
-            optparse.make_option("--time-out-ms", default=30000,
+            optparse.make_option("--time-out-ms", default=600 * 1000,
                                  help="Set the timeout for each test"),
             optparse.make_option("--output-json-path",
                                  help="Filename of the JSON file that summaries the results"),
@@ -171,7 +171,7 @@ class PerfTestsRunner(object):
                 driver.stop()
                 driver = None
             if not driver:
-                driver = port.create_driver(worker_number=1)
+                driver = port.create_driver(worker_number=1, no_timeout=True)
 
             relative_test_path = self._host.filesystem.relpath(test, self._base_path)
             self._printer.write('Running %s (%d of %d)' % (relative_test_path, expected + unexpected + 1, len(tests)))
index d4580e0..f6e3e66 100755 (executable)
@@ -108,7 +108,7 @@ max 1120
 
         options, parsed_args = PerfTestsRunner._parse_args(args)
         test_port = TestPort(host=MockHost(), options=options)
-        test_port.create_driver = lambda worker_number=None: MainTest.TestDriver()
+        test_port.create_driver = lambda worker_number=None, no_timeout=False: MainTest.TestDriver()
 
         runner = PerfTestsRunner(regular_output, buildbot_output, args=args, port=test_port)
         runner._host.filesystem.maybe_make_directory(runner._base_path, 'inspector')