| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <script src="../../js/resources/js-test-pre.js"></script> | 3 <script src="../../js/resources/js-test-pre.js"></script> |
| 4 <script> | 4 <script> |
| 5 function crash() | 5 function crash() |
| 6 { | 6 { |
| 7 try { | 7 try { |
| 8 document.getElementsByTagName('option')[0].parentNode.removeChild(document.g
etElementsByTagName('option')[0]); | 8 document.getElementsByTagName('option')[0].parentNode.removeChild(document.g
etElementsByTagName('option')[0]); |
| 9 } catch (Exception) {} | 9 } catch (Exception) {} |
| 10 | 10 |
| 11 gc(); | 11 gc(); |
| 12 } | 12 } |
| 13 document.write("PASS. WebKit didn't crash.<select></select>"); | 13 document.write("PASS. WebKit didn't crash.<select></select>"); |
| 14 var select1 = document.getElementsByTagName('select')[0]; | 14 var select1 = document.getElementsByTagName('select')[0]; |
| 15 select1.appendChild(document.createElement('option')); | 15 select1.appendChild(document.createElement('option')); |
| 16 select1.appendChild(document.createElement('option')); | 16 select1.appendChild(document.createElement('option')); |
| 17 document.addEventListener("DOMSubtreeModified", crash, false); | 17 document.addEventListener("DOMSubtreeModified", crash, false); |
| 18 try { | 18 try { |
| 19 select1.options[0] = new Option("", ""); | 19 select1.options[0] = new Option("", ""); |
| 20 } catch (Exception) { } | 20 } catch (Exception) { } |
| 21 </script> | 21 </script> |
| 22 <script src="../../js/resources/js-test-post.js"></script> | 22 <script src="../../js/resources/js-test-post.js"></script> |
| 23 </html> | 23 </html> |
| OLD | NEW |