Debian Codegraph @

rhino/testsrc/tests/e4x/Regress/regress-271545.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-271545.js';
8
9 START('XML("") should create empty text node');
10 printBugNumber(271545);
11
12 // Check that text node should ignore any attempt to add a child to it
13
14
15 var x;
16
17 x = new XML();
18 x.a = "foo";
19 TEST_XML(1, "", x);
20
21 x = new XML("");
22 x.a = "foo";
23 TEST_XML(2, "", x);
24
25 x = new XML(null);
26 x.a = "foo";
27 TEST_XML(3, "", x);
28
29 x = new XML(undefined);
30 x.a = "foo";
31 TEST_XML(4, "", x);
32
33 var textNodeContent = "some arbitrary text without XML markup";
34
35 x = new XML(textNodeContent);
36 x.a = "foo";
37 TEST_XML(5, textNodeContent, x);
38
39 END();