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

Ticket #11350: ie_innerhtml_link_test.diff

File ie_innerhtml_link_test.diff, 1.6 kB (added by jdalton, 3 months ago)

unit test for the patch

  • dom.html

    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> 
     
    12931293      this.assertEqual(0.45, $('op1').setOpacity(0.45).getOpacity()); 
    12941294    }, 
    12951295     
    1296     testElementReadAttribute: function() { 
     1296    testElementReadAttribute: function() { 
     1297      $(document.body).insert('<div id="href_test_div"></div>'); 
     1298      $('href_test_div').update('<a id="href_test1" href="test1.html"/>'); 
     1299          this.assertEqual('test1.html', $('href_test1').readAttribute('href')); 
     1300          $('href_test_div').insert('<p>test</p><a id="href_test2" href="test2.html">hi</a>'); 
     1301          this.assertEqual('test2.html', $('href_test2').readAttribute('href')); 
     1302      $('href_test_div').replace('<a id="href_test3" href="test3.html"/>'); 
     1303      this.assertEqual('test3.html', $('href_test3').readAttribute('href')); 
     1304       
    12971305      this.assertEqual('test.html' , $('attributes_with_issues_1').readAttribute('href')); 
    12981306      this.assertEqual('L' , $('attributes_with_issues_1').readAttribute('accesskey')); 
    12991307      this.assertEqual('50' , $('attributes_with_issues_1').readAttribute('tabindex'));