jenkins-bot has submitted this change and it was merged.
Change subject: Make AJAX callback test harder to pass
......................................................................
Make AJAX callback test harder to pass
The old test passed a callback as an option which was easy to
hijack and wrap. Pass the callback as a handler to a child promise
of the jqXHR object instead - this is both more typical usage and
more complicated to pass.
Bug: T92247
Change-Id: I3f9256fb68dd5cbad161fde33e3ea9a3edc6489c
---
M modules/ext.Buggy.ajax.js
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Gilles: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ext.Buggy.ajax.js b/modules/ext.Buggy.ajax.js
index b92a01d..1cc1465 100644
--- a/modules/ext.Buggy.ajax.js
+++ b/modules/ext.Buggy.ajax.js
@@ -1,4 +1,4 @@
/*jshint undef:false */
( function ( $ ) {
- $.get( '/wiki/Main_Page', { success: function() {
callANonExistentFunctionOnAjaxSuccess(); } } );
+ $.when( $.get( '/wiki/Main_Page'), $.when( 1 ) ).done( function() {
callANonExistentFunctionOnAjaxSuccess(); } );
}( jQuery ) );
--
To view, visit https://gerrit.wikimedia.org/r/198178
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3f9256fb68dd5cbad161fde33e3ea9a3edc6489c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Buggy
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits