<?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>30598</bug_id>
          
          <creation_ts>2009-10-20 13:44:06 -0700</creation_ts>
          <short_desc>LayoutTests/editing/selection/editable-html-element.html is flaky on Chrome bots</short_desc>
          <delta_ts>2009-10-21 14:44:42 -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>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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="Evan Martin">evan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric</cc>
    
    <cc>jparent</cc>
    
    <cc>mjs</cc>
    
    <cc>ojan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>156279</commentid>
    <comment_count>0</comment_count>
    <who name="Evan Martin">evan</who>
    <bug_when>2009-10-20 13:44:06 -0700</bug_when>
    <thetext>This test has had only mixed success on the Chromium builders.

http://src.chromium.org/viewvc/chrome/trunk/src/webkit/tools/layout_tests/flakiness_dashboard.html#tests=LayoutTests%2Fediting%2Fselection%2Feditable-html-element.html

The symptom when it fails is that runTest() is not defined.
I haven&apos;t been able to reproduce the failure locally, but the JS experts suggest that perhaps these floating &lt;script&gt; tags are creating the body element too early.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156281</commentid>
    <comment_count>1</comment_count>
      <attachid>41521</attachid>
    <who name="Evan Martin">evan</who>
    <bug_when>2009-10-20 13:46:20 -0700</bug_when>
    <thetext>Created attachment 41521
guess at a fix for the test</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156336</commentid>
    <comment_count>2</comment_count>
    <who name="Evan Martin">evan</who>
    <bug_when>2009-10-20 16:34:10 -0700</bug_when>
    <thetext>The test in question, for those following at home

http://trac.webkit.org/browser/trunk/LayoutTests/editing/selection/editable-html-element.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156337</commentid>
    <comment_count>3</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2009-10-20 16:42:44 -0700</bug_when>
    <thetext>I think it&apos;s almost impossible for this patch to affect the outcome of the test. &lt;script&gt; inside &lt;html&gt; will create an implicit &lt;head&gt;, and &lt;body&gt; will implicitly close the &lt;head&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156338</commentid>
    <comment_count>4</comment_count>
      <attachid>41521</attachid>
    <who name="Evan Martin">evan</who>
    <bug_when>2009-10-20 16:42:58 -0700</bug_when>
    <thetext>Comment on attachment 41521
guess at a fix for the test

maciej looked at this on IRC and suggested some other ideas.  removing review bits.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156339</commentid>
    <comment_count>5</comment_count>
    <who name="Evan Martin">evan</who>
    <bug_when>2009-10-20 16:47:27 -0700</bug_when>
    <thetext>Chrome-side bug: http://code.google.com/p/chromium/issues/detail?id=25355</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156503</commentid>
    <comment_count>6</comment_count>
      <attachid>41571</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-21 09:48:36 -0700</bug_when>
    <thetext>Created attachment 41571
results when the test fails</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156504</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-21 09:49:04 -0700</bug_when>
    <thetext>I got those results by going to:
http://src.chromium.org/viewvc/chrome/trunk/src/webkit/tools/layout_tests/flakiness_dashboard.html#tests=LayoutTests%2Fediting%2Fselection%2Feditable-html-element.html
and clicking on one of the red bars and downloading the layout-test-results.zip</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156506</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-21 09:56:41 -0700</bug_when>
    <thetext>It looks like the only difference in results is the extra &quot;runTest() is not defined&quot;.  See the mac results:
http://trac.webkit.org/browser/trunk/LayoutTests/platform/mac/editing/selection/editable-html-element-expected.txt?format=txt

I wonder if this could be some sort of v8 bug where it&apos;s logging an non-sensical error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156507</commentid>
    <comment_count>9</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-21 09:57:08 -0700</bug_when>
    <thetext>Could the runTest() not defined log be coming from a previous test?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156508</commentid>
    <comment_count>10</comment_count>
    <who name="Evan Martin">evan</who>
    <bug_when>2009-10-21 10:00:48 -0700</bug_when>
    <thetext>Wow, I fail.  Eric is implicitly noting that runTest is clearly still running because the rest of the test output is still ok.  There&apos;s just the extra line.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156512</commentid>
    <comment_count>11</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-21 10:12:17 -0700</bug_when>
    <thetext>I&apos;m not sure if the output is &quot;still OK&quot;, but it does look identical.  I did a quick visual-inspection diff, I did not run &quot;diff&quot; against the two output files to confirm that they&apos;re exactly the same besides that line.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156524</commentid>
    <comment_count>12</comment_count>
    <who name="Julie Parent">jparent</who>
    <bug_when>2009-10-21 10:32:50 -0700</bug_when>
    <thetext>Another data point: LayoutTests/editing/selection/drag-to-contenteditable-iframe.html is doing the same thing.  It fails with the extra runTest is not defined message, but clearly it is running properly since the rest of the output is ok.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156555</commentid>
    <comment_count>13</comment_count>
    <who name="Evan Martin">evan</who>
    <bug_when>2009-10-21 11:11:52 -0700</bug_when>
    <thetext>I had diffed the fail/pass tests before, and that (In reply to comment #11)
&gt; I&apos;m not sure if the output is &quot;still OK&quot;, but it does look identical.  I did a
&gt; quick visual-inspection diff, I did not run &quot;diff&quot; against the two output files
&gt; to confirm that they&apos;re exactly the same besides that line.

Yes, it&apos;s identical (I had run diff before when trying to figure out what was going wrong) other than the extra line.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156647</commentid>
    <comment_count>14</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2009-10-21 14:26:34 -0700</bug_when>
    <thetext>There seems to be two bugs here.
1. Errors that occur after a notifyDone call get output to the next test run in TestShell. Will fix this in TestShell.
2. There&apos;s a race between document teardown and an images onload handler. Namely, the image&apos;s onload handler is called after the runTest function has be destroyed. It&apos;s not clear to me whether this is a V8 or a WebCore bug.

Here&apos;s what&apos;s going on:

LayoutTests/editing/selection/drag-to-contenteditable-iframe.html drags an image with onload=&quot;runTest()&quot; into a contentEditable region, creating a new image element with it&apos;s own onload handler. There&apos;s a race between the document teardown and the load event of the dragged in image.

The reason LayoutTests/editing/selection/editable-html-element.html is involved is that it happens to run after drag-to-contenteditable-iframe.html. Since the racy onload handler fires after we&apos;ve called notifyDone, the logged error gets inserted into editable-html-element.html&apos;s results.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156654</commentid>
    <comment_count>15</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2009-10-21 14:44:42 -0700</bug_when>
    <thetext>OK. Nevermind. There&apos;s just the TestShell bug. runTest is undefined because it&apos;s run in the context of the iframe.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>41521</attachid>
            <date>2009-10-20 13:46:20 -0700</date>
            <delta_ts>2009-10-20 16:42:58 -0700</delta_ts>
            <desc>guess at a fix for the test</desc>
            <filename>bug-30598-20091020134619.patch</filename>
            <type>text/plain</type>
            <size>1457</size>
            <attacher name="Evan Martin">evan</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL0xheW91dFRlc3RzL0NoYW5nZUxvZyBiL0xheW91dFRlc3RzL0NoYW5nZUxv
ZwppbmRleCAyYjYyY2QyLi5mOGQ2NjU1IDEwMDY0NAotLS0gYS9MYXlvdXRUZXN0cy9DaGFuZ2VM
b2cKKysrIGIvTGF5b3V0VGVzdHMvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTMgQEAKKzIwMDktMTAt
MjAgIEV2YW4gTWFydGluICA8ZXZhbkBjaHJvbWl1bS5vcmc+CisKKyAgICAgICAgUmV2aWV3ZWQg
YnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgR3Vlc3MgYXQgYSBmaXggZm9yIGEgdGVzdCB0
aGF0IG9jY2FzaW9uYWxseSBmYWlscy4KKworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9y
Zy9zaG93X2J1Zy5jZ2k/aWQ9MzA1OTgKKworICAgICAgICAqIGVkaXRpbmcvc2VsZWN0aW9uL2Vk
aXRhYmxlLWh0bWwtZWxlbWVudC5odG1sOiBhZGQgPGhlYWQ+LgorCiAyMDA5LTEwLTIwICBYYW4g
TG9wZXogIDx4bG9wZXpAaWdhbGlhLmNvbT4KIAogICAgICAgICBTa2lwIDMgZmFpbGluZyB4bWxo
dHRwcmVxdWVzdCB0ZXN0cy4KZGlmZiAtLWdpdCBhL0xheW91dFRlc3RzL2VkaXRpbmcvc2VsZWN0
aW9uL2VkaXRhYmxlLWh0bWwtZWxlbWVudC5odG1sIGIvTGF5b3V0VGVzdHMvZWRpdGluZy9zZWxl
Y3Rpb24vZWRpdGFibGUtaHRtbC1lbGVtZW50Lmh0bWwKaW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tbD4=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>41571</attachid>
            <date>2009-10-21 09:48:36 -0700</date>
            <delta_ts>2009-10-21 09:48:36 -0700</delta_ts>
            <desc>results when the test fails</desc>
            <filename>editable-html-element-actual.txt</filename>
            <type>text/plain</type>
            <size>2848</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">Q09OU09MRSBNRVNTQUdFOiBsaW5lIDE6IFVuY2F1Z2h0IFJlZmVyZW5jZUVycm9yOiBydW5UZXN0
IGlzIG5vdCBkZWZpbmVkCkVESVRJTkcgREVMRUdBVEU6IHNob3VsZEJlZ2luRWRpdGluZ0luRE9N
UmFuZ2U6cmFuZ2UgZnJvbSAwIG9mIEhUTUwgPiAjZG9jdW1lbnQgdG8gMiBvZiBIVE1MID4gI2Rv
Y3VtZW50CkVESVRJTkcgREVMRUdBVEU6IHdlYlZpZXdEaWRCZWdpbkVkaXRpbmc6V2ViVmlld0Rp
ZEJlZ2luRWRpdGluZ05vdGlmaWNhdGlvbgpFRElUSU5HIERFTEVHQVRFOiBzaG91bGRDaGFuZ2VT
ZWxlY3RlZERPTVJhbmdlOihudWxsKSB0b0RPTVJhbmdlOnJhbmdlIGZyb20gMCBvZiBCT0RZID4g
SFRNTCA+ICNkb2N1bWVudCB0byAwIG9mIEJPRFkgPiBIVE1MID4gI2RvY3VtZW50IGFmZmluaXR5
Ok5TU2VsZWN0aW9uQWZmaW5pdHlEb3duc3RyZWFtIHN0aWxsU2VsZWN0aW5nOkZBTFNFCkVESVRJ
TkcgREVMRUdBVEU6IHdlYlZpZXdEaWRDaGFuZ2VTZWxlY3Rpb246V2ViVmlld0RpZENoYW5nZVNl
bGVjdGlvbk5vdGlmaWNhdGlvbgpFRElUSU5HIERFTEVHQVRFOiBzaG91bGRDaGFuZ2VTZWxlY3Rl
ZERPTVJhbmdlOnJhbmdlIGZyb20gMCBvZiBCT0RZID4gSFRNTCA+IC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