| 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 | // See https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Processing_XML_with_E4X#section_7 |
| 8 | |
| 9 | gTestfile = 'regress-496113.js'; |
| 10 | |
| 11 | var summary = 'simple filter'; |
| 12 | var BUGNUMBER = 496113; |
| 13 | var actual = ''; |
| 14 | var expect = ''; |
| 15 | |
| 16 | printBugNumber(BUGNUMBER); |
| 17 | START(summary); |
| 18 | |
| 19 | var people = <people> |
| 20 | <person> |
| 21 | <name>Joe</name> |
| 22 | </person> |
| 23 | </people>; |
| 24 | |
| 25 | expect = <person><name>Joe</name></person>.toXMLString(); |
| 26 | |
| 27 | print(actual = people.person.(name == "Joe").toXMLString()); |
| 28 | |
| 29 | TEST(1, expect, actual); |
| 30 | |
| 31 | END(); |