зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 740467 (Make test_XHR_timeout.js use addEventListener(..., obj, ...) instead of on* = obj). r=khuey.
--HG-- extra : rebase_source : e5039bfd291e3955282ff63f3ac5c0ab2869279a
This commit is contained in:
Родитель
0c7d3df11e
Коммит
208cff3073
|
@ -70,10 +70,12 @@ RequestTracker.prototype = {
|
|||
var req = new XMLHttpRequest();
|
||||
this.request = req;
|
||||
req.open("GET", "file_XHR_timeout.sjs", this.async);
|
||||
req.onerror = this;
|
||||
req.onload = this;
|
||||
req.onabort = this;
|
||||
req.ontimeout = this;
|
||||
var me = this;
|
||||
function handleEvent(e) { return me.handleEvent(e); };
|
||||
req.onerror = handleEvent;
|
||||
req.onload = handleEvent;
|
||||
req.onabort = handleEvent;
|
||||
req.ontimeout = handleEvent;
|
||||
|
||||
req.timeout = this.timeLimit;
|
||||
|
||||
|
@ -151,10 +153,12 @@ AbortedRequest.prototype = {
|
|||
var req = new XMLHttpRequest();
|
||||
this.request = req;
|
||||
req.open("GET", "file_XHR_timeout.sjs");
|
||||
req.onerror = this;
|
||||
req.onload = this;
|
||||
req.onabort = this;
|
||||
req.ontimeout = this;
|
||||
var me = this;
|
||||
function handleEvent(e) { return me.handleEvent(e); };
|
||||
req.onerror = handleEvent;
|
||||
req.onload = handleEvent;
|
||||
req.onabort = handleEvent;
|
||||
req.ontimeout = handleEvent;
|
||||
|
||||
req.timeout = 2000;
|
||||
var _this = this;
|
||||
|
|
Загрузка…
Ссылка в новой задаче