aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2018-02-12 20:24:58 +0100
committerGitHub <noreply@github.com>2018-02-12 20:24:58 +0100
commit4a2bcc27f9c3ee24b3effac0fbe1285d1ee23cc5 (patch)
tree46a4bf479e7acf4209daa7936dac38dc37e7fb8e
parent56742491bd45650e4c8ac7981a11d4d142c265a9 (diff)
downloadjquery-4a2bcc27f9c3ee24b3effac0fbe1285d1ee23cc5.tar.gz
jquery-4a2bcc27f9c3ee24b3effac0fbe1285d1ee23cc5.zip
Tests: Fix Android 4.0 Deferred tests
Closes gh-3967
-rw-r--r--test/unit/deferred.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/deferred.js b/test/unit/deferred.js
index 2e414e642..70d1254a1 100644
--- a/test/unit/deferred.js
+++ b/test/unit/deferred.js
@@ -884,7 +884,9 @@ QUnit.test( "jQuery.when(thenable) - like Promise.resolve", function( assert ) {
var customToStringThen = {
then: function( onFulfilled ) {
- onFulfilled();
+ // Support: Android 4.0 only
+ // Strict mode functions invoked without .call/.apply get global-object context
+ onFulfilled.call();
}
};
if ( typeof Symbol === "function" ) {