Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-233483-2.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 var gTestfile = 'regress-233483-2.js';
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 if (typeof document == 'undefined')
17 {
18 reportCompare(expect, actual, summary);
19 }
20 else
21 {
22 // delay test driver end
23 gDelayTestDriverEnd = true;
24
25 actual = 'Crash';
26 window.onload = onLoad;
27 }
28
29 function onLoad()
30 {
31 var a = new Array();
32 var pe;
33 var x;
34 var s;
35
36 setform();
37
38 for (pe=document.getElementById("test"); pe; pe=pe.parentNode)
39 {
40 a[a.length] = pe;
41 }
42
43 // can't document.write since this is in after load fires
44 s = a.toString();
45
46 actual = 'No Crash';
47
48 reportCompare(expect, actual, summary);
49
50 gDelayTestDriverEnd = false;
51 jsTestDriverEnd();
52 }
53
54 function setform()
55 {
56 var form = document.body.appendChild(document.createElement('form'));
57 var table = form.appendChild(document.createElement('table'));
58 var tbody = table.appendChild(document.createElement('tbody'));
59 var tr = tbody.appendChild(document.createElement('tr'));
60 var td = tr.appendChild(document.createElement('td'))
61 var input = td.appendChild(document.createElement('input'));
62
63 input.setAttribute('id', 'test');
64 input.setAttribute('value', '1232');
65
66 }