Debian Codegraph @

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

raw symbols SCIP
1 /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 gTestfile = 'regress-290056.js';
7
8 var summary = 'Dont crash when serializing an XML object where the name ' +
9 'of an attribute was changed with setName';
10
11 var BUGNUMBER = 290056;
12 var actual = 'No Crash';
13 var expect = 'No Crash';
14
15 printBugNumber(BUGNUMBER);
16 START(summary);
17
18 var link = <link type="simple" />;
19 var xlinkNamespace = new Namespace('xlink', 'http://www.w3.org/1999/xlink');
20 link.addNamespace(xlinkNamespace);
21 printStatus('In scope namespace: ' + link.inScopeNamespaces());
22 printStatus('XML markup: ' + link.toXMLString());
23 link.@type.setName(new QName(xlinkNamespace.uri, 'type'));
24 printStatus('name(): ' + link.@*::*[0].name());
25 printStatus(link.toXMLString());
26
27 TEST(1, expect, actual);
28
29 END();