[webkit-changes] cvs commit: LayoutTests/fast/js object-by-name-or-id-expected.txt object-by-name-or-id.html

David harrison at opensource.apple.com
Mon Oct 24 14:42:32 PDT 2005


harrison    05/10/24 14:42:32

  Modified:    .        ChangeLog
  Added:       fast/js  object-by-name-or-id-expected.txt
                        object-by-name-or-id.html
  Log:
          Reviewed by Darin.  Committed by David Harrison.
  
          http://bugzilla.opendarwin.org/show_bug.cgi?id=5449
          "OBJECT should be accessible by id/name as document property only if its only children are PARAMs"
  
          * fast/js/object-by-name-or-id-expected.txt: Added.
          * fast/js/object-by-name-or-id.html: Added.
  
  Revision  Changes    Path
  1.47      +10 -0     LayoutTests/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/LayoutTests/ChangeLog,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- ChangeLog	24 Oct 2005 17:47:21 -0000	1.46
  +++ ChangeLog	24 Oct 2005 21:42:31 -0000	1.47
  @@ -1,3 +1,13 @@
  +2005-10-24  Mitz Pettel  <opendarwin.org at mitzpettel.com>
  +
  +        Reviewed by Darin.  Committed by David Harrison.
  +
  +        http://bugzilla.opendarwin.org/show_bug.cgi?id=5449
  +        "OBJECT should be accessible by id/name as document property only if its only children are PARAMs"
  +
  +        * fast/js/object-by-name-or-id-expected.txt: Added.
  +        * fast/js/object-by-name-or-id.html: Added.
  +
   2005-10-24  Beth Dakin  <bdakin at apple.com>
   
           Layout test for http://bugzilla.opendarwin.org/show_bug.cgi?id=5318
  
  
  
  1.1                  LayoutTests/fast/js/object-by-name-or-id-expected.txt
  
  Index: object-by-name-or-id-expected.txt
  ===================================================================
  This tests when object elements are accessible by name or id directly as properties of the document object. IE allows this only if the object has not child nodes other than param and whitespace anonymous text. A PASS result means that behavior matches IE. WebKit’s results for comments differ.
  
  Results:
  
  By name:
  no children: PASS
  param: PASS
  param and whitespace: PASS
  param and empty comment (expected to fail): FAIL
  param and non-empty comment (expected to fail): FAIL
  param and text: PASS
  param and img: PASS
  
  By id:
  no children: PASS
  param: PASS
  param and whitespace: PASS
  param and empty comment (expected to fail): FAIL
  param and non-empty comment (expected to fail): FAIL
  param and text: PASS
  param and img: PASS
  
  
  
  
  1.1                  LayoutTests/fast/js/object-by-name-or-id.html
  
  Index: object-by-name-or-id.html
  ===================================================================
  <body>
  
  <p>This tests when object elements are accessible by name or id directly as properties of the
  document object. IE allows this only if the object has not child nodes other than param and
  whitespace anonymous text. A PASS result means that behavior matches IE. WebKit&rsquo;s results for comments differ.
  </p>
  
  <hr>
  
  <script>
  if (window.layoutTestController)
      window.layoutTestController.dumpAsText();
  </script>
  
  <div style="visibility: hidden; width: 0px; height: 0px;">
  <object name="object1" width="0" height="0"></object>
  <object name="object2" width="0" height="0"><param name="p" value="v"></object>
  <object name="object5" width="0" height="0"><param name="p" value="v">    </object>
  <object name="object9" width="0" height="0"><param name="p" value="v"><!-- --></object>
  <object name="object11" width="0" height="0"><param name="p" value="v"><!-- comment --></object>
  <object name="object6" width="0" height="0"><param name="p" value="v">text</object>
  <object name="object13" width="0" height="0"><param name="p" value="v"><img width="0" height="0"></object>
  <object id="object3" width="0" height="0"></object>
  <object id="object4" width="0" height="0"><param name="p" value="v"></object>
  <object id="object8" width="0" height="0"><param name="p" value="v">    </object>
  <object id="object10" width="0" height="0"><param name="p" value="v"><!-- --></object>
  <object id="object12" width="0" height="0"><param name="p" value="v"><!-- comment --></object>
  <object id="object7" width="0" height="0"><param name="p" value="v">text</object>
  <object id="object14" width="0" height="0"><param name="p" value="v"><img width="0" height="0"></object>
  </div>
  
  <pre id="results">
  Results:<br>
  </pre>
  
  <script>
  function print(x)
  {
     document.getElementById("results").innerHTML += x;
  }
  
  function testProperty(description, propName, IE) {
      print(description);
      print(":");
      var propVal = document[propName];
  
      print(!propVal == IE ? " FAIL" : " PASS");
      print("<br>");
  }
  
  print("By name:<br>");
  testProperty("no children", "object1", true);
  testProperty("param", "object2", true);
  testProperty("param and whitespace", "object5", true);
  testProperty("param and empty comment (expected to fail)", "object9", false);
  testProperty("param and non-empty comment (expected to fail)", "object11", false);
  testProperty("param and text", "object6", false);
  testProperty("param and img", "object13", false);
  print("<br>By id:<br>");
  testProperty("no children", "object3", true);
  testProperty("param", "object4", true);
  testProperty("param and whitespace", "object8", true);
  testProperty("param and empty comment (expected to fail)", "object10", false);
  testProperty("param and non-empty comment (expected to fail)", "object12", false);
  testProperty("param and text", "object7", false);
  testProperty("param and img", "object14", false);
  
  </script>
  </body>
  
  



More information about the webkit-changes mailing list