From 6c17d02bc4cc02f478775d62e1f9f77da9da82ad Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 13 Dec 2013 01:49:37 -0800 Subject: fix($httpBackend): use ActiveX XHR when making PATCH requests on IE8 IE8's native XHR doesn't support PATCH requests, but the ActiveX one does. I'm also removing the noxhr error doc because nobody will ever get that error. Closes #2518 Closes #5043 --- test/ng/httpBackendSpec.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/ng') diff --git a/test/ng/httpBackendSpec.js b/test/ng/httpBackendSpec.js index 5a392538..7302de00 100644 --- a/test/ng/httpBackendSpec.js +++ b/test/ng/httpBackendSpec.js @@ -53,7 +53,7 @@ describe('$httpBackend', function() { }) } }; - $backend = createHttpBackend($browser, MockXhr, fakeTimeout, callbacks, fakeDocument); + $backend = createHttpBackend($browser, createMockXhr, fakeTimeout, callbacks, fakeDocument); callback = jasmine.createSpy('done'); })); @@ -250,7 +250,7 @@ describe('$httpBackend', function() { expect(response).toBe('response'); }); - $backend = createHttpBackend($browser, SyncXhr); + $backend = createHttpBackend($browser, function() { return new SyncXhr() }); $backend('GET', '/url', null, callback); expect(callback).toHaveBeenCalledOnce(); }); @@ -426,7 +426,7 @@ describe('$httpBackend', function() { it('should convert 0 to 200 if content', function() { - $backend = createHttpBackend($browser, MockXhr); + $backend = createHttpBackend($browser, createMockXhr); $backend('GET', 'file:///whatever/index.html', null, callback); respond(0, 'SOME CONTENT'); @@ -437,7 +437,7 @@ describe('$httpBackend', function() { it('should convert 0 to 404 if no content', function() { - $backend = createHttpBackend($browser, MockXhr); + $backend = createHttpBackend($browser, createMockXhr); $backend('GET', 'file:///whatever/index.html', null, callback); respond(0, ''); @@ -465,7 +465,7 @@ describe('$httpBackend', function() { try { - $backend = createHttpBackend($browser, MockXhr); + $backend = createHttpBackend($browser, createMockXhr); $backend('GET', '/whatever/index.html', null, callback); respond(0, ''); @@ -480,7 +480,7 @@ describe('$httpBackend', function() { it('should return original backend status code if different from 0', function () { - $backend = createHttpBackend($browser, MockXhr); + $backend = createHttpBackend($browser, createMockXhr); // request to http:// $backend('POST', 'http://rest_api/create_whatever', null, callback); -- cgit v1.2.3