| 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-263936.js'; |
| 8 | |
| 9 | START("Testing replacing an element with a list that contains a text node"); |
| 10 | printBugNumber(263936); |
| 11 | |
| 12 | var x = |
| 13 | <x> |
| 14 | <a>one</a> |
| 15 | <b>three</b> |
| 16 | </x>; |
| 17 | |
| 18 | // insert a text node "two" between elements <a> and <b> |
| 19 | x.a += XML("two"); |
| 20 | |
| 21 | var expected = |
| 22 | <x> |
| 23 | <a>one</a> |
| 24 | two |
| 25 | <b>three</b> |
| 26 | </x>; |
| 27 | |
| 28 | TEST(1, expected, x); |
| 29 | |
| 30 | END(); |