From 1669f9eedab2b59cf46b2dee39b3b8ee518a12e3 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 28 May 2015 09:03:39 -0400 Subject: [PATCH] XhrHttpImpl#request invokes XHR send This should have always been the case; I am not sure what I was thinking, considering that the object is encapsulated. --- src/dapi/http/XhrHttpImpl.js | 4 +++- test/dapi/http/XhrHttpImplTest.js | 15 +-------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/dapi/http/XhrHttpImpl.js b/src/dapi/http/XhrHttpImpl.js index e6ed598..3d9a630 100644 --- a/src/dapi/http/XhrHttpImpl.js +++ b/src/dapi/http/XhrHttpImpl.js @@ -1,7 +1,7 @@ /** * XMLHttpRequest HTTP protocol implementation * - * Copyright (C) 2015 LoVullo Associates, Inc. + * Copyright (C) 2014, 2015 LoVullo Associates, Inc. * * This file is part of the Liza Data Collection Framework * @@ -69,6 +69,8 @@ module.exports = Class( 'XhrHttpImpl' ) { callback( err, resp ); } ); + + req.send( data ); } catch ( e ) { diff --git a/test/dapi/http/XhrHttpImplTest.js b/test/dapi/http/XhrHttpImplTest.js index eeebde3..70e1507 100644 --- a/test/dapi/http/XhrHttpImplTest.js +++ b/test/dapi/http/XhrHttpImplTest.js @@ -1,7 +1,7 @@ /** * Test case for XMLHttpRequest HTTP protocol implementation * - * Copyright (C) 2014 LoVullo Associates, Inc. + * Copyright (C) 2014, 2015 LoVullo Associates, Inc. * * This file is part of the Liza Data Collection Framework * @@ -127,9 +127,6 @@ describe( 'XhrHttpImpl', function() expect( resp ).to.equal( retdata ); done(); } ); - - // invoke callback - StubXhr.inst.send( src ); } ); @@ -154,8 +151,6 @@ describe( 'XhrHttpImpl', function() done(); } ); - - StubXhr.inst.send( '' ); } ); @@ -175,8 +170,6 @@ describe( 'XhrHttpImpl', function() expect( resp.data ).to.equal( reply ); done(); } ); - - StubXhr.inst.send( '' ); } ); } ); @@ -192,8 +185,6 @@ describe( 'XhrHttpImpl', function() expect( err ).to.equal( null ); done(); } ); - - StubXhr.inst.send( '' ); } ); @@ -217,8 +208,6 @@ describe( 'XhrHttpImpl', function() expect( err ).to.equal( null ); done(); } ); - - StubXhr.inst.send( '' ); } ); @@ -249,8 +238,6 @@ describe( 'XhrHttpImpl', function() done(); } ); - - StubXhr.inst.send( '' ); } );