-
Notifications
You must be signed in to change notification settings - Fork 46
/
fake_xml_http_request.js.map
1 lines (1 loc) · 28 KB
/
fake_xml_http_request.js.map
1
{"version":3,"file":"fake_xml_http_request.js","sources":["src/fake-xml-http-request.js"],"sourcesContent":["/**\n * Minimal Event interface implementation\n *\n * Original implementation by Sven Fuchs: https://gist.github.com/995028\n * Modifications and tests by Christian Johansen.\n *\n * @author Sven Fuchs ([email protected])\n * @author Christian Johansen ([email protected])\n * @license BSD\n *\n * Copyright (c) 2011 Sven Fuchs, Christian Johansen\n */\n\nvar _Event = function Event(type, bubbles, cancelable, target) {\n this.type = type;\n this.bubbles = bubbles;\n this.cancelable = cancelable;\n this.target = target;\n};\n\n_Event.prototype = {\n stopPropagation: function () {},\n preventDefault: function () {\n this.defaultPrevented = true;\n }\n};\n\n/*\n Used to set the statusText property of an xhr object\n*/\nvar httpStatusCodes = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 300: \"Multiple Choice\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 307: \"Temporary Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Timeout\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Request Entity Too Large\",\n 414: \"Request-URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Requested Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 422: \"Unprocessable Entity\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\"\n};\n\n\n/*\n Cross-browser XML parsing. Used to turn\n XML responses into Document objects\n Borrowed from JSpec\n*/\nfunction parseXML(text) {\n var xmlDoc;\n\n if (typeof DOMParser != \"undefined\") {\n var parser = new DOMParser();\n xmlDoc = parser.parseFromString(text, \"text/xml\");\n } else {\n xmlDoc = new ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async = \"false\";\n xmlDoc.loadXML(text);\n }\n\n return xmlDoc;\n}\n\n/*\n Without mocking, the native XMLHttpRequest object will throw\n an error when attempting to set these headers. We match this behavior.\n*/\nvar unsafeHeaders = {\n \"Accept-Charset\": true,\n \"Accept-Encoding\": true,\n \"Connection\": true,\n \"Content-Length\": true,\n \"Cookie\": true,\n \"Cookie2\": true,\n \"Content-Transfer-Encoding\": true,\n \"Date\": true,\n \"Expect\": true,\n \"Host\": true,\n \"Keep-Alive\": true,\n \"Referer\": true,\n \"TE\": true,\n \"Trailer\": true,\n \"Transfer-Encoding\": true,\n \"Upgrade\": true,\n \"User-Agent\": true,\n \"Via\": true\n};\n\n/*\n Adds an \"event\" onto the fake xhr object\n that just calls the same-named method. This is\n in case a library adds callbacks for these events.\n*/\nfunction _addEventListener(eventName, xhr){\n xhr.addEventListener(eventName, function (event) {\n var listener = xhr[\"on\" + eventName];\n\n if (listener && typeof listener == \"function\") {\n listener.call(event.target, event);\n }\n });\n}\n\nfunction EventedObject() {\n this._eventListeners = {};\n var events = [\"loadstart\", \"progress\", \"load\", \"abort\", \"loadend\"];\n for (var i = events.length - 1; i >= 0; i--) {\n _addEventListener(events[i], this);\n }\n};\n\nEventedObject.prototype = {\n /*\n Duplicates the behavior of native XMLHttpRequest's addEventListener function\n */\n addEventListener: function addEventListener(event, listener) {\n this._eventListeners[event] = this._eventListeners[event] || [];\n this._eventListeners[event].push(listener);\n },\n\n /*\n Duplicates the behavior of native XMLHttpRequest's removeEventListener function\n */\n removeEventListener: function removeEventListener(event, listener) {\n var listeners = this._eventListeners[event] || [];\n\n for (var i = 0, l = listeners.length; i < l; ++i) {\n if (listeners[i] == listener) {\n return listeners.splice(i, 1);\n }\n }\n },\n\n /*\n Duplicates the behavior of native XMLHttpRequest's dispatchEvent function\n */\n dispatchEvent: function dispatchEvent(event) {\n var type = event.type;\n var listeners = this._eventListeners[type] || [];\n\n for (var i = 0; i < listeners.length; i++) {\n if (typeof listeners[i] == \"function\") {\n listeners[i].call(this, event);\n } else {\n listeners[i].handleEvent(event);\n }\n }\n\n return !!event.defaultPrevented;\n },\n\n /*\n Triggers an `onprogress` event with the given parameters.\n */\n _progress: function _progress(lengthComputable, loaded, total) {\n var event = new _Event('progress');\n event.target = this;\n event.lengthComputable = lengthComputable;\n event.loaded = loaded;\n event.total = total;\n this.dispatchEvent(event);\n }\n}\n\n/*\n Constructor for a fake window.XMLHttpRequest\n*/\nfunction FakeXMLHttpRequest() {\n EventedObject.call(this);\n this.readyState = FakeXMLHttpRequest.UNSENT;\n this.requestHeaders = {};\n this.requestBody = null;\n this.status = 0;\n this.statusText = \"\";\n this.upload = new EventedObject();\n this.onabort= null;\n this.onerror= null;\n this.onload= null;\n this.onloadend= null;\n this.onloadstart= null;\n this.onprogress= null;\n this.onreadystatechange= null;\n this.ontimeout= null;\n}\n\nFakeXMLHttpRequest.prototype = new EventedObject();\n\n// These status codes are available on the native XMLHttpRequest\n// object, so we match that here in case a library is relying on them.\nFakeXMLHttpRequest.UNSENT = 0;\nFakeXMLHttpRequest.OPENED = 1;\nFakeXMLHttpRequest.HEADERS_RECEIVED = 2;\nFakeXMLHttpRequest.LOADING = 3;\nFakeXMLHttpRequest.DONE = 4;\n\nvar FakeXMLHttpRequestProto = {\n UNSENT: 0,\n OPENED: 1,\n HEADERS_RECEIVED: 2,\n LOADING: 3,\n DONE: 4,\n async: true,\n withCredentials: false,\n\n /*\n Duplicates the behavior of native XMLHttpRequest's open function\n */\n open: function open(method, url, async, username, password) {\n this.method = method;\n this.url = url;\n this.async = typeof async == \"boolean\" ? async : true;\n this.username = username;\n this.password = password;\n this.responseText = null;\n this.response = this.responseText;\n this.responseXML = null;\n this.responseURL = url;\n this.requestHeaders = {};\n this.sendFlag = false;\n this._readyStateChange(FakeXMLHttpRequest.OPENED);\n },\n\n /*\n Duplicates the behavior of native XMLHttpRequest's setRequestHeader function\n */\n setRequestHeader: function setRequestHeader(header, value) {\n verifyState(this);\n\n if (unsafeHeaders[header] || /^(Sec-|Proxy-)/.test(header)) {\n throw new Error(\"Refused to set unsafe header \\\"\" + header + \"\\\"\");\n }\n\n if (this.requestHeaders[header]) {\n this.requestHeaders[header] += \",\" + value;\n } else {\n this.requestHeaders[header] = value;\n }\n },\n\n /*\n Duplicates the behavior of native XMLHttpRequest's send function\n */\n send: function send(data) {\n verifyState(this);\n\n if (!/^(get|head)$/i.test(this.method)) {\n var hasContentTypeHeader = false\n\n Object.keys(this.requestHeaders).forEach(function (key) {\n if (key.toLowerCase() === 'content-type') {\n hasContentTypeHeader = true;\n }\n });\n\n if (!hasContentTypeHeader && !(data || '').toString().match('FormData')) {\n this.requestHeaders[\"Content-Type\"] = \"text/plain;charset=UTF-8\";\n }\n\n this.requestBody = data;\n }\n\n this.errorFlag = false;\n this.sendFlag = this.async;\n this._readyStateChange(FakeXMLHttpRequest.OPENED);\n\n if (typeof this.onSend == \"function\") {\n this.onSend(this);\n }\n\n this.dispatchEvent(new _Event(\"loadstart\", false, false, this));\n },\n\n /*\n Duplicates the behavior of native XMLHttpRequest's abort function\n */\n abort: function abort() {\n this.aborted = true;\n this.responseText = null;\n this.response = this.responseText;\n this.errorFlag = true;\n this.requestHeaders = {};\n\n this.dispatchEvent(new _Event(\"abort\", false, false, this));\n\n if (this.readyState > FakeXMLHttpRequest.UNSENT && this.sendFlag) {\n this._readyStateChange(FakeXMLHttpRequest.UNSENT);\n this.sendFlag = false;\n }\n\n if (typeof this.onerror === \"function\") {\n this.onerror();\n }\n },\n\n /*\n Duplicates the behavior of native XMLHttpRequest's getResponseHeader function\n */\n getResponseHeader: function getResponseHeader(header) {\n if (this.readyState < FakeXMLHttpRequest.HEADERS_RECEIVED) {\n return null;\n }\n\n if (/^Set-Cookie2?$/i.test(header)) {\n return null;\n }\n\n header = header.toLowerCase();\n\n for (var h in this.responseHeaders) {\n if (h.toLowerCase() == header) {\n return this.responseHeaders[h];\n }\n }\n\n return null;\n },\n\n /*\n Duplicates the behavior of native XMLHttpRequest's getAllResponseHeaders function\n */\n getAllResponseHeaders: function getAllResponseHeaders() {\n if (this.readyState < FakeXMLHttpRequest.HEADERS_RECEIVED) {\n return \"\";\n }\n\n var headers = \"\";\n\n for (var header in this.responseHeaders) {\n if (this.responseHeaders.hasOwnProperty(header) && !/^Set-Cookie2?$/i.test(header)) {\n headers += header + \": \" + this.responseHeaders[header] + \"\\r\\n\";\n }\n }\n\n return headers;\n },\n\n /*\n Duplicates the behavior of native XMLHttpRequest's overrideMimeType function\n */\n overrideMimeType: function overrideMimeType(mimeType) {\n if (typeof mimeType === \"string\") {\n this.forceMimeType = mimeType.toLowerCase();\n }\n },\n\n\n /*\n Places a FakeXMLHttpRequest object into the passed\n state.\n */\n _readyStateChange: function _readyStateChange(state) {\n this.readyState = state;\n\n if (typeof this.onreadystatechange == \"function\") {\n this.onreadystatechange(new _Event(\"readystatechange\"));\n }\n\n this.dispatchEvent(new _Event(\"readystatechange\"));\n\n if (this.readyState == FakeXMLHttpRequest.DONE) {\n this.dispatchEvent(new _Event(\"load\", false, false, this));\n }\n if (this.readyState == FakeXMLHttpRequest.UNSENT || this.readyState == FakeXMLHttpRequest.DONE) {\n this.dispatchEvent(new _Event(\"loadend\", false, false, this));\n }\n },\n\n\n /*\n Sets the FakeXMLHttpRequest object's response headers and\n places the object into readyState 2\n */\n _setResponseHeaders: function _setResponseHeaders(headers) {\n this.responseHeaders = {};\n\n for (var header in headers) {\n if (headers.hasOwnProperty(header)) {\n this.responseHeaders[header] = headers[header];\n }\n }\n\n if (this.forceMimeType) {\n this.responseHeaders['Content-Type'] = this.forceMimeType;\n }\n\n if (this.async) {\n this._readyStateChange(FakeXMLHttpRequest.HEADERS_RECEIVED);\n } else {\n this.readyState = FakeXMLHttpRequest.HEADERS_RECEIVED;\n }\n },\n\n /*\n Sets the FakeXMLHttpRequest object's response body and\n if body text is XML, sets responseXML to parsed document\n object\n */\n _setResponseBody: function _setResponseBody(body) {\n verifyRequestSent(this);\n verifyHeadersReceived(this);\n verifyResponseBodyType(body);\n\n var chunkSize = this.chunkSize || 10;\n var index = 0;\n this.responseText = \"\";\n this.response = this.responseText;\n\n do {\n if (this.async) {\n this._readyStateChange(FakeXMLHttpRequest.LOADING);\n }\n\n this.responseText += body.substring(index, index + chunkSize);\n this.response = this.responseText;\n index += chunkSize;\n } while (index < body.length);\n\n var type = this.getResponseHeader(\"Content-Type\");\n\n if (this.responseText && (!type || /(text\\/xml)|(application\\/xml)|(\\+xml)/.test(type))) {\n try {\n this.responseXML = parseXML(this.responseText);\n } catch (e) {\n // Unable to parse XML - no biggie\n }\n }\n\n if (this.async) {\n this._readyStateChange(FakeXMLHttpRequest.DONE);\n } else {\n this.readyState = FakeXMLHttpRequest.DONE;\n }\n },\n\n /*\n Forces a response on to the FakeXMLHttpRequest object.\n\n This is the public API for faking responses. This function\n takes a number status, headers object, and string body:\n\n ```\n xhr.respond(404, {Content-Type: 'text/plain'}, \"Sorry. This object was not found.\")\n\n ```\n */\n respond: function respond(status, headers, body) {\n this._setResponseHeaders(headers || {});\n this.status = typeof status == \"number\" ? status : 200;\n this.statusText = httpStatusCodes[this.status];\n this._setResponseBody(body || \"\");\n }\n};\n\nfor (var property in FakeXMLHttpRequestProto) {\n FakeXMLHttpRequest.prototype[property] = FakeXMLHttpRequestProto[property];\n}\n\nfunction verifyState(xhr) {\n if (xhr.readyState !== FakeXMLHttpRequest.OPENED) {\n throw new Error(\"INVALID_STATE_ERR\");\n }\n\n if (xhr.sendFlag) {\n throw new Error(\"INVALID_STATE_ERR\");\n }\n}\n\n\nfunction verifyRequestSent(xhr) {\n if (xhr.readyState == FakeXMLHttpRequest.DONE) {\n throw new Error(\"Request done\");\n }\n}\n\nfunction verifyHeadersReceived(xhr) {\n if (xhr.async && xhr.readyState != FakeXMLHttpRequest.HEADERS_RECEIVED) {\n throw new Error(\"No headers received\");\n }\n}\n\nfunction verifyResponseBodyType(body) {\n if (typeof body != \"string\") {\n var error = new Error(\"Attempted to respond to fake XMLHttpRequest with \" +\n body + \", which is not a string.\");\n error.name = \"InvalidBodyException\";\n throw error;\n }\n}\nexport default FakeXMLHttpRequest;\n"],"names":[],"mappings":";;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACA;EACA,IAAI,MAAM,GAAG,SAAS,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE;EAC/D,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;EACnB,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;EACzB,EAAE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;EAC/B,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;EACvB,CAAC,CAAC;AACF;EACA,MAAM,CAAC,SAAS,GAAG;EACnB,EAAE,eAAe,EAAE,YAAY,EAAE;EACjC,EAAE,cAAc,EAAE,YAAY;EAC9B,IAAI,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;EACjC,GAAG;EACH,CAAC,CAAC;AACF;EACA;EACA;EACA;EACA,IAAI,eAAe,GAAG;EACtB,EAAE,GAAG,EAAE,UAAU;EACjB,EAAE,GAAG,EAAE,qBAAqB;EAC5B,EAAE,GAAG,EAAE,IAAI;EACX,EAAE,GAAG,EAAE,SAAS;EAChB,EAAE,GAAG,EAAE,UAAU;EACjB,EAAE,GAAG,EAAE,+BAA+B;EACtC,EAAE,GAAG,EAAE,YAAY;EACnB,EAAE,GAAG,EAAE,eAAe;EACtB,EAAE,GAAG,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