Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#12463 closed defect (fixed)

allow return of dojo.Deferred (in addition to doh.Deferred) from test modules

Reported by: bill Owned by: bill
Priority: high Milestone: 1.5.2
Component: TestFramework Version: 1.6.0
Keywords: Cc:
Blocked By: Blocking:


It would be convenient to return a dojo.Deferred from some async tests rather than a doh.Deferred. Actually, some of the tests are already doing that, like the editor tests:

	name: "wait for editors to load",
	timeout: 5000,
	runTest: function(){
	    return new dojo.DeferredList(
	        dijit.registry.filter(function(w){ return w.onLoadDeferred; }).map(function(w){ return w.onLoadDeferred; })

Turns out that code isn't working.

Use duck-typing so that DOH isn't so picky about whether it gets a doh.Deferred or a dojo.Deferred (or some other object that supports the same API).

Change History (8)

comment:1 Changed 9 years ago by bill

Resolution: fixed
Status: newclosed

(In [24052]) Allow async tests to return any object supporting the Deferred API, not just a doh.Deferred, fixes #12463, refs #7681 ([23082]), !strict.

comment:2 Changed 9 years ago by bill


Backported to 1.6.1 in [24146].

comment:3 Changed 9 years ago by Kenneth G. Franqueiro


Updating milestone to 1.5.2 to reflect inclusion in changeset [26956] for ticket #14199.

comment:4 Changed 9 years ago by bill

In [27130]:

[24328] erased changes from [24052], putting them back into trunk/, refs #12463, #7681, #14322 !strict.

comment:138 Changed 9 years ago by bill

In [27131]:

[24328] erased changes from [24052], putting them back into 1.7/ branch, refs #12463, #7681, #14322 !strict.

comment:139 Changed 9 years ago by bill

In [27243]:

remove wrapped doh.Deferred (it's no longer needed), refs #12463.

comment:140 Changed 9 years ago by bill

In [27362]:

Fix internal DOH exception when returning dojo.Deferred from a test where the Deferred threw, fixes #14439, refs #12463 !strict.

comment:141 Changed 8 years ago by bill

See also #16388, which adds support for dojo/Deferred, as opposed to this ticket which adds support for dojo/_base/Deferred.

Note: See TracTickets for help on using tickets.