| 1 | /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
| 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 5 | |
| 6 | gTestfile = 'regress-302097.js'; |
| 7 | |
| 8 | var summary = 'E4X - Function.prototype.toString should not quote {} ' + |
| 9 | 'attribute values'; |
| 10 | var BUGNUMBER = 302097; |
| 11 | var actual = ''; |
| 12 | var expect = ''; |
| 13 | |
| 14 | printBugNumber(BUGNUMBER); |
| 15 | START(summary); |
| 16 | |
| 17 | function f(k) { |
| 18 | return <xml k={k}/>; |
| 19 | } |
| 20 | |
| 21 | actual = f.toString().replace(/</g, '<'); |
| 22 | expect = 'function f(k) {\n return <xml k={k}/>;\n}'; |
| 23 | |
| 24 | TEST(1, expect, actual); |
| 25 | |
| 26 | END(); |