Skip to content

Commit

Permalink
Onevideo Adaptor ccpa support (prebid#4558)
Browse files Browse the repository at this point in the history
* outstream changes

* removing global filtet

* reverting page

* message

* adapter change

* remove space

* testcases

* testpage

* spaces for test page

* renderer exist case

* reverting package-lock.json

* adding schain object

* adding tagid

* syntaxx error fix

* video.html

* space trailing

* space

* tagid

* inventoryId and placement

* rewarded video

* added unit test case

* ccpa cahnges

* ccpa change

* test page

* test page change

* test page change 2

* change the variable
  • Loading branch information
DeepthiNeeladri authored and Isaac A. Dettman committed Dec 11, 2019
1 parent 8593acc commit 317aaa3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/oneVideoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,13 @@ function getRequestData(bid, consentData, bidRequest) {
};
}
}
if (bidRequest && bidRequest.uspConsent) {
bidData.regs = {
ext: {
us_privacy: bidRequest.uspConsent
}
};
}

return bidData;
}
Expand Down
6 changes: 6 additions & 0 deletions test/spec/modules/oneVideoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ describe('OneVideoBidAdapter', function () {
'consentString': 'test-gdpr-consent-string',
'gdprApplies': true
},
'uspConsent\'s': '1YN-',
'bidderCode': 'oneVideo',
'auctionId': 'e158486f-8c7f-472f-94ce-b0cbfbb50ab4',
'bidderRequestId': '1e498b84fffc39',
Expand Down Expand Up @@ -237,6 +238,11 @@ describe('OneVideoBidAdapter', function () {
expect(request[0].data.user.ext.consent).to.equal(bidderRequest.gdprConsent.consentString);
});

it('should send the uspConsent string', function () {
const request = spec.buildRequests([ bidRequest ], bidderRequest);
expect(request[0].data.regs.ext.us_privacy).to.equal(bidderRequest.uspConsent);
});

it('should send schain object', function () {
const requests = spec.buildRequests([ bidRequest ], bidderRequest);
const data = requests[0].data;
Expand Down

0 comments on commit 317aaa3

Please sign in to comment.