Debian Codegraph @

rhino/testsrc/tests/e4x/Regress/regress-327564.js

raw symbols SCIP
1 /* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 gTestfile = 'regress-327564.js';
8
9 var summary = "Hang due to cycle in XML object";
10 var BUGNUMBER = 327564;
11 var actual = 'No Cycle Detected';
12 var expect = 'Error: cyclic XML value';
13
14 printBugNumber(BUGNUMBER);
15 START(summary);
16
17 var p = <p/>;
18
19 p.c = 1;
20
21 var c = p.c[0];
22
23 p.insertChildBefore(null,c);
24
25 printStatus(p.toXMLString());
26
27 printStatus('p.c[1] === c');
28 TEST(1, true, p.c[1] === c);
29
30 p.c = 2
31
32 try
33 {
34 c.appendChild(p)
35 // iloop here
36 }
37 catch(ex)
38 {
39 actual = ex + '';
40 printStatus(actual);
41 }
42
43 TEST(2, expect, actual);
44
45 END();