Debian Codegraph @

rhino/testsrc/tests/e4x/Regress/regress-356238-02.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-356238-02.js';
8
9 var BUGNUMBER = 356238;
10 var summary = 'bug 356238';
11 var actual = 'No Duplicate';
12 var expect = 'No Duplicate';
13
14 printBugNumber(BUGNUMBER);
15 START(summary);
16
17 var xml = <xml><child><a/><b/></child></xml>;
18 var child = xml.child[0];
19
20 try {
21 child.insertChildAfter(null, xml.child);
22 actual = "insertChildAfter succeeded when it should throw an exception";
23 }
24 catch (e) {
25 }
26
27 if (child.a[0] === child.a[1])
28 actual = 'Duplicate detected';
29
30 TEST(1, expect, actual);
31 END();