<?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>22612</bug_id>
          
          <creation_ts>2008-12-02 17:25:29 -0800</creation_ts>
          <short_desc>Add test to verify type enforcement in DOM setters</short_desc>
          <delta_ts>2008-12-19 13:18:52 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</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="Pam Greene (IRC:pamg)">pam</reporter>
          <assigned_to name="Adam Barth">abarth</assigned_to>
          <cc>abarth</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101127</commentid>
    <comment_count>0</comment_count>
    <who name="Pam Greene (IRC:pamg)">pam</who>
    <bug_when>2008-12-02 17:25:29 -0800</bug_when>
    <thetext>Another test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101129</commentid>
    <comment_count>1</comment_count>
      <attachid>25695</attachid>
    <who name="Pam Greene (IRC:pamg)">pam</who>
    <bug_when>2008-12-02 17:28:18 -0800</bug_when>
    <thetext>Created attachment 25695
New test + result

This test could be made much more comprehensive, but to be honest, I don&apos;t know enough about underlying DOM structure to know what ought to be possible and what not.  These are the only two examples we actually encountered in the wild.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101209</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-12-03 09:11:27 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; This test could be made much more comprehensive, but to be honest, I don&apos;t know
&gt; enough about underlying DOM structure to know what ought to be possible and
&gt; what not.

Our usual approach is to make a more comprehensive test without worrying unduly about whether the current behavior is correct or not -- a regression test has lots of value even if it has to be revised later once we understand what&apos;s correct and what&apos;s not.

So my approach if I was writing a test would be to make a long list of functions and make a test that covers them as completely as possible. I&apos;ll review this soon; although someone else is welcome to. Still wading through a lot of correspondence after my return from &quot;vacation&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101327</commentid>
    <comment_count>3</comment_count>
      <attachid>25695</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-12-04 09:16:23 -0800</bug_when>
    <thetext>Comment on attachment 25695
New test + result

For a test like this, the preferred form is to have the entire test in a .js file and let the make-js-test-wrappers test create a boilerplate wrapper.

It&apos;s a little strange to have this test only these two specific setters. It would be way better to have something that made an attempt to be exhaustive.

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102790</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2008-12-17 11:22:50 -0800</bug_when>
    <thetext>Will land.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102796</commentid>
    <comment_count>5</comment_count>
    <who name="Pam Greene (IRC:pamg)">pam</who>
    <bug_when>2008-12-17 11:55:52 -0800</bug_when>
    <thetext>Sorry for leaving this on the queue. I was hoping to write a more complete test, but I&apos;ve since gotten mired in other things and won&apos;t be getting back to this for a bit.  So you&apos;re welcome to land it; I&apos;ll improve it later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102807</commentid>
    <comment_count>6</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2008-12-17 13:41:21 -0800</bug_when>
    <thetext>LayoutTests/ChangeLog: locally modified
LayoutTests/fast/dom/null-document-xmlhttprequest-open.html: locally modified
LayoutTests/fast/dom/xmlhttprequest-invalid-values.html: locally modified
	M	LayoutTests/ChangeLog
	A	fast/dom/setter-type-enforcement-expected.txt
	A	fast/dom/setter-type-enforcement.html
Committed r39363
	A	fast/dom/setter-type-enforcement-expected.txt
	A	fast/dom/setter-type-enforcement.html
	M	LayoutTests/ChangeLog
r39363 = 6e34f4ececac5729488eae7cb0d6359322c15107 (trunk)
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102811</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2008-12-17 13:42:38 -0800</bug_when>
    <thetext>No worries.  It makes me feel useful to clean out some things in the commit queue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102904</commentid>
    <comment_count>8</comment_count>
    <who name="Pam Greene (IRC:pamg)">pam</who>
    <bug_when>2008-12-18 09:58:12 -0800</bug_when>
    <thetext>&gt;         A       fast/dom/setter-type-enforcement-expected.txt
&gt;         A       fast/dom/setter-type-enforcement.html
&gt;         M       LayoutTests/ChangeLog

Moved the tests from root level into LayoutTests/fast/dom/ in r39375.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102955</commentid>
    <comment_count>9</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2008-12-18 19:14:30 -0800</bug_when>
    <thetext>Test fails on buildbot.  I thought it passed on my machine, but I might have been mistaken.  Here&apos;s the diff:

--- layout-test-results/fast/dom/setter-type-enforcement-expected.txt	2008-12-18 18:04:24.000000000 -0800
+++ layout-test-results/fast/dom/setter-type-enforcement-actual.txt	2008-12-18 18:04:24.000000000 -0800
@@ -8,12 +8,6 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
-Tests type enforcement on DOM setters.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
 PASS document.body = nodelist; threw exception Error: HIERARCHY_REQUEST_ERR: DOM Exception 3.
 PASS table.tHead = nodelist; threw exception Error: NOT_FOUND_ERR: DOM Exception 8.
 PASS successfullyParsed is true</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103003</commentid>
    <comment_count>10</comment_count>
    <who name="Pam Greene (IRC:pamg)">pam</who>
    <bug_when>2008-12-19 10:58:04 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; Test fails on buildbot.  I thought it passed on my machine, but I might have
&gt; been mistaken.

Patching error.  Both the test and the expected results in the repository were doubled copies of the patch attached here.  See

http://trac.webkit.org/browser/trunk/LayoutTests/fast/dom/setter-type-enforcement.html?rev=39375

http://trac.webkit.org/browser/trunk/LayoutTests/fast/dom/setter-type-enforcement-expected.txt?rev=39375

I&apos;ll resubmit corrected copies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103004</commentid>
    <comment_count>11</comment_count>
    <who name="Pam Greene (IRC:pamg)">pam</who>
    <bug_when>2008-12-19 11:12:02 -0800</bug_when>
    <thetext>Resubmitted in r39410.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103017</commentid>
    <comment_count>12</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2008-12-19 13:18:52 -0800</bug_when>
    <thetext>(In reply to comment #10)
&gt; Patching error.  Both the test and the expected results in the repository were
&gt; doubled copies of the patch attached here.  See

Oops.  Sorry about that.  I must have screwed up my pre-submit git rebase somehow.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>25695</attachid>
            <date>2008-12-02 17:28:18 -0800</date>
            <delta_ts>2008-12-04 09:16:23 -0800</delta_ts>
            <desc>New test + result</desc>
            <filename>22612a.txt</filename>
            <type>text/plain</type>
            <size>2152</size>
            <attacher name="Pam Greene (IRC:pamg)">pam</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2V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QgaXMgbm90IGEgTm9kZSwgc28gZG9jdW1lbnQuYm9keSBj
YW4ndCBiZSBzZXQgdG8gb25lLgordmFyIG5vZGVsaXN0ID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNC
eU5hbWUoJ3NpbGx5cGFudHMnKTsKK3Nob3VsZFRocm93KCJkb2N1bWVudC5ib2R5ID0gbm9kZWxp
c3Q7Iik7CisKKy8vIE5vZGVMaXN0IGlzIGFsc28gbm90IGFuIEhUTUxUYWJsZVNlY3Rpb25FbGVt
ZW50LgordmFyIHRhYmxlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgndGFibGUnKTsKK3Nob3Vs
ZFRocm93KCJ0YWJsZS50SGVhZCA9IG5vZGVsaXN0OyIpOworCit2YXIgc3VjY2Vzc2Z1bGx5UGFy
c2VkID0gdHJ1ZTsKKzwvc2NyaXB0PgorPHNjcmlwdCBzcmM9Ii4uL2pzL3Jlc291cmNlcy9qcy10
ZXN0LXBvc3QuanMiPjwvc2NyaXB0PgorPC9ib2R5PgorPC9odG1sPgorCg==
</data>
<flag name="review"
          id="11999"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>