| Index: test/webkit/fast/js/object-extra-comma.js
|
| diff --git a/test/webkit/array-constructor-host-call.js b/test/webkit/fast/js/object-extra-comma.js
|
| similarity index 74%
|
| copy from test/webkit/array-constructor-host-call.js
|
| copy to test/webkit/fast/js/object-extra-comma.js
|
| index 50d6489cafd0716dd5cbbe0f9da8a958d9f61ca6..720ff0c922c0f99621473881ed06f48f87e87902 100644
|
| --- a/test/webkit/array-constructor-host-call.js
|
| +++ b/test/webkit/fast/js/object-extra-comma.js
|
| @@ -22,15 +22,12 @@
|
| // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| description(
|
| -"This tests that array construction via a host call works."
|
| -);
|
| + 'This test checks some object construction cases, including ' +
|
| + '<a href="https://bugs.webkit.org/show_bug.cgi?id=5939">5939: final comma in javascript object prevents parsing</a>' +
|
| + '.');
|
|
|
| -function constructArray(arrayConstructor) {
|
| - return new arrayConstructor(100);
|
| -}
|
| -
|
| -for (var i = 0; i < 3; ++i) {
|
| - var array = constructArray(Array);
|
| - shouldBeTrue("array instanceof Array");
|
| - shouldBe("array.length", "100");
|
| -}
|
| +shouldBe("var foo = { 'bar' : 'YES' }; foo.bar", "'YES'");
|
| +shouldBe("var foo = { 'bar' : 'YES', }; foo.bar", "'YES'");
|
| +shouldBe("var foo = { 'bar' : 'YES' , }; foo.bar", "'YES'");
|
| +shouldThrow("var foo = { , 'bar' : 'YES' }; foo.bar");
|
| +shouldThrow("var foo = { 'bar' : 'YES',, }; foo.bar");
|
|
|