Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11473: unit_tests.diff

File unit_tests.diff, 1.2 kB (added by jdalton, 4 months ago)

tests for the offsetParent bug

  • C:/Inetpub/wwwroot/prototype/test/unit/Copy

    old new  
    55  <title>Prototype Unit test file</title> 
    66  <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
    77  <script type="text/javascript" charset="utf-8"> 
    8     var originalElement = Element; 
     8    var originalElement = window.Element; 
    99  </script> 
    1010  <script src="../../dist/prototype.js" type="text/javascript"></script> 
    1111  <script src="../lib/unittest.js" type="text/javascript"></script> 
     
    16631663      this.assertEqual('absolute_relative', $('absolute_relative_undefined').getOffsetParent().id); 
    16641664       
    16651665      this.assertEqual(document.body, new Element('div').getOffsetParent()); 
     1666       
     1667      /* IE with strict doctype may try to return documentElement as offsetParent on relatively positioned elements */ 
     1668      $(document.body).insert( new Element('div', {id:'ie_offset_parent_bug'}).setStyle('position:relative')); 
     1669      this.assertEqual('BODY', $('ie_offset_parent_bug').getOffsetParent().tagName.toUpperCase()); 
    16661670    }, 
    16671671 
    16681672    testAbsolutize: function() {