regress-233483-2.js (1546B)
1 // |reftest| skip-if(xulRuntime.shell) 2 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 //----------------------------------------------------------------------------- 8 var BUGNUMBER = 233483; 9 var summary = 'Don\'t crash with null properties - Browser only'; 10 var actual = 'No Crash'; 11 var expect = 'No Crash'; 12 13 printBugNumber(BUGNUMBER); 14 printStatus (summary); 15 16 // delay test driver end 17 gDelayTestDriverEnd = true; 18 19 actual = 'Crash'; 20 window.onload = onLoad; 21 22 function onLoad() 23 { 24 var a = new Array(); 25 var pe; 26 var x; 27 var s; 28 29 setform(); 30 31 for (pe=document.getElementById("test"); pe; pe=pe.parentNode) 32 { 33 a[a.length] = pe; 34 } 35 36 // can't document.write since this is in after load fires 37 s = a.toString(); 38 39 actual = 'No Crash'; 40 41 reportCompare(expect, actual, summary); 42 43 gDelayTestDriverEnd = false; 44 jsTestDriverEnd(); 45 } 46 47 function setform() 48 { 49 var form = document.body.appendChild(document.createElement('form')); 50 var table = form.appendChild(document.createElement('table')); 51 var tbody = table.appendChild(document.createElement('tbody')); 52 var tr = tbody.appendChild(document.createElement('tr')); 53 var td = tr.appendChild(document.createElement('td')) 54 var input = td.appendChild(document.createElement('input')); 55 56 input.setAttribute('id', 'test'); 57 input.setAttribute('value', '1232'); 58 59 }