[web/test] Stop testing that exceptions raised in Deferred callbacks call errback
They no longer do as of changeset 7f1f7f710b16.
Related to #5533303.
--- a/web/test/jstests/test_ajax.js Wed May 13 16:38:28 2015 +0200
+++ b/web/test/jstests/test_ajax.js Wed May 13 16:42:01 2015 +0200
@@ -155,14 +155,10 @@
test('test addErrback', function() {
expect(1);
stop();
- var d = jQuery('#main').loadxhtml(BASE_URL + 'cwsoftwareroot/web/test/jstests/ajax_url0.html');
+ var d = jQuery('#main').loadxhtml(BASE_URL + 'cwsoftwareroot/web/test/jstests/nonexistent.html');
d.addCallback(function() {
- // throw an exception to start errback chain
- try {
- throw new Error();
- } finally {
- start();
- };
+ // should not be executed
+ ok(false, "callback is executed");
});
d.addErrback(function() {
try {
@@ -173,8 +169,8 @@
});
});
- test('test callback / errback execution order', function() {
- expect(4);
+ test('test callback execution order', function() {
+ expect(3);
var counter = 0;
stop();
var d = jQuery('#main').loadxhtml(BASE_URL + 'cwsoftwareroot/web/test/jstests/ajax_url0.html');
@@ -187,21 +183,11 @@
}
);
d.addCallback(function() {
- equals(++counter, 2); // should be executed and break callback chain
- throw new Error();
+ equals(++counter, 2);
});
d.addCallback(function() {
- // should not be executed since second callback raised an error
- ok(false, "callback is executed");
- });
- d.addErrback(function() {
- // should be executed after the second callback
equals(++counter, 3);
});
- d.addErrback(function() {
- // should be executed after the first errback
- equals(++counter, 4);
- });
});
test('test already included resources are ignored (ajax_url1.html)', function() {