@qooxdoo/framework 7.1.1 → 7.2.0
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/Manifest.json +1 -1
- package/lib/compiler/compile-info.json +83 -83
- package/lib/compiler/index.js +279 -274
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -1
- package/npm-shrinkwrap.json +235 -11095
- package/package.json +6 -6
- 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/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/tangible/Appearance.js +22 -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 +3 -3
- package/source/class/qx/tool/cli/commands/Lint.js +8 -5
- package/source/class/qx/tool/compiler/ClassFile.js +22 -12
- package/source/class/qx/tool/compiler/Es6ify.js +7 -3
- package/source/class/qx/tool/compiler/TargetError.js +3 -4
- package/source/class/qx/tool/compiler/app/Application.js +3 -3
- 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 +2 -1
- package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +1 -1
- package/source/class/qx/tool/compiler/targets/meta/Browserify.js +77 -83
- package/source/class/qx/tool/compiler/targets/meta/Uglify.js +11 -3
- 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
|
@@ -97,37 +97,33 @@ qx.Class.define("qx.test.data.store.Jsonp", {
|
|
|
97
97
|
},
|
|
98
98
|
|
|
99
99
|
testWholePrimitive() {
|
|
100
|
-
this.__store.addListener(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
this.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}, this);
|
|
128
|
-
},
|
|
129
|
-
this
|
|
130
|
-
);
|
|
100
|
+
this.__store.addListener("loaded", () => {
|
|
101
|
+
this.resume(function () {
|
|
102
|
+
var model = this.__store.getModel();
|
|
103
|
+
this.assertEquals(
|
|
104
|
+
"String",
|
|
105
|
+
model.getString(),
|
|
106
|
+
"The model is not created how it should!"
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
this.assertEquals(
|
|
110
|
+
12,
|
|
111
|
+
model.getNumber(),
|
|
112
|
+
"The model is not created how it should!"
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
this.assertEquals(
|
|
116
|
+
true,
|
|
117
|
+
model.getBoolean(),
|
|
118
|
+
"The model is not created how it should!"
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
this.assertNull(
|
|
122
|
+
model.getNull(),
|
|
123
|
+
"The model is not created how it should!"
|
|
124
|
+
);
|
|
125
|
+
}, this);
|
|
126
|
+
});
|
|
131
127
|
|
|
132
128
|
var url = this.url;
|
|
133
129
|
this.__store.setUrl(url);
|
|
@@ -146,15 +142,11 @@ qx.Class.define("qx.test.data.store.Jsonp", {
|
|
|
146
142
|
|
|
147
143
|
var store = new qx.data.store.Jsonp(null, delegate, "callback");
|
|
148
144
|
|
|
149
|
-
store.addListener(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}, this);
|
|
155
|
-
},
|
|
156
|
-
this
|
|
157
|
-
);
|
|
145
|
+
store.addListener("loaded", () => {
|
|
146
|
+
this.resume(function () {
|
|
147
|
+
this.assertTrue(manipulated);
|
|
148
|
+
}, this);
|
|
149
|
+
});
|
|
158
150
|
|
|
159
151
|
var url = this.url;
|
|
160
152
|
store.setUrl(url);
|
|
@@ -177,15 +169,11 @@ qx.Class.define("qx.test.data.store.Jsonp", {
|
|
|
177
169
|
|
|
178
170
|
var store = new qx.data.store.Jsonp(null, delegate, "callback");
|
|
179
171
|
|
|
180
|
-
store.addListener(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}, this);
|
|
186
|
-
},
|
|
187
|
-
this
|
|
188
|
-
);
|
|
172
|
+
store.addListener("loaded", () => {
|
|
173
|
+
this.resume(function () {
|
|
174
|
+
this.assertCalled(delegate.configureRequest);
|
|
175
|
+
}, this);
|
|
176
|
+
});
|
|
189
177
|
|
|
190
178
|
var url = this.url;
|
|
191
179
|
store.setUrl(url);
|
|
@@ -205,16 +193,12 @@ qx.Class.define("qx.test.data.store.Jsonp", {
|
|
|
205
193
|
testDisposeRequestDone() {
|
|
206
194
|
this.setUpFakeRequest();
|
|
207
195
|
var url = this.url;
|
|
208
|
-
this.__store.addListener(
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
this.
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}, this);
|
|
215
|
-
},
|
|
216
|
-
this
|
|
217
|
-
);
|
|
196
|
+
this.__store.addListener("loaded", () => {
|
|
197
|
+
this.resume(function () {
|
|
198
|
+
this.__store.dispose();
|
|
199
|
+
this.assertCalled(this.request.dispose);
|
|
200
|
+
}, this);
|
|
201
|
+
});
|
|
218
202
|
|
|
219
203
|
this.__store.setUrl(url);
|
|
220
204
|
},
|
|
@@ -226,13 +210,9 @@ qx.Class.define("qx.test.data.store.Jsonp", {
|
|
|
226
210
|
!(qx.core.Environment.get("browser.name") == "ie") &&
|
|
227
211
|
!(qx.core.Environment.get("browser.name") == "opera")
|
|
228
212
|
) {
|
|
229
|
-
this.__store.addListener(
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
this.resume(function () {}, this);
|
|
233
|
-
},
|
|
234
|
-
this
|
|
235
|
-
);
|
|
213
|
+
this.__store.addListener("error", () => {
|
|
214
|
+
this.resume(function () {}, this);
|
|
215
|
+
});
|
|
236
216
|
|
|
237
217
|
this.__store.setUrl("affe");
|
|
238
218
|
|
|
@@ -54,15 +54,11 @@ qx.Class.define("qx.test.data.store.RestWithRemote", {
|
|
|
54
54
|
var res = this.res,
|
|
55
55
|
store = this.store;
|
|
56
56
|
|
|
57
|
-
res.addListener(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}, this);
|
|
63
|
-
},
|
|
64
|
-
this
|
|
65
|
-
);
|
|
57
|
+
res.addListener("success", () => {
|
|
58
|
+
this.resume(function () {
|
|
59
|
+
this.assertEquals("String", store.getModel().getString());
|
|
60
|
+
}, this);
|
|
61
|
+
});
|
|
66
62
|
|
|
67
63
|
res.index();
|
|
68
64
|
this.wait();
|
|
@@ -73,15 +69,11 @@ qx.Class.define("qx.test.data.store.RestWithRemote", {
|
|
|
73
69
|
store = this.store,
|
|
74
70
|
label = new qx.ui.basic.Label();
|
|
75
71
|
|
|
76
|
-
res.addListener(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}, this);
|
|
82
|
-
},
|
|
83
|
-
this
|
|
84
|
-
);
|
|
72
|
+
res.addListener("success", () => {
|
|
73
|
+
this.resume(function () {
|
|
74
|
+
this.assertEquals("String", label.getValue());
|
|
75
|
+
}, this);
|
|
76
|
+
});
|
|
85
77
|
|
|
86
78
|
res.index();
|
|
87
79
|
store.bind("model.string", label, "value");
|
|
@@ -135,14 +135,10 @@ qx.Class.define("qx.test.html.Element", {
|
|
|
135
135
|
el.hide();
|
|
136
136
|
qx.core.Init.getApplication().getRoot().getContentElement().add(el);
|
|
137
137
|
var called = 0;
|
|
138
|
-
el.addListenerOnce(
|
|
139
|
-
"appear"
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
called++;
|
|
143
|
-
},
|
|
144
|
-
this
|
|
145
|
-
);
|
|
138
|
+
el.addListenerOnce("appear", () => {
|
|
139
|
+
this.debug("appear!");
|
|
140
|
+
called++;
|
|
141
|
+
});
|
|
146
142
|
|
|
147
143
|
el.show();
|
|
148
144
|
qx.html.Element.flush();
|
|
@@ -64,31 +64,27 @@ qx.Class.define("qx.test.html.Iframe", {
|
|
|
64
64
|
|
|
65
65
|
var source = this.__destSource;
|
|
66
66
|
|
|
67
|
-
frame.addListener(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
});
|
|
89
|
-
},
|
|
90
|
-
this
|
|
91
|
-
);
|
|
67
|
+
frame.addListener("load", () => {
|
|
68
|
+
this.resume(function () {
|
|
69
|
+
var element = frame.getDomElement();
|
|
70
|
+
var currentUrl =
|
|
71
|
+
qx.bom.Iframe.queryCurrentUrl(element) || element.src;
|
|
72
|
+
var source = frame.getSource();
|
|
73
|
+
var blank = "/blank.html$";
|
|
74
|
+
|
|
75
|
+
var msg = function (actual) {
|
|
76
|
+
return "Must be " + currentUrl + ", but was " + actual;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// BOM
|
|
80
|
+
this.assertString(currentUrl);
|
|
81
|
+
this.assertMatch(currentUrl, blank, msg(currentUrl));
|
|
82
|
+
|
|
83
|
+
// HTML
|
|
84
|
+
this.assertString(source);
|
|
85
|
+
this.assertMatch(source, blank, msg(source));
|
|
86
|
+
});
|
|
87
|
+
});
|
|
92
88
|
|
|
93
89
|
frame.setSource(source);
|
|
94
90
|
qx.html.Element.flush();
|
|
@@ -131,29 +127,25 @@ qx.Class.define("qx.test.html.Iframe", {
|
|
|
131
127
|
qx.html.Element.flush();
|
|
132
128
|
|
|
133
129
|
var origSetSource;
|
|
134
|
-
frame.addListener(
|
|
135
|
-
|
|
136
|
-
function () {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
130
|
+
frame.addListener("load", () => {
|
|
131
|
+
origSetSource = qx.bom.Iframe.setSource;
|
|
132
|
+
qx.bom.Iframe.setSource = function () {
|
|
133
|
+
throw new Error("setSource");
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
try {
|
|
137
|
+
var url = qx.bom.Iframe.queryCurrentUrl(frame.getDomElement());
|
|
138
|
+
frame.setSource(url);
|
|
139
|
+
qx.html.Element.flush();
|
|
140
|
+
this.resume();
|
|
141
|
+
} catch (e) {
|
|
142
|
+
this.resume(function () {
|
|
143
|
+
this.fail("Setting same URL must be skipped");
|
|
144
|
+
});
|
|
145
|
+
}
|
|
141
146
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
frame.setSource(url);
|
|
145
|
-
qx.html.Element.flush();
|
|
146
|
-
this.resume();
|
|
147
|
-
} catch (e) {
|
|
148
|
-
this.resume(function () {
|
|
149
|
-
this.fail("Setting same URL must be skipped");
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
qx.bom.Iframe.setSource = origSetSource;
|
|
154
|
-
},
|
|
155
|
-
this
|
|
156
|
-
);
|
|
147
|
+
qx.bom.Iframe.setSource = origSetSource;
|
|
148
|
+
});
|
|
157
149
|
|
|
158
150
|
this.wait();
|
|
159
151
|
},
|
|
@@ -166,19 +158,15 @@ qx.Class.define("qx.test.html.Iframe", {
|
|
|
166
158
|
}
|
|
167
159
|
|
|
168
160
|
// On cross origin
|
|
169
|
-
frame.addListener(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
this.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
});
|
|
179
|
-
},
|
|
180
|
-
this
|
|
181
|
-
);
|
|
161
|
+
frame.addListener("load", () => {
|
|
162
|
+
this.resume(function () {
|
|
163
|
+
var elem = frame.getDomElement();
|
|
164
|
+
this.spy(qx.bom.Iframe, "setSource");
|
|
165
|
+
frame.setSource(null);
|
|
166
|
+
|
|
167
|
+
this.assertCalledWith(qx.bom.Iframe.setSource, elem, null);
|
|
168
|
+
});
|
|
169
|
+
});
|
|
182
170
|
|
|
183
171
|
frame.setSource("http://example.com");
|
|
184
172
|
|
|
@@ -43,16 +43,12 @@ qx.Class.define("qx.test.io.request.JsonpWithRemote", {
|
|
|
43
43
|
var req = (this.req = new qx.io.request.Jsonp()),
|
|
44
44
|
url = this.noCache(this.getUrl("qx/test/jsonp_primitive.php"));
|
|
45
45
|
|
|
46
|
-
req.addListener(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
this.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}, this);
|
|
53
|
-
},
|
|
54
|
-
this
|
|
55
|
-
);
|
|
46
|
+
req.addListener("load", e => {
|
|
47
|
+
this.resume(function () {
|
|
48
|
+
this.assertObject(req.getResponse());
|
|
49
|
+
this.assertTrue(req.getResponse()["boolean"]);
|
|
50
|
+
}, this);
|
|
51
|
+
});
|
|
56
52
|
|
|
57
53
|
req.setUrl(url);
|
|
58
54
|
req.send();
|
|
@@ -477,15 +477,11 @@ qx.Mixin.define("qx.test.io.request.MRequest", {
|
|
|
477
477
|
var req = this.req,
|
|
478
478
|
transport = this.transport;
|
|
479
479
|
|
|
480
|
-
req.addListener(
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
}
|
|
486
|
-
},
|
|
487
|
-
this
|
|
488
|
-
);
|
|
480
|
+
req.addListener("readyStateChange", () => {
|
|
481
|
+
if (req.getReadyState() == 4) {
|
|
482
|
+
this.assertEquals("abort", req.getPhase());
|
|
483
|
+
}
|
|
484
|
+
});
|
|
489
485
|
|
|
490
486
|
req.send();
|
|
491
487
|
req.abort();
|
|
@@ -501,15 +497,11 @@ qx.Mixin.define("qx.test.io.request.MRequest", {
|
|
|
501
497
|
var req = this.req,
|
|
502
498
|
transport = this.transport;
|
|
503
499
|
|
|
504
|
-
req.addListener(
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
510
|
-
},
|
|
511
|
-
this
|
|
512
|
-
);
|
|
500
|
+
req.addListener("readyStateChange", () => {
|
|
501
|
+
if (req.getReadyState() == 4) {
|
|
502
|
+
this.assertEquals("abort", req.getPhase());
|
|
503
|
+
}
|
|
504
|
+
});
|
|
513
505
|
|
|
514
506
|
req.send();
|
|
515
507
|
|
|
@@ -530,13 +522,9 @@ qx.Mixin.define("qx.test.io.request.MRequest", {
|
|
|
530
522
|
var req = this.req,
|
|
531
523
|
transport = this.transport;
|
|
532
524
|
|
|
533
|
-
req.addListener(
|
|
534
|
-
"
|
|
535
|
-
|
|
536
|
-
this.assertEquals("abort", req.getPhase());
|
|
537
|
-
},
|
|
538
|
-
this
|
|
539
|
-
);
|
|
525
|
+
req.addListener("loadEnd", () => {
|
|
526
|
+
this.assertEquals("abort", req.getPhase());
|
|
527
|
+
});
|
|
540
528
|
|
|
541
529
|
req.send();
|
|
542
530
|
req.abort();
|
|
@@ -63,7 +63,7 @@ qx.Class.define("qx.test.io.request.Xhr", {
|
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
this.transport = this.injectStub(
|
|
66
|
-
|
|
66
|
+
qx.io.request.Xhr.prototype,
|
|
67
67
|
"_createTransport",
|
|
68
68
|
this.deepStub(qx.io.request.Xhr.prototype._createTransport())
|
|
69
69
|
);
|
|
@@ -396,14 +396,10 @@ qx.Class.define("qx.test.io.request.Xhr", {
|
|
|
396
396
|
req.setMethod("GET");
|
|
397
397
|
|
|
398
398
|
readyStates.push(req.getReadyState());
|
|
399
|
-
req.addListener(
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
statuses.push(req.getStatus());
|
|
404
|
-
},
|
|
405
|
-
this
|
|
406
|
-
);
|
|
399
|
+
req.addListener("readyStateChange", () => {
|
|
400
|
+
readyStates.push(req.getReadyState());
|
|
401
|
+
statuses.push(req.getStatus());
|
|
402
|
+
});
|
|
407
403
|
|
|
408
404
|
req.send();
|
|
409
405
|
server.respond();
|
|
@@ -35,15 +35,11 @@ qx.Class.define("qx.test.io.request.XhrWithRemote", {
|
|
|
35
35
|
var req = this.req,
|
|
36
36
|
url = this.noCache(this.getUrl("qx/test/xmlhttp/sample.txt"));
|
|
37
37
|
|
|
38
|
-
req.addListener(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}, this);
|
|
44
|
-
},
|
|
45
|
-
this
|
|
46
|
-
);
|
|
38
|
+
req.addListener("success", e => {
|
|
39
|
+
this.resume(function () {
|
|
40
|
+
this.assertEquals("SAMPLE", e.getTarget().getResponseText());
|
|
41
|
+
}, this);
|
|
42
|
+
});
|
|
47
43
|
|
|
48
44
|
req.setUrl(url);
|
|
49
45
|
req.send();
|
|
@@ -57,20 +53,16 @@ qx.Class.define("qx.test.io.request.XhrWithRemote", {
|
|
|
57
53
|
url2 = this.noCache(this.getUrl("qx/test/xmlhttp/sample.txt") + "?2"),
|
|
58
54
|
count = 0;
|
|
59
55
|
|
|
60
|
-
req.addListener(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
this
|
|
73
|
-
);
|
|
56
|
+
req.addListener("success", () => {
|
|
57
|
+
count++;
|
|
58
|
+
|
|
59
|
+
if (count == 2) {
|
|
60
|
+
this.resume();
|
|
61
|
+
} else {
|
|
62
|
+
req.setUrl(url2);
|
|
63
|
+
req.send();
|
|
64
|
+
}
|
|
65
|
+
});
|
|
74
66
|
|
|
75
67
|
req.setUrl(url1);
|
|
76
68
|
req.send();
|
|
@@ -84,19 +76,15 @@ qx.Class.define("qx.test.io.request.XhrWithRemote", {
|
|
|
84
76
|
expectedPhases = ["opened", "sent", "loading", "load", "success"],
|
|
85
77
|
url = this.getUrl("qx/test/xmlhttp/sample.txt");
|
|
86
78
|
|
|
87
|
-
req.addListener(
|
|
88
|
-
|
|
89
|
-
function () {
|
|
90
|
-
phases.push(req.getPhase());
|
|
79
|
+
req.addListener("changePhase", () => {
|
|
80
|
+
phases.push(req.getPhase());
|
|
91
81
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
this
|
|
99
|
-
);
|
|
82
|
+
if (req.getPhase() === "success") {
|
|
83
|
+
this.resume(function () {
|
|
84
|
+
this.assertArrayEquals(expectedPhases, phases);
|
|
85
|
+
}, this);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
100
88
|
|
|
101
89
|
req.setUrl(url);
|
|
102
90
|
req.send();
|
|
@@ -110,17 +98,13 @@ qx.Class.define("qx.test.io.request.XhrWithRemote", {
|
|
|
110
98
|
expectedPhases = ["opened", "sent", "abort"],
|
|
111
99
|
url = this.getUrl("qx/test/xmlhttp/sample.txt");
|
|
112
100
|
|
|
113
|
-
req.addListener(
|
|
114
|
-
|
|
115
|
-
function () {
|
|
116
|
-
phases.push(req.getPhase());
|
|
101
|
+
req.addListener("changePhase", () => {
|
|
102
|
+
phases.push(req.getPhase());
|
|
117
103
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
this
|
|
123
|
-
);
|
|
104
|
+
if (req.getPhase() === "abort") {
|
|
105
|
+
this.assertArrayEquals(expectedPhases, phases);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
124
108
|
|
|
125
109
|
req.setUrl(url);
|
|
126
110
|
req.send();
|
|
@@ -141,19 +125,15 @@ qx.Class.define("qx.test.io.request.XhrWithRemote", {
|
|
|
141
125
|
this.noCache(this.getUrl("qx/test/xmlhttp/loading.php")) +
|
|
142
126
|
"&duration=100";
|
|
143
127
|
|
|
144
|
-
req.addListener(
|
|
145
|
-
|
|
146
|
-
function () {
|
|
147
|
-
phases.push(req.getPhase());
|
|
128
|
+
req.addListener("changePhase", () => {
|
|
129
|
+
phases.push(req.getPhase());
|
|
148
130
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
this
|
|
156
|
-
);
|
|
131
|
+
if (req.getPhase() === "abort") {
|
|
132
|
+
this.resume(function () {
|
|
133
|
+
this.assertArrayEquals(expectedPhases, phases);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
});
|
|
157
137
|
|
|
158
138
|
req.setUrl(url);
|
|
159
139
|
req.send();
|
|
@@ -176,15 +156,11 @@ qx.Class.define("qx.test.io.request.XhrWithRemote", {
|
|
|
176
156
|
this.noCache(this.getUrl("qx/test/xmlhttp/loading.php")) +
|
|
177
157
|
"&duration=100";
|
|
178
158
|
|
|
179
|
-
req.addListener(
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
});
|
|
185
|
-
},
|
|
186
|
-
this
|
|
187
|
-
);
|
|
159
|
+
req.addListener("timeout", () => {
|
|
160
|
+
this.resume(function () {
|
|
161
|
+
this.assertEquals("timeout", req.getPhase());
|
|
162
|
+
});
|
|
163
|
+
});
|
|
188
164
|
|
|
189
165
|
req.setUrl(url);
|
|
190
166
|
req.setTimeout(1 / 1000);
|
|
@@ -198,18 +174,14 @@ qx.Class.define("qx.test.io.request.XhrWithRemote", {
|
|
|
198
174
|
this.noCache(this.getUrl("qx/test/xmlhttp/loading.php")) +
|
|
199
175
|
"&duration=100";
|
|
200
176
|
|
|
201
|
-
req.addListener(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
});
|
|
210
|
-
},
|
|
211
|
-
this
|
|
212
|
-
);
|
|
177
|
+
req.addListener("timeout", () => {
|
|
178
|
+
this.resume(function () {
|
|
179
|
+
try {
|
|
180
|
+
req.getResponseHeader("X-UI-My-Header");
|
|
181
|
+
throw new Error("DOM exception expected!");
|
|
182
|
+
} catch (ex) {}
|
|
183
|
+
});
|
|
184
|
+
});
|
|
213
185
|
|
|
214
186
|
req.setUrl(url);
|
|
215
187
|
req.setTimeout(1 / 1000);
|
|
@@ -785,13 +785,9 @@ qx.Class.define("qx.test.io.rest.Resource", {
|
|
|
785
785
|
|
|
786
786
|
this.stub(req, "dispose");
|
|
787
787
|
|
|
788
|
-
res.addListener(
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
responses.push(e.getData());
|
|
792
|
-
},
|
|
793
|
-
this
|
|
794
|
-
);
|
|
788
|
+
res.addListener("getSuccess", e => {
|
|
789
|
+
responses.push(e.getData());
|
|
790
|
+
});
|
|
795
791
|
|
|
796
792
|
res.longPoll("get");
|
|
797
793
|
|