Ticket #2164 (closed defect: fixed)
Mistake in BUFakeNode.js, BUFakeNode.find_listener_()
| Reported by: | james@… | Owned by: | dylan |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | TestFramework | Version: | 0.4.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
The BUFakeNode.find_listener_() method in trunk/testtools/JsFakeDom/BUFakeDom.js contains a mistake, which means it never finds a listener and always returns -1. This problem causes both BUFakeNode.addEventListener() and BUFakeNode.removeEventListener() to function improperly.
The fix is simple. Line 319
return burst.Alg.find(this.listeners_, function(o) {o[0] == eventType && o[1] === listener && o[2] == useCapture});
should be
return burst.Alg.find_if(this.listeners_, function(o) {
return o[0] == eventType && o[1] === listener && o[2] == useCapture
});
Change History
Note: See
TracTickets for help on using
tickets.