<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>134550</bug_id>
          
          <creation_ts>2014-07-02 11:08:37 -0700</creation_ts>
          <short_desc>Layout Test http/tests/cache/iframe-304-crash.html is flaky on GTK and Mac WebKit2 platforms</short_desc>
          <delta_ts>2015-09-06 23:08:21 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=140703</see_also>
          <bug_file_loc>http://build.webkit.org/results/Apple%20Mavericks%20Debug%20WK2%20%28Tests%29/r170423%20%285407%29/http/tests/cache/iframe-304-crash-pretty-diff.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1019998</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2014-07-02 11:08:37 -0700</bug_when>
    <thetext>The layout test http/tests/cache/iframe-304-crash.html is flaky on WebKit2 platforms (checked on the flakiness dashboard, both Apple Mavericks and GTK have random recent failures):

The diff is the following: http://build.webkit.org/results/Apple%20Mavericks%20Debug%20WK2%20%28Tests%29/r170423%20%285407%29/http/tests/cache/iframe-304-crash-pretty-diff.html

Probable cause:

Sometimes the event didFinishLoading for the newIframe inserted with document.body.appendChild don&apos;t happens (or happens after testRunner.notifyDone).

The following _bash_ command should be able to reproduce the failure in less than 100 iterations:

WebKit $ rm -fr layout-test-results; n=0; while ! test -f layout-test-results/http/tests/cache/iframe-304-crash-diff.txt; do Tools/Scripts/run-webkit-tests --no-show-results --no-new-test-results --no-sample-on-timeout --results-directory layout-test-results --debug-rwt-logging --release --webkit-test-runner --gtk --no-retry-failures http/tests/cache/cached-main-resource.html http/tests/cache/iframe-304-crash.html; n=$(( ${n} + 1 )); done
# In the above command replace &quot;--gtk&quot; with your port name (if you are not running the GTK port)
WebKit $ echo &quot;Test failed after ${n} iters&quot;
WebKit $ cat layout-test-results/http/tests/cache/iframe-304-crash-diff.txt


I tested the following patch:

--- a/LayoutTests/http/tests/cache/iframe-304-crash.html
+++ b/LayoutTests/http/tests/cache/iframe-304-crash.html
@@ -11,7 +11,7 @@ function removeAndReplaceIframe() {
     document.body.removeChild(document.getElementById(&quot;iframe&quot;));
     var newIframe = document.createElement(&quot;iframe&quot;);
     newIframe.src = &quot;resources/iframe304.php&quot;;
-    newIframe.onload = function() { setTimeout(finish, 0); }
+    newIframe.onload = function() { setTimeout(finish, 100); }
     document.body.appendChild(newIframe);
 }
 

And with it I&apos;m not longer able to reproduce the failure. However I&apos;m afraid that this would only workaround the issue (just wait 100ms more) but won&apos;t fix the underlying problem.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>