Debian Codegraph @

rhino/testsrc/tests/e4x/XML/13.4.4.34.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 = '13.4.4.34.js';
8
9 START("13.4.4.34 - XML setLocalName()");
10
11 TEST(1, true, XML.prototype.hasOwnProperty("setLocalName"));
12
13 x =
14 <alpha>
15 <bravo>one</bravo>
16 </alpha>;
17
18 correct =
19 <charlie>
20 <bravo>one</bravo>
21 </charlie>;
22
23 x.setLocalName("charlie");
24
25 TEST(2, correct, x);
26
27 x =
28 <ns:alpha xmlns:ns="http://foobar/">
29 <ns:bravo>one</ns:bravo>
30 </ns:alpha>;
31
32 correct =
33 <ns:charlie xmlns:ns="http://foobar/">
34 <ns:bravo>one</ns:bravo>
35 </ns:charlie>;
36
37 x.setLocalName("charlie");
38
39 TEST(3, correct, x);
40
41 END();