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