| 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-263934.js'; |
| 8 | |
| 9 | START("Testing that replacing a list item with a new list that contains that item works"); |
| 10 | printBugNumber(263934); |
| 11 | |
| 12 | var x = |
| 13 | <x> |
| 14 | <b>two</b> |
| 15 | <b>three</b> |
| 16 | </x>; |
| 17 | |
| 18 | // insert <a> element in from of first <b> element |
| 19 | x.b[0] = <a>one</a> + x.b[0]; |
| 20 | |
| 21 | var expected = |
| 22 | <x> |
| 23 | <a>one</a> |
| 24 | <b>two</b> |
| 25 | <b>three</b> |
| 26 | </x>; |
| 27 | |
| 28 | |
| 29 | TEST(1, expected, x); |
| 30 | |
| 31 | END(); |