Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / tests / e4x / TypeConversion / regress-302097.js
1 /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * Any copyright is dedicated to the Public Domain.
4  * http://creativecommons.org/licenses/publicdomain/
5  * Contributors: Blake Kaplan, Bob Clary
6  */
7
8
9 var summary = 'E4X - Function.prototype.toString should not quote {} ' +
10     'attribute values';
11 var BUGNUMBER = 302097;
12 var actual = '';
13 var expect = '';
14
15 printBugNumber(BUGNUMBER);
16 START(summary);
17
18 function f(k) {
19   return <xml k={k}/>;
20 }
21
22 actual = f.toString().replace(/</g, '&lt;');
23 expect = 'function f(k) {\n    return &lt;xml k={k}/>;\n}';
24
25 TEST(1, expect, actual);
26
27 END();