@qooxdoo/framework 7.1.0 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/Manifest.json +22 -22
- package/lib/compiler/compile-info.json +66 -66
- package/lib/compiler/index.js +406 -335
- package/lib/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -1
- package/lib/resource/qx/tool/schema/compile-1-0-0.json +11 -1
- package/npm-shrinkwrap.json +793 -744
- package/package.json +9 -8
- package/source/class/qx/Interface.js +13 -15
- package/source/class/qx/dev/unit/MTestLoader.js +25 -33
- package/source/class/qx/dev/unit/TestResult.js +9 -13
- package/source/class/qx/event/handler/Focus.js +1 -1
- package/source/class/qx/html/Element.js +1 -1
- package/source/class/qx/html/Node.js +0 -1
- package/source/class/qx/io/request/AbstractRequest.js +42 -66
- package/source/class/qx/test/Interface.js +70 -6
- package/source/class/qx/test/Mixin.js +20 -17
- package/source/class/qx/test/Promise.js +67 -91
- package/source/class/qx/test/bom/History.js +11 -19
- package/source/class/qx/test/bom/WebWorker.js +7 -15
- package/source/class/qx/test/bom/media/MediaTestCase.js +10 -18
- package/source/class/qx/test/bom/media/Video.js +10 -18
- package/source/class/qx/test/bom/rest/Resource.js +3 -7
- package/source/class/qx/test/bom/rest/ResourceWithRemote.js +40 -56
- package/source/class/qx/test/bom/webfonts/Validator.js +12 -20
- package/source/class/qx/test/core/Object.js +3 -7
- package/source/class/qx/test/data/controller/List.js +18 -22
- package/source/class/qx/test/data/marshal/Json.js +10 -14
- package/source/class/qx/test/data/store/Json.js +337 -428
- package/source/class/qx/test/data/store/Jsonp.js +46 -66
- package/source/class/qx/test/data/store/RestWithRemote.js +10 -18
- package/source/class/qx/test/html/Element.js +4 -8
- package/source/class/qx/test/html/Iframe.js +48 -60
- package/source/class/qx/test/io/jsonrpc/Client.js +1 -1
- package/source/class/qx/test/io/request/JsonpWithRemote.js +6 -10
- package/source/class/qx/test/io/request/MRequest.js +13 -25
- package/source/class/qx/test/io/request/Xhr.js +5 -9
- package/source/class/qx/test/io/request/XhrWithRemote.js +50 -78
- package/source/class/qx/test/io/rest/Resource.js +3 -7
- package/source/class/qx/test/io/rest/ResourceWithRemote.js +41 -57
- package/source/class/qx/test/mobile/basic/Image.js +16 -24
- package/source/class/qx/test/mobile/container/Navigation.js +3 -7
- package/source/class/qx/test/mobile/container/Scroll.js +8 -12
- package/source/class/qx/test/mobile/page/Page.js +24 -44
- package/source/class/qx/test/performance/Property.js +2 -2
- package/source/class/qx/test/ui/basic/Image.js +32 -52
- package/source/class/qx/test/ui/core/Blocker.js +6 -14
- package/source/class/qx/test/ui/embed/Iframe.js +13 -21
- package/source/class/qx/test/ui/form/FileSelectorButton.js +32 -0
- package/source/class/qx/test/ui/form/FormValidator.js +147 -211
- package/source/class/qx/test/ui/form/Label.js +8 -16
- package/source/class/qx/test/ui/root/Inline.js +9 -13
- package/source/class/qx/test/ui/table/Table.js +6 -14
- package/source/class/qx/test/ui/toolbar/OverflowHandling.js +18 -30
- package/source/class/qx/test/ui/virtual/Pane.js +3 -7
- package/source/class/qx/test/util/DynamicScriptLoader.js +23 -42
- package/source/class/qx/theme/iconfont/LoadMaterialIcons.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsOutlined.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsRound.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsSharp.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsTwoTone.js +4 -4
- package/source/class/qx/theme/tangible/Appearance.js +22 -3
- package/source/class/qx/theme/tangible/ColorEngine.js +3 -3
- package/source/class/qx/theme/tangible/Decoration.js +3 -3
- package/source/class/qx/tool/cli/Watch.js +3 -7
- package/source/class/qx/tool/cli/api/AbstractApi.js +1 -1
- package/source/class/qx/tool/cli/api/CompilerApi.js +3 -7
- package/source/class/qx/tool/cli/commands/Compile.js +9 -1
- package/source/class/qx/tool/cli/commands/Lint.js +21 -17
- package/source/class/qx/tool/compiler/ClassFile.js +22 -12
- package/source/class/qx/tool/compiler/Es6ify.js +12 -5
- package/source/class/qx/tool/compiler/TargetError.js +3 -4
- package/source/class/qx/tool/compiler/app/Application.js +14 -0
- package/source/class/qx/tool/compiler/app/WebFont.js +8 -6
- package/source/class/qx/tool/compiler/targets/SourceCodeCopier.js +1 -1
- package/source/class/qx/tool/compiler/targets/Target.js +7 -5
- package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +1 -1
- package/source/class/qx/tool/compiler/targets/meta/Browserify.js +88 -52
- package/source/class/qx/tool/compiler/targets/meta/Uglify.js +11 -3
- package/source/class/qx/tool/utils/Json.js +1 -1
- package/source/class/qx/tool/utils/Website.js +2 -2
- package/source/class/qx/ui/basic/Label.js +13 -17
- package/source/class/qx/ui/core/MPlacement.js +13 -21
- package/source/class/qx/ui/core/Widget.js +2 -3
- package/source/class/qx/ui/core/scroll/NativeScrollBar.js +3 -7
- package/source/class/qx/ui/core/scroll/ScrollBar.js +3 -7
- package/source/class/qx/ui/embed/Iframe.js +40 -50
- package/source/class/qx/ui/form/AbstractField.js +8 -12
- package/source/class/qx/ui/form/ComboBox.js +7 -15
- package/source/class/qx/ui/form/DateField.js +9 -18
- package/source/class/qx/ui/form/FileSelectorButton.js +157 -0
- package/source/class/qx/ui/form/Spinner.js +7 -15
- package/source/class/qx/ui/form/TextArea.js +3 -7
- package/source/class/qx/ui/form/VirtualComboBox.js +8 -16
- package/source/class/qx/ui/form/VirtualSelectBox.js +21 -37
- package/source/class/qx/ui/layout/Canvas.js +2 -2
- package/source/class/qx/ui/mobile/container/MIScroll.js +3 -7
- package/source/class/qx/ui/progressive/headfoot/Progress.js +22 -34
- package/source/class/qx/ui/progressive/renderer/table/Row.js +1 -1
- package/source/class/qx/ui/splitpane/Pane.js +14 -22
- package/source/class/qx/ui/table/MTableContextMenu.js +63 -71
- package/source/class/qx/ui/table/Table.js +3 -7
- package/source/class/qx/ui/table/model/Abstract.js +5 -2
- package/source/class/qx/ui/table/pane/Scroller.js +8 -12
- package/source/class/qx/ui/toolbar/FileSelectorButton.js +57 -0
- package/source/class/qx/ui/toolbar/Part.js +3 -7
- package/source/class/qx/ui/tree/VirtualTree.js +5 -9
- package/source/class/qx/ui/treevirtual/MNode.js +5 -3
- package/source/class/qx/ui/treevirtual/TreeVirtual.js +3 -7
- package/source/class/qx/ui/virtual/core/Pane.js +30 -42
- package/source/class/qx/util/DynamicScriptLoader.js +31 -43
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/{materialicons-v70.ttf → materialicons-v126.ttf} +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff2 +0 -0
- package/source/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
- package/source/resource/qx/tool/schema/compile-1-0-0.json +11 -1
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff2 +0 -0
|
@@ -88,20 +88,16 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
88
88
|
},
|
|
89
89
|
|
|
90
90
|
testLoadUrl() {
|
|
91
|
-
this.__store.addListener(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
this.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}, this);
|
|
102
|
-
},
|
|
103
|
-
this
|
|
104
|
-
);
|
|
91
|
+
this.__store.addListener("loaded", () => {
|
|
92
|
+
this.resume(function () {
|
|
93
|
+
var model = this.__store.getModel();
|
|
94
|
+
this.assertEquals(
|
|
95
|
+
"String",
|
|
96
|
+
model.getString(),
|
|
97
|
+
"The model is not created how it should!"
|
|
98
|
+
);
|
|
99
|
+
}, this);
|
|
100
|
+
});
|
|
105
101
|
|
|
106
102
|
var url = this.url;
|
|
107
103
|
this.__store.setUrl(url);
|
|
@@ -113,47 +109,34 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
113
109
|
var url = this.url,
|
|
114
110
|
states = [];
|
|
115
111
|
|
|
116
|
-
this.__store.addListener(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"completed"
|
|
129
|
-
];
|
|
130
|
-
|
|
131
|
-
this.assertArrayEquals(expected, states);
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
this
|
|
136
|
-
);
|
|
112
|
+
this.__store.addListener("changeState", evt => {
|
|
113
|
+
var state = evt.getData();
|
|
114
|
+
states.push(state);
|
|
115
|
+
|
|
116
|
+
if (state == "completed") {
|
|
117
|
+
this.resume(function () {
|
|
118
|
+
var expected = ["configured", "sending", "receiving", "completed"];
|
|
119
|
+
|
|
120
|
+
this.assertArrayEquals(expected, states);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
});
|
|
137
124
|
|
|
138
125
|
this.__store.setUrl(url);
|
|
139
126
|
this.wait();
|
|
140
127
|
},
|
|
141
128
|
|
|
142
129
|
testLoadResource() {
|
|
143
|
-
this.__store.addListener(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
this.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}, this);
|
|
154
|
-
},
|
|
155
|
-
this
|
|
156
|
-
);
|
|
130
|
+
this.__store.addListener("loaded", () => {
|
|
131
|
+
this.resume(function () {
|
|
132
|
+
var model = this.__store.getModel();
|
|
133
|
+
this.assertEquals(
|
|
134
|
+
"String",
|
|
135
|
+
model.getString(),
|
|
136
|
+
"The model is not created how it should!"
|
|
137
|
+
);
|
|
138
|
+
}, this);
|
|
139
|
+
});
|
|
157
140
|
|
|
158
141
|
var resource = "qx/test/primitive.json";
|
|
159
142
|
this.__store.setUrl(resource);
|
|
@@ -162,23 +145,19 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
162
145
|
},
|
|
163
146
|
|
|
164
147
|
testParseErrorForResource() {
|
|
165
|
-
this.__store.addListener(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}, this);
|
|
179
|
-
},
|
|
180
|
-
this
|
|
181
|
-
);
|
|
148
|
+
this.__store.addListener("parseError", ev => {
|
|
149
|
+
this.resume(function () {
|
|
150
|
+
this.assertString(
|
|
151
|
+
ev.getData().response,
|
|
152
|
+
"Parse error object does not contain response!"
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
this.assertObject(
|
|
156
|
+
ev.getData().error,
|
|
157
|
+
"Parse error object does not contain parser exception!"
|
|
158
|
+
);
|
|
159
|
+
}, this);
|
|
160
|
+
});
|
|
182
161
|
|
|
183
162
|
var resource = "qx/test/failing.json";
|
|
184
163
|
this.__store.setUrl(resource);
|
|
@@ -187,22 +166,18 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
187
166
|
},
|
|
188
167
|
|
|
189
168
|
testLoadAlias() {
|
|
190
|
-
this.__store.addListener(
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
this.
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}, this);
|
|
203
|
-
},
|
|
204
|
-
this
|
|
205
|
-
);
|
|
169
|
+
this.__store.addListener("loaded", () => {
|
|
170
|
+
this.resume(function () {
|
|
171
|
+
var model = this.__store.getModel();
|
|
172
|
+
this.assertEquals(
|
|
173
|
+
"String",
|
|
174
|
+
model.getString(),
|
|
175
|
+
"The model is not created how it should!"
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
qx.util.AliasManager.getInstance().remove("testLoadResource");
|
|
179
|
+
}, this);
|
|
180
|
+
});
|
|
206
181
|
|
|
207
182
|
// invoke alias handling
|
|
208
183
|
qx.util.AliasManager.getInstance().add("testLoadResource", "qx/test");
|
|
@@ -219,37 +194,33 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
219
194
|
},
|
|
220
195
|
|
|
221
196
|
testWholePrimitive() {
|
|
222
|
-
this.__store.addListener(
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
this.
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}, this);
|
|
250
|
-
},
|
|
251
|
-
this
|
|
252
|
-
);
|
|
197
|
+
this.__store.addListener("loaded", () => {
|
|
198
|
+
this.resume(function () {
|
|
199
|
+
var model = this.__store.getModel();
|
|
200
|
+
this.assertEquals(
|
|
201
|
+
"String",
|
|
202
|
+
model.getString(),
|
|
203
|
+
"The model is not created how it should!"
|
|
204
|
+
);
|
|
205
|
+
|
|
206
|
+
this.assertEquals(
|
|
207
|
+
12,
|
|
208
|
+
model.getNumber(),
|
|
209
|
+
"The model is not created how it should!"
|
|
210
|
+
);
|
|
211
|
+
|
|
212
|
+
this.assertEquals(
|
|
213
|
+
true,
|
|
214
|
+
model.getBoolean(),
|
|
215
|
+
"The model is not created how it should!"
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
this.assertNull(
|
|
219
|
+
model.getNull(),
|
|
220
|
+
"The model is not created how it should!"
|
|
221
|
+
);
|
|
222
|
+
}, this);
|
|
223
|
+
});
|
|
253
224
|
|
|
254
225
|
var url = this.url;
|
|
255
226
|
this.__store.setUrl(url);
|
|
@@ -258,43 +229,39 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
258
229
|
},
|
|
259
230
|
|
|
260
231
|
testWholeArray() {
|
|
261
|
-
this.__store.addListener(
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
this.
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
}, this);
|
|
295
|
-
},
|
|
296
|
-
this
|
|
297
|
-
);
|
|
232
|
+
this.__store.addListener("loaded", () => {
|
|
233
|
+
this.resume(function () {
|
|
234
|
+
var model = this.__store.getModel();
|
|
235
|
+
this.assertNotNull(
|
|
236
|
+
model.getArray(),
|
|
237
|
+
"The model is not created how it should!"
|
|
238
|
+
);
|
|
239
|
+
|
|
240
|
+
this.assertEquals(
|
|
241
|
+
"qx.data.Array",
|
|
242
|
+
model.getArray().classname,
|
|
243
|
+
"Wrong array class."
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
this.assertEquals(
|
|
247
|
+
"a",
|
|
248
|
+
model.getArray().getItem(0),
|
|
249
|
+
"Wrong content of the array."
|
|
250
|
+
);
|
|
251
|
+
|
|
252
|
+
this.assertEquals(
|
|
253
|
+
"b",
|
|
254
|
+
model.getArray().getItem(1),
|
|
255
|
+
"Wrong content of the array."
|
|
256
|
+
);
|
|
257
|
+
|
|
258
|
+
this.assertEquals(
|
|
259
|
+
"c",
|
|
260
|
+
model.getArray().getItem(2),
|
|
261
|
+
"Wrong content of the array."
|
|
262
|
+
);
|
|
263
|
+
}, this);
|
|
264
|
+
});
|
|
298
265
|
|
|
299
266
|
var url =
|
|
300
267
|
qx.util.ResourceManager.getInstance().toUri("qx/test/array.json");
|
|
@@ -303,31 +270,27 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
303
270
|
},
|
|
304
271
|
|
|
305
272
|
testWholeObject() {
|
|
306
|
-
this.__store.addListener(
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
this.
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
}, this);
|
|
328
|
-
},
|
|
329
|
-
this
|
|
330
|
-
);
|
|
273
|
+
this.__store.addListener("loaded", () => {
|
|
274
|
+
this.resume(function () {
|
|
275
|
+
var model = this.__store.getModel();
|
|
276
|
+
this.assertNotNull(
|
|
277
|
+
model.getO(),
|
|
278
|
+
"The model is not created how it should!"
|
|
279
|
+
);
|
|
280
|
+
|
|
281
|
+
this.assertEquals(
|
|
282
|
+
"a",
|
|
283
|
+
model.getO().getA(),
|
|
284
|
+
"Wrong content of the object."
|
|
285
|
+
);
|
|
286
|
+
|
|
287
|
+
this.assertEquals(
|
|
288
|
+
"b",
|
|
289
|
+
model.getO().getB(),
|
|
290
|
+
"Wrong content of the object."
|
|
291
|
+
);
|
|
292
|
+
}, this);
|
|
293
|
+
});
|
|
331
294
|
|
|
332
295
|
var url = qx.util.ResourceManager.getInstance().toUri(
|
|
333
296
|
"qx/test/object.json"
|
|
@@ -366,37 +329,33 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
366
329
|
|
|
367
330
|
this.__store = new qx.data.store.Json(null, delegate);
|
|
368
331
|
|
|
369
|
-
this.__store.addListener(
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
this.
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
}, this);
|
|
397
|
-
},
|
|
398
|
-
this
|
|
399
|
-
);
|
|
332
|
+
this.__store.addListener("loaded", () => {
|
|
333
|
+
this.resume(function () {
|
|
334
|
+
var model = this.__store.getModel();
|
|
335
|
+
this.assertNotNull(
|
|
336
|
+
model.getO(),
|
|
337
|
+
"The model is not created how it should!"
|
|
338
|
+
);
|
|
339
|
+
|
|
340
|
+
this.assertEquals(
|
|
341
|
+
"qx.test.AB",
|
|
342
|
+
model.getO().classname,
|
|
343
|
+
"Not the given class used!"
|
|
344
|
+
);
|
|
345
|
+
|
|
346
|
+
this.assertEquals(
|
|
347
|
+
"a",
|
|
348
|
+
model.getO().getA(),
|
|
349
|
+
"Wrong content of the object."
|
|
350
|
+
);
|
|
351
|
+
|
|
352
|
+
this.assertEquals(
|
|
353
|
+
"b",
|
|
354
|
+
model.getO().getB(),
|
|
355
|
+
"Wrong content of the object."
|
|
356
|
+
);
|
|
357
|
+
}, this);
|
|
358
|
+
});
|
|
400
359
|
|
|
401
360
|
var url = qx.util.ResourceManager.getInstance().toUri(
|
|
402
361
|
"qx/test/object.json"
|
|
@@ -416,31 +375,27 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
416
375
|
|
|
417
376
|
this.__store = new qx.data.store.Json(null, delegate);
|
|
418
377
|
|
|
419
|
-
this.__store.addListener(
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
this.
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
}, this);
|
|
441
|
-
},
|
|
442
|
-
this
|
|
443
|
-
);
|
|
378
|
+
this.__store.addListener("loaded", () => {
|
|
379
|
+
this.resume(function () {
|
|
380
|
+
var model = this.__store.getModel();
|
|
381
|
+
this.assertNotNull(
|
|
382
|
+
model.getO(),
|
|
383
|
+
"The model is not created how it should!"
|
|
384
|
+
);
|
|
385
|
+
|
|
386
|
+
this.assertEquals(
|
|
387
|
+
"a",
|
|
388
|
+
model.getO().getA(),
|
|
389
|
+
"Wrong content of the object."
|
|
390
|
+
);
|
|
391
|
+
|
|
392
|
+
this.assertEquals(
|
|
393
|
+
"b",
|
|
394
|
+
model.getO().getB(),
|
|
395
|
+
"Wrong content of the object."
|
|
396
|
+
);
|
|
397
|
+
}, this);
|
|
398
|
+
});
|
|
444
399
|
|
|
445
400
|
var url = qx.util.ResourceManager.getInstance().toUri(
|
|
446
401
|
"qx/test/object.json"
|
|
@@ -464,39 +419,33 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
464
419
|
|
|
465
420
|
this.__store = new qx.data.store.Json(null, delegate);
|
|
466
421
|
|
|
467
|
-
this.__store.addListener(
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
this.
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
)
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
)
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
"Wrong content of the object."
|
|
495
|
-
);
|
|
496
|
-
}, this);
|
|
497
|
-
},
|
|
498
|
-
this
|
|
499
|
-
);
|
|
422
|
+
this.__store.addListener("loaded", () => {
|
|
423
|
+
this.resume(function () {
|
|
424
|
+
var model = this.__store.getModel();
|
|
425
|
+
this.assertTrue(qx.Class.isSubClassOf(model.constructor, qx.test.O));
|
|
426
|
+
|
|
427
|
+
this.assertNotNull(
|
|
428
|
+
model.getO(),
|
|
429
|
+
"The model is not created how it should!"
|
|
430
|
+
);
|
|
431
|
+
|
|
432
|
+
this.assertTrue(
|
|
433
|
+
qx.Class.isSubClassOf(model.getO().constructor, qx.test.O)
|
|
434
|
+
);
|
|
435
|
+
|
|
436
|
+
this.assertEquals(
|
|
437
|
+
"a",
|
|
438
|
+
model.getO().getA(),
|
|
439
|
+
"Wrong content of the object."
|
|
440
|
+
);
|
|
441
|
+
|
|
442
|
+
this.assertEquals(
|
|
443
|
+
"b",
|
|
444
|
+
model.getO().getB(),
|
|
445
|
+
"Wrong content of the object."
|
|
446
|
+
);
|
|
447
|
+
}, this);
|
|
448
|
+
});
|
|
500
449
|
|
|
501
450
|
var url = qx.util.ResourceManager.getInstance().toUri(
|
|
502
451
|
"qx/test/object.json"
|
|
@@ -521,31 +470,27 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
521
470
|
|
|
522
471
|
this.__store = new qx.data.store.Json(null, delegate);
|
|
523
472
|
|
|
524
|
-
this.__store.addListener(
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
this.
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
}, this);
|
|
546
|
-
},
|
|
547
|
-
this
|
|
548
|
-
);
|
|
473
|
+
this.__store.addListener("loaded", () => {
|
|
474
|
+
this.resume(function () {
|
|
475
|
+
var model = this.__store.getModel();
|
|
476
|
+
this.assertNotNull(
|
|
477
|
+
model.getO(),
|
|
478
|
+
"The model is not created how it should!"
|
|
479
|
+
);
|
|
480
|
+
|
|
481
|
+
this.assertEquals(
|
|
482
|
+
"a",
|
|
483
|
+
model.getO().getA(),
|
|
484
|
+
"Wrong content of the object."
|
|
485
|
+
);
|
|
486
|
+
|
|
487
|
+
this.assertEquals(
|
|
488
|
+
"b",
|
|
489
|
+
model.getO().getB(),
|
|
490
|
+
"Wrong content of the object."
|
|
491
|
+
);
|
|
492
|
+
}, this);
|
|
493
|
+
});
|
|
549
494
|
|
|
550
495
|
var url = qx.util.ResourceManager.getInstance().toUri(
|
|
551
496
|
"qx/test/object.json"
|
|
@@ -565,31 +510,27 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
565
510
|
|
|
566
511
|
this.__store = new qx.data.store.Json(null, delegate);
|
|
567
512
|
|
|
568
|
-
this.__store.addListener(
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
this.
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
}, this);
|
|
590
|
-
},
|
|
591
|
-
this
|
|
592
|
-
);
|
|
513
|
+
this.__store.addListener("loaded", () => {
|
|
514
|
+
this.resume(function () {
|
|
515
|
+
var model = this.__store.getModel();
|
|
516
|
+
this.assertNotNull(
|
|
517
|
+
model.getO(),
|
|
518
|
+
"The model is not created how it should!"
|
|
519
|
+
);
|
|
520
|
+
|
|
521
|
+
this.assertEquals(
|
|
522
|
+
"a",
|
|
523
|
+
model.getO().getA(),
|
|
524
|
+
"Wrong content of the object."
|
|
525
|
+
);
|
|
526
|
+
|
|
527
|
+
this.assertEquals(
|
|
528
|
+
"b",
|
|
529
|
+
model.getO().getB(),
|
|
530
|
+
"Wrong content of the object."
|
|
531
|
+
);
|
|
532
|
+
}, this);
|
|
533
|
+
});
|
|
593
534
|
|
|
594
535
|
var url = qx.util.ResourceManager.getInstance().toUri(
|
|
595
536
|
"qx/test/object.json"
|
|
@@ -618,33 +559,29 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
618
559
|
|
|
619
560
|
this.__store = new qx.data.store.Json(null, delegate);
|
|
620
561
|
|
|
621
|
-
this.__store.addListener(
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
this.
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
}, this);
|
|
645
|
-
},
|
|
646
|
-
this
|
|
647
|
-
);
|
|
562
|
+
this.__store.addListener("loaded", () => {
|
|
563
|
+
this.resume(function () {
|
|
564
|
+
var model = this.__store.getModel();
|
|
565
|
+
this.assertTrue(model.a(), "Mixin not included.");
|
|
566
|
+
this.assertNotNull(
|
|
567
|
+
model.getO(),
|
|
568
|
+
"The model is not created how it should!"
|
|
569
|
+
);
|
|
570
|
+
|
|
571
|
+
this.assertTrue(model.getO().a(), "Mixin not included.");
|
|
572
|
+
this.assertEquals(
|
|
573
|
+
"a",
|
|
574
|
+
model.getO().getA(),
|
|
575
|
+
"Wrong content of the object."
|
|
576
|
+
);
|
|
577
|
+
|
|
578
|
+
this.assertEquals(
|
|
579
|
+
"b",
|
|
580
|
+
model.getO().getB(),
|
|
581
|
+
"Wrong content of the object."
|
|
582
|
+
);
|
|
583
|
+
}, this);
|
|
584
|
+
});
|
|
648
585
|
|
|
649
586
|
var url = qx.util.ResourceManager.getInstance().toUri(
|
|
650
587
|
"qx/test/object.json"
|
|
@@ -681,34 +618,30 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
681
618
|
|
|
682
619
|
this.__store = new qx.data.store.Json(null, delegate);
|
|
683
620
|
|
|
684
|
-
this.__store.addListener(
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
this.
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
}, this);
|
|
709
|
-
},
|
|
710
|
-
this
|
|
711
|
-
);
|
|
621
|
+
this.__store.addListener("loaded", () => {
|
|
622
|
+
this.resume(function () {
|
|
623
|
+
var model = this.__store.getModel();
|
|
624
|
+
this.assertTrue(model.a(), "Mixin not included.");
|
|
625
|
+
this.assertTrue(model.b(), "Mixin not included.");
|
|
626
|
+
this.assertNotNull(
|
|
627
|
+
model.getO(),
|
|
628
|
+
"The model is not created how it should!"
|
|
629
|
+
);
|
|
630
|
+
|
|
631
|
+
this.assertTrue(model.getO().a(), "Mixin not included.");
|
|
632
|
+
this.assertEquals(
|
|
633
|
+
"a",
|
|
634
|
+
model.getO().getA(),
|
|
635
|
+
"Wrong content of the object."
|
|
636
|
+
);
|
|
637
|
+
|
|
638
|
+
this.assertEquals(
|
|
639
|
+
"b",
|
|
640
|
+
model.getO().getB(),
|
|
641
|
+
"Wrong content of the object."
|
|
642
|
+
);
|
|
643
|
+
}, this);
|
|
644
|
+
});
|
|
712
645
|
|
|
713
646
|
var url = qx.util.ResourceManager.getInstance().toUri(
|
|
714
647
|
"qx/test/object.json"
|
|
@@ -731,15 +664,11 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
731
664
|
this.__store.dispose();
|
|
732
665
|
this.__store = new qx.data.store.Json(null, delegate);
|
|
733
666
|
|
|
734
|
-
this.__store.addListener(
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}, this);
|
|
740
|
-
},
|
|
741
|
-
this
|
|
742
|
-
);
|
|
667
|
+
this.__store.addListener("loaded", () => {
|
|
668
|
+
this.resume(function () {
|
|
669
|
+
this.assertCalled(delegate.manipulateData);
|
|
670
|
+
}, this);
|
|
671
|
+
});
|
|
743
672
|
|
|
744
673
|
var url = this.url;
|
|
745
674
|
this.__store.setUrl(url);
|
|
@@ -762,15 +691,11 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
762
691
|
this.__store.dispose();
|
|
763
692
|
this.__store = new qx.data.store.Json(null, delegate);
|
|
764
693
|
|
|
765
|
-
this.__store.addListener(
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
}, this);
|
|
771
|
-
},
|
|
772
|
-
this
|
|
773
|
-
);
|
|
694
|
+
this.__store.addListener("loaded", () => {
|
|
695
|
+
this.resume(function () {
|
|
696
|
+
this.assertCalled(delegate.configureRequest);
|
|
697
|
+
}, this);
|
|
698
|
+
});
|
|
774
699
|
|
|
775
700
|
var url = this.url;
|
|
776
701
|
this.__store.setUrl(url);
|
|
@@ -779,19 +704,15 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
779
704
|
},
|
|
780
705
|
|
|
781
706
|
testDisposeOldModel() {
|
|
782
|
-
this.__store.addListener(
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
}, this);
|
|
792
|
-
},
|
|
793
|
-
this
|
|
794
|
-
);
|
|
707
|
+
this.__store.addListener("loaded", () => {
|
|
708
|
+
this.resume(function () {
|
|
709
|
+
var model = this.__store.getModel();
|
|
710
|
+
// check if the new model is not the old model
|
|
711
|
+
this.assertNotEquals(fakeModel, model);
|
|
712
|
+
// check if the old model has been disposed
|
|
713
|
+
this.assertTrue(fakeModel.isDisposed());
|
|
714
|
+
}, this);
|
|
715
|
+
});
|
|
795
716
|
|
|
796
717
|
// set a fake model
|
|
797
718
|
var fakeModel = new qx.core.Object();
|
|
@@ -814,30 +735,22 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
814
735
|
testDisposeRequestDone() {
|
|
815
736
|
this.setUpFakeRequest();
|
|
816
737
|
var url = this.url;
|
|
817
|
-
this.__store.addListener(
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
this.
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
}, this);
|
|
824
|
-
},
|
|
825
|
-
this
|
|
826
|
-
);
|
|
738
|
+
this.__store.addListener("loaded", () => {
|
|
739
|
+
this.resume(function () {
|
|
740
|
+
this.__store.dispose();
|
|
741
|
+
this.assertCalled(this.request.dispose);
|
|
742
|
+
}, this);
|
|
743
|
+
});
|
|
827
744
|
|
|
828
745
|
this.__store.setUrl(url);
|
|
829
746
|
},
|
|
830
747
|
|
|
831
748
|
testErrorEvent() {
|
|
832
|
-
this.__store.addListener(
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
}, this);
|
|
838
|
-
},
|
|
839
|
-
this
|
|
840
|
-
);
|
|
749
|
+
this.__store.addListener("error", ev => {
|
|
750
|
+
this.resume(function () {
|
|
751
|
+
this.assertNotNull(ev);
|
|
752
|
+
}, this);
|
|
753
|
+
});
|
|
841
754
|
|
|
842
755
|
this.__store.setUrl("not-found");
|
|
843
756
|
|
|
@@ -854,15 +767,11 @@ qx.Class.define("qx.test.data.store.Json", {
|
|
|
854
767
|
"SERVER ERROR"
|
|
855
768
|
]);
|
|
856
769
|
|
|
857
|
-
this.__store.addListener(
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
});
|
|
863
|
-
},
|
|
864
|
-
this
|
|
865
|
-
);
|
|
770
|
+
this.__store.addListener("error", e => {
|
|
771
|
+
this.resume(function () {
|
|
772
|
+
this.assertTrue(e.getData().getPhase() == "statusError");
|
|
773
|
+
});
|
|
774
|
+
});
|
|
866
775
|
|
|
867
776
|
qx.event.Timer.once(
|
|
868
777
|
function () {
|