95565284af5b86c1a961088ce180af28a29f8aaa
[platform/framework/web/crosswalk-tizen.git] /
1 foo.bar.Baz(  {
2     method2: function () {}, prop   : 'dolor amet'
3     , prop2 : 123
4 });
5
6 // issue #142
7 var foo = [{
8 bar: 42
9 }];
10
11 function foo(a){ amet(123, a, {flag:true}); }
12 ipsum({flag:true});
13 ipsum({flag:true,other:false});
14 ipsum({flag:true,other:false},789,'bar');
15
16
17 var obj = {foo:"bar", 'lorem'   :  123,
18     dolor :new Date()
19 , "re": /\w+/g}    ;
20
21 // ObjectEpression within CallExpression needs to indent comments
22 declare({
23 // comment
24 create: {}
25 });
26
27 this.element
28 .add()
29 .set({
30 // line comment
31 // one more
32 prop: "value"
33 });
34
35 define( name, {
36 _create: function() {
37 this.element
38 .add()
39 .set({
40 // line comment
41 // one more
42 prop: "value"
43 });
44 }
45 });
46
47 x = {
48 props: {
49 // comment
50 x: 1
51 }
52 };
53
54 var x = {
55   data: x ?
56     x() :
57     // comment
58     function() {}
59 };
60
61 // edge case
62 for (key in {
63   foo:'bar',
64   lorem:'ipsum'
65 }) {
66   doStuff(key);
67 }
68
69 // issues #47 and #166
70 Ext.define('VMS.model.User', {
71   extend: 'Ext.data.Model',
72   idProperty: 'UserID',
73   fields: [
74     {
75       // foo
76       name: 'UserID',
77       type: 'int' // bar
78     },
79     // dolor
80     // amet
81     {
82       name: 'FirstName',
83       type: 'string'
84     },
85     {
86       name: 'LastName',
87       type: 'string'
88       // align with previous line because of line break
89
90       // align with "}"
91       // dolor sit amet
92       // maecennas ullamcor
93     }
94   ]
95 });
96
97
98 // issue #175
99 var ItemsSchema = new Schema({
100   name: String // comments
101   ,dds: ""
102 });
103
104
105 this
106 .foo({
107 bar: 'baz'
108 });
109
110
111 // issue #193
112 foo = function() {
113 var a,
114 b,
115 c;
116                 var bar = this.baz({});
117 };
118
119 // issue #226
120 var o = {
121 a: 0,
122 get b(){},
123 set c (x){},
124 method1(foo)  {},
125 method2 ( bar )
126 {}
127 };
128
129 o = {
130 get b(){return 'test'; },
131 set c(x){}
132 };
133
134 x = {
135   at: "left" +
136     "top"
137 };
138 x = {
139   at: a &&
140     b
141 };
142
143 // ES6 Object Literal Property Value Shorthand
144 x = { w, y, z }
145
146 // issue #295
147 o = {
148   foo: (
149     lorem &&
150     ipsum
151   ),
152   bar: (
153     dolor ||
154     amet
155   )
156 };