<?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>25380</bug_id>
          
          <creation_ts>2009-04-24 15:37:52 -0700</creation_ts>
          <short_desc>LayoutTests/media/video-played.html has a race condition when starting the test.</short_desc>
          <delta_ts>2009-04-24 15:53:03 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></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="Pierre d&apos;Herbemont">pdherbemont</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>118753</commentid>
    <comment_count>0</comment_count>
    <who name="Pierre d&apos;Herbemont">pdherbemont</who>
    <bug_when>2009-04-24 15:37:52 -0700</bug_when>
    <thetext>LayoutTests/media/video-played.html has a race condition when starting the test.

The test may attempt to call video.play() even before the &apos;canplay&apos; event has been fired.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118754</commentid>
    <comment_count>1</comment_count>
      <attachid>29768</attachid>
    <who name="Pierre d&apos;Herbemont">pdherbemont</who>
    <bug_when>2009-04-24 15:39:03 -0700</bug_when>
    <thetext>Created attachment 29768
patch v1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118755</commentid>
    <comment_count>2</comment_count>
      <attachid>29768</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-04-24 15:41:57 -0700</bug_when>
    <thetext>Comment on attachment 29768
patch v1.

&gt; Index: LayoutTests/ChangeLog
&gt; ===================================================================
&gt; --- LayoutTests/ChangeLog	(revision 42845)
&gt; +++ LayoutTests/ChangeLog	(working copy)
&gt; @@ -1,3 +1,16 @@
&gt; +2009-04-24  Pierre d&apos;Herbemont  &lt;pdherbemont@apple.com&gt;
&gt; +
&gt; +        Reviewed by NOBODY (OOPS!).
&gt; +
&gt; +        Fixed a race condition on the first &apos;played&apos; attribute test start.
&gt; +
&gt; +        Previously we were starting nearly right away to play, and probably
&gt; +        before receiving the &apos;canplay&apos; event. Now we ensure we&apos;ll wait for
&gt; +        that &apos;canplay&apos; event before attempting to play.

&quot;...before starting the tests.&quot;

&gt;                  waitForEvent(&quot;loadedmetadata&quot;);
&gt; -                waitForEvent(&quot;canplay&quot;, canplay);
&gt; +                waitForEvent(&quot;canplay&quot;, canplay); // Will triggers nextTest() which launches the tests.

&quot;Will trigger&quot;

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118758</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-04-24 15:53:03 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/42848</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>29768</attachid>
            <date>2009-04-24 15:39:03 -0700</date>
            <delta_ts>2009-04-24 15:41:57 -0700</delta_ts>
            <desc>patch v1.</desc>
            <filename>played_patchv1.patch</filename>
            <type>text/plain</type>
            <size>2235</size>
            <attacher name="Pierre d&apos;Herbemont">pdherbemont</attacher>
            
              <data encoding="base64">SW5kZXg6IExheW91dFRlc3RzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT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AgICAgICAg
ICAgfQogCiAgICAgICAgICAgICBmdW5jdGlvbiB3aWxsQ3JlYXRlTmV3UmFuZ2UoKQpAQCAtMjU3
LDEyICsyNTYsMTAgQEAKICAgICAgICAgICAgICAgICB3YWl0Rm9yRXZlbnQoImxvYWRzdGFydCIp
OwogICAgICAgICAgICAgICAgIHdhaXRGb3JFdmVudCgicmF0ZWNoYW5nZSIpOwogICAgICAgICAg
ICAgICAgIHdhaXRGb3JFdmVudCgibG9hZGVkbWV0YWRhdGEiKTsKLSAgICAgICAgICAgICAgICB3
YWl0Rm9yRXZlbnQoImNhbnBsYXkiLCBjYW5wbGF5KTsKKyAgICAgICAgICAgICAgICB3YWl0Rm9y
RXZlbnQoImNhbnBsYXkiLCBjYW5wbGF5KTsgLy8gV2lsbCB0cmlnZ2VycyBuZXh0VGVzdCgpIHdo
aWNoIGxhdW5jaGVzIHRoZSB0ZXN0cy4KICAgICAgICAgICAgICAgICB3YWl0Rm9yRXZlbnQoInBh
dXNlIiwgcGF1c2UpOwogCiAgICAgICAgICAgICAgICAgdmlkZW8ubG9hZCgpOwotCi0gICAgICAg
ICAgICAgICAgbmV4dFRlc3QoKTsKICAgICAgICAgICAgIH0KICAgICAgICAgPC9zY3JpcHQ+CiAg
ICAgIDwvaGVhZD4K
</data>
<flag name="review"
          id="14896"
          type_id="1"
          status="+"
          setter="simon.fraser"
    />
          </attachment>
      

    </bug>

</bugzilla>