1
- /* global createHttpBackend: false, createMockXhr: false, MockXhr: false */
1
+ /* global createHttpBackend: false, MockXhr: false */
2
2
'use strict' ;
3
3
4
4
describe ( '$httpBackend' , function ( ) {
@@ -57,7 +57,7 @@ describe('$httpBackend', function() {
57
57
} )
58
58
}
59
59
} ;
60
- $backend = createHttpBackend ( $browser , createMockXhr , fakeTimeout , callbacks , fakeDocument ) ;
60
+ $backend = createHttpBackend ( $browser , MockXhr , fakeTimeout , callbacks , fakeDocument ) ;
61
61
callback = jasmine . createSpy ( 'done' ) ;
62
62
} ) ) ;
63
63
@@ -442,7 +442,7 @@ describe('$httpBackend', function() {
442
442
443
443
444
444
it ( 'should convert 0 to 200 if content and file protocol' , function ( ) {
445
- $backend = createHttpBackend ( $browser , createMockXhr ) ;
445
+ $backend = createHttpBackend ( $browser , MockXhr ) ;
446
446
447
447
$backend ( 'GET' , 'file:///whatever/index.html' , null , callback ) ;
448
448
respond ( 0 , 'SOME CONTENT' ) ;
@@ -452,7 +452,7 @@ describe('$httpBackend', function() {
452
452
} ) ;
453
453
454
454
it ( 'should convert 0 to 200 if content for protocols other than file' , function ( ) {
455
- $backend = createHttpBackend ( $browser , createMockXhr ) ;
455
+ $backend = createHttpBackend ( $browser , MockXhr ) ;
456
456
457
457
$backend ( 'GET' , 'someProtocol:///whatever/index.html' , null , callback ) ;
458
458
respond ( 0 , 'SOME CONTENT' ) ;
@@ -462,7 +462,7 @@ describe('$httpBackend', function() {
462
462
} ) ;
463
463
464
464
it ( 'should convert 0 to 404 if no content and file protocol' , function ( ) {
465
- $backend = createHttpBackend ( $browser , createMockXhr ) ;
465
+ $backend = createHttpBackend ( $browser , MockXhr ) ;
466
466
467
467
$backend ( 'GET' , 'file:///whatever/index.html' , null , callback ) ;
468
468
respond ( 0 , '' ) ;
@@ -472,7 +472,7 @@ describe('$httpBackend', function() {
472
472
} ) ;
473
473
474
474
it ( 'should not convert 0 to 404 if no content for protocols other than file' , function ( ) {
475
- $backend = createHttpBackend ( $browser , createMockXhr ) ;
475
+ $backend = createHttpBackend ( $browser , MockXhr ) ;
476
476
477
477
$backend ( 'GET' , 'someProtocol:///whatever/index.html' , null , callback ) ;
478
478
respond ( 0 , '' ) ;
@@ -500,7 +500,7 @@ describe('$httpBackend', function() {
500
500
501
501
try {
502
502
503
- $backend = createHttpBackend ( $browser , createMockXhr ) ;
503
+ $backend = createHttpBackend ( $browser , MockXhr ) ;
504
504
505
505
$backend ( 'GET' , '/whatever/index.html' , null , callback ) ;
506
506
respond ( 0 , '' ) ;
@@ -515,7 +515,7 @@ describe('$httpBackend', function() {
515
515
516
516
517
517
it ( 'should return original backend status code if different from 0' , function ( ) {
518
- $backend = createHttpBackend ( $browser , createMockXhr ) ;
518
+ $backend = createHttpBackend ( $browser , MockXhr ) ;
519
519
520
520
// request to http://
521
521
$backend ( 'POST' , 'http://rest_api/create_whatever' , null , callback ) ;
0 commit comments