[webkit-changes] cvs commit: LayoutTests/fast/js test-prototypes-expected.txt test-prototypes.html

Anders andersca at opensource.apple.com
Tue Jan 3 14:34:45 PST 2006


andersca    06/01/03 14:34:45

  Modified:    .        ChangeLog
  Added:       fast/js  test-prototypes-expected.txt test-prototypes.html
  Log:
  2006-01-03  Anders Carlsson  <andersca at mac.com>
  
          Reviewed by Eric.
  
          - add tests for http://bugzilla.opendarwin.org/show_bug.cgi?id=6358
          JS objects missing "prototype" properties
  
          * fast/js/test-prototypes-expected.txt: Added.
          * fast/js/test-prototypes.html: Added.
  
  Revision  Changes    Path
  1.216     +10 -0     LayoutTests/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/LayoutTests/ChangeLog,v
  retrieving revision 1.215
  retrieving revision 1.216
  diff -u -r1.215 -r1.216
  --- ChangeLog	3 Jan 2006 21:51:45 -0000	1.215
  +++ ChangeLog	3 Jan 2006 22:34:43 -0000	1.216
  @@ -1,5 +1,15 @@
   2006-01-03  Anders Carlsson  <andersca at mac.com>
   
  +        Reviewed by Eric.
  +
  +        - add tests for http://bugzilla.opendarwin.org/show_bug.cgi?id=6358
  +        JS objects missing "prototype" properties
  +        
  +        * fast/js/test-prototypes-expected.txt: Added.
  +        * fast/js/test-prototypes.html: Added.
  +
  +2006-01-03  Anders Carlsson  <andersca at mac.com>
  +
           Reviewed by Darin.
   
           - Add test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6357
  
  
  
  1.1                  LayoutTests/fast/js/test-prototypes-expected.txt
  
  Index: test-prototypes-expected.txt
  ===================================================================
  This checks that DOMParser, XMLHttpRequest, XMLSerializer and XSLTProcessor have their prototypes set correctly. If this test is successful, the text "SUCCESS" will be shown below.
  SUCCESS!
  
  
  
  
  1.1                  LayoutTests/fast/js/test-prototypes.html
  
  Index: test-prototypes.html
  ===================================================================
  <html>
  <head>
  <script>
  function debug(str) {
      var c = document.getElementById('console')
      c.innerHTML += (str + "<br>")
  }
  
  var numErrors = 0;
  
  function testPrototype(name)
  {
      func = eval(name);
      
      if (!func.prototype) {
          debug("FAILURE: " + name + " did not have a prototype defined.")
          numErrors++;        
          return;
      }
      
      // Create an object
      o = new func()
      if (!func.prototype.isPrototypeOf(o)) {
          debug('FAILURE: Newly created object of type ' + name + " does not have " + name + ".prototype in it's prototype chain.");
          numErrors++;
      }
  }
  
  function runTests() {
      if (window.layoutTestController)
          layoutTestController.dumpAsText();
          
      testPrototype("DOMParser");
      testPrototype("XMLHttpRequest");
      testPrototype("XMLSerializer");
      testPrototype("XSLTProcessor");
          
      if (numErrors == 0)
          debug('SUCCESS!')
  }
  </script>
  </head>
  <body onload="runTests();">
  This checks that DOMParser, XMLHttpRequest, XMLSerializer and XSLTProcessor have their prototypes set correctly. If this test is successful, the text "SUCCESS" will be shown below.
  <pre id="console"></pre>
  </body>
  </html>
  
  
  
  



More information about the webkit-changes mailing list