Skip to content

Commit

Permalink
Deleted some unused code, and upped the vast version to use 3.0 every…
Browse files Browse the repository at this point in the history
…where.
  • Loading branch information
dbemiller committed Jul 5, 2017
1 parent 7df1e7e commit 4b9624b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion modules/dfpAdServerVideo.js
Expand Up @@ -39,7 +39,7 @@ import { parseSizesInput } from '../src/utils';
const defaultParamConstants = {
env: 'vp',
gdfp_req: 1,
output: 'xml_vast2',
output: 'xml_vast3',
unviewed_position_start: 1,
};

Expand Down
6 changes: 2 additions & 4 deletions src/videoCache.js
Expand Up @@ -10,10 +10,8 @@
*/

import { ajax } from './ajax';
import { tryAppendQueryString } from './utils';

const PUT_URL = 'https://prebid.adnxs.com/pbc/v1/put'
const EMPTY_VAST_RESPONSE = '<VAST version="2.0"></VAST>'

/**
* These are the properties required on a Bid in order to cache and retrieve it.
Expand All @@ -32,8 +30,8 @@ function wrapURI(uri) {
// Technically, this is vulnerable to cross-script injection by sketchy vastUrl bids.
// We could make sure it's a valid URI... but since we're loading VAST XML from the
// URL they provide anyway, that's probably not a big deal.
return `<VAST version="2.0">
<Ad id="">
return `<VAST version="3.0">
<Ad>
<Wrapper>
<AdSystem>prebid.org wrapper</AdSystem>
<VASTAdTagURI><![CDATA[${uri}]]></VASTAdTagURI>
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/dfpAdServerVideo_spec.js
Expand Up @@ -30,7 +30,7 @@ describe('The DFP video support module', () => {
expect(queryParams).to.have.property('env', 'vp');
expect(queryParams).to.have.property('gdfp_req', '1');
expect(queryParams).to.have.property('iu', 'my/adUnit');
expect(queryParams).to.have.property('output', 'xml_vast2');
expect(queryParams).to.have.property('output', 'xml_vast3');
expect(queryParams).to.have.property('sz', '640x480');
expect(queryParams).to.have.property('unviewed_position_start', '1');
expect(queryParams).to.have.property('url');
Expand Down
5 changes: 2 additions & 3 deletions test/spec/videoCache_spec.js
Expand Up @@ -3,7 +3,6 @@ import chai from 'chai';
import { store } from 'src/videoCache';

const should = chai.should();
const EMPTY_VAST_RESPONSE = '<VAST version="3.0"></VAST>'

describe('The video cache', () => {
function assertError(callbackSpy) {
Expand Down Expand Up @@ -63,8 +62,8 @@ describe('The video cache', () => {

JSON.parse(request.requestBody).should.deep.equal({
puts: [{
value: `<VAST version="2.0">
<Ad id="">
value: `<VAST version="3.0">
<Ad>
<Wrapper>
<AdSystem>prebid.org wrapper</AdSystem>
<VASTAdTagURI><![CDATA[my-mock-url.com]]></VASTAdTagURI>
Expand Down

0 comments on commit 4b9624b

Please sign in to comment.