Cannot Pass All jQuery 1.4.2 Ajax Unit Tests With my Plug-in
I've created a plug-in that duck-punches the jQuery Ajax function. One problem that I cannot locate when running the Ajax unit tests for 1.4.2 It will not pass the two tests
- Ajax events with context
- jQuery.ajax context modification
Test one has a test:
- function callback(msg){
return function(){
equals( this, context, "context is preserved on callback " + msg );
};
}
The this reference instead of being the <div/> tag becomes an XPC Cross Origin Wrapper.
My Source Code is here:
http://github.com/gutzofter/ajaxMonitor
My unit tests for the plug-in can be run here:
http://localhost/ajaxMonitor/ajaxMonitor-1.0.0/tests/unit/tests.ajax.monitor.php
The failing unit tests can be run here:
http://gutzofter.herobo.com/ajaxMonitor/ajaxMonitor-1.0.0/tests/unit/validation/
One note is that jQuery 1.4.2 Ajax doe not handle a server response of 301 with FireFox 3.6.8. It will be returned as 0. I've modified my jQuery Library to account for this.
Just this problem and some JSONP stop watch timing. And maybe some presentation issues and this plug-in will be ready the wild.
Any help would be appreciated. including design. Thanks in advance.