Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit323575f

Browse files
committed
Tests: Don't test synchronous XHR on unload in Chrome
Chrome 78 dropped support for synchronous XHR requests inside ofbeforeunload, unload, pagehide, and visibilitychange event handlers.Seehttps://bugs.chromium.org/p/chromium/issues/detail?id=952452Closesgh-4536(cherry picked from commitc5b48c8)
1 parentbcbcdd2 commit323575f

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

‎test/unit/ajax.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2085,14 +2085,19 @@ if ( typeof window.ArrayBuffer === "undefined" || typeof new XMLHttpRequest().re
20852085
};
20862086
});
20872087

2088-
testIframe(
2089-
"#14379 - jQuery.ajax() on unload",
2090-
"ajax/onunload.html",
2091-
function(assert,jQuery,window,document,status){
2092-
assert.expect(1);
2093-
assert.strictEqual(status,"success","Request completed");
2094-
}
2095-
);
2088+
// Chrome 78 dropped support for synchronous XHR requests inside of
2089+
// beforeunload, unload, pagehide, and visibilitychange event handlers.
2090+
// See https://bugs.chromium.org/p/chromium/issues/detail?id=952452
2091+
if(!/chrome/i.test(navigator.userAgent)){
2092+
testIframe(
2093+
"#14379 - jQuery.ajax() on unload",
2094+
"ajax/onunload.html",
2095+
function(assert,jQuery,window,document,status){
2096+
assert.expect(1);
2097+
assert.strictEqual(status,"success","Request completed");
2098+
}
2099+
);
2100+
}
20962101

20972102
ajaxTest("#14683 - jQuery.ajax() - Exceptions thrown synchronously by xhr.send should be caught",4,function(assert){
20982103
return[{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp