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:
Peter Van der Beken 2012-03-29 11:16:31 -07:00
Родитель 0c7d3df11e
Коммит 208cff3073
1 изменённых файлов: 12 добавлений и 8 удалений

Просмотреть файл

@ -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;