[webkit-changes] cvs commit: WebCore/layout-tests/fast/js date-big-setdate-expected.txt date-big-setdate.html

Geoffrey ggaren at opensource.apple.com
Wed Jul 27 12:54:19 PDT 2005


ggaren      05/07/27 12:54:18

  Modified:    .        ChangeLog
               kjs      date_object.cpp
               .        ChangeLog
  Added:       layout-tests/fast/js date-big-setdate-expected.txt
                        date-big-setdate.html
  Log:
  JavaScriptCore:
  
          - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3381
          Date.prototype.setDate() incorrect for values >=128
  
          - Test cases added:
  
          * layout-tests/fast/js/date-big-setdate-expected.txt: Added.
          * layout-tests/fast/js/date-big-setdate.html: Added.
  
          Reviewed by darin.
  
          * kjs/date_object.cpp:
          (DateProtoFuncImp::call):
  
  WebCore:
  
          Test cases added:
  
          * layout-tests/fast/js/date-big-setdate-expected.txt: Added.
          * layout-tests/fast/js/date-big-setdate.html: Added.
  
  Revision  Changes    Path
  1.768     +15 -0     JavaScriptCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
  retrieving revision 1.767
  retrieving revision 1.768
  diff -u -r1.767 -r1.768
  --- ChangeLog	27 Jul 2005 18:22:13 -0000	1.767
  +++ ChangeLog	27 Jul 2005 19:54:13 -0000	1.768
  @@ -1,5 +1,20 @@
   2005-07-27  Geoffrey Garen  <ggaren at apple.com>
   
  +        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3381
  +        Date.prototype.setDate() incorrect for values >=128
  +        
  +        - Test cases added:
  +
  +        * layout-tests/fast/js/date-big-setdate-expected.txt: Added.
  +        * layout-tests/fast/js/date-big-setdate.html: Added.
  +
  +        Reviewed by darin.
  +
  +        * kjs/date_object.cpp:
  +        (DateProtoFuncImp::call):
  +
  +2005-07-27  Geoffrey Garen  <ggaren at apple.com>
  +
           -rolled in patch by Carsten Guenther <cguenther at gmail.com>
           for http://bugzilla.opendarwin.org/show_bug.cgi?id=3759
           Date object enhancements
  
  
  
  1.47      +3 -2      JavaScriptCore/kjs/date_object.cpp
  
  Index: date_object.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/date_object.cpp,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- date_object.cpp	27 Jul 2005 18:22:13 -0000	1.46
  +++ date_object.cpp	27 Jul 2005 19:54:14 -0000	1.47
  @@ -722,8 +722,9 @@
       ms = timeFromArgs(exec, args, 4, ms, t);
       break;
     case SetDate:
  -    t->tm_mday = args[0].toInt32(exec);
  -    break;
  +      t->tm_mday = 0;
  +      ms += args[0].toInt32(exec) * msPerDay;
  +      break;
     case SetMonth:
       t->tm_mon = args[0].toInt32(exec);
       if (args.size() >= 2)
  
  
  
  1.4479    +7 -0      WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4478
  retrieving revision 1.4479
  diff -u -r1.4478 -r1.4479
  --- ChangeLog	27 Jul 2005 18:55:36 -0000	1.4478
  +++ ChangeLog	27 Jul 2005 19:54:14 -0000	1.4479
  @@ -1,3 +1,10 @@
  +2005-07-27  Geoffrey Garen  <ggaren at apple.com>
  +
  +        Test cases added:
  +
  +        * layout-tests/fast/js/date-big-setdate-expected.txt: Added.
  +        * layout-tests/fast/js/date-big-setdate.html: Added.
  +
   2005-07-27  David Hyatt  <hyatt at apple.com>
   
   	Remove the "enforce a square size" rule for checkboxes. WinIE
  
  
  
  1.1                  WebCore/layout-tests/fast/js/date-big-setdate-expected.txt
  
  Index: date-big-setdate-expected.txt
  ===================================================================
  This test checks for regression against: 3381 Date.prototype.setDate() incorrect for values >=128.
  
  If the test passes, all the dates below will be sequential.
  
  setDate(120): Mon Mar 30 1970 16:00:00 GMT-0800
  
  setDate(121): Tue Mar 31 1970 16:00:00 GMT-0800
  
  setDate(122): Wed Apr 01 1970 16:00:00 GMT-0800
  
  setDate(123): Thu Apr 02 1970 16:00:00 GMT-0800
  
  setDate(124): Fri Apr 03 1970 16:00:00 GMT-0800
  
  setDate(125): Sat Apr 04 1970 16:00:00 GMT-0800
  
  setDate(126): Sun Apr 05 1970 16:00:00 GMT-0800
  
  setDate(127): Mon Apr 06 1970 16:00:00 GMT-0800
  
  setDate(128): Tue Apr 07 1970 16:00:00 GMT-0800
  
  setDate(129): Wed Apr 08 1970 16:00:00 GMT-0800
  
  
  
  1.1                  WebCore/layout-tests/fast/js/date-big-setdate.html
  
  Index: date-big-setdate.html
  ===================================================================
  <html>
  <head>
  <title>JavaScript Date tests -- Millisecond Preservation</title>
  <script type='text/javascript' charset='utf-8'>
  function print(message) {
  	var paragraph = document.createElement("p");
  	paragraph.appendChild(document.createTextNode(message));
  	document.getElementById("console").appendChild(paragraph);
  }
  
  function test() {
  	if (window.layoutTestController) {
  		layoutTestController.dumpAsText();
  	}
  
      for (var i = 120; i < 130; i++) {
          var d = new Date(0);
          d.setDate(i);
          print("setDate(" + i + ")" + ": " + d);
      }
  }
  </script>
  </head>
  <body onload="test();">
  <p>
  This test checks for regression against: <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=3381">
  3381 Date.prototype.setDate() incorrect for values >=128.</a>
  </p>
  <p>If the test passes, all the dates below will be sequential.</p>
  <hr>
  <div id='console'/ style="font-family: courier; font-size: 12">
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list