tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / js / script-tests / object-extra-comma.js
1 description(
2     'This test checks some object construction cases, including ' +
3     '<a href="https://bugs.webkit.org/show_bug.cgi?id=5939">5939: final comma in javascript object prevents parsing</a>' +
4     '.');
5
6 shouldBe("var foo = { 'bar' : 'YES' }; foo.bar", "'YES'");
7 shouldBe("var foo = { 'bar' : 'YES', }; foo.bar", "'YES'");
8 shouldBe("var foo = { 'bar' : 'YES' , }; foo.bar", "'YES'");
9 shouldThrow("var foo = { , 'bar' : 'YES' }; foo.bar");
10 shouldThrow("var foo = { 'bar' : 'YES',, }; foo.bar");