Skip to content

Commit

Permalink
Removing protocol check (prebid#11219)
Browse files Browse the repository at this point in the history
Removing validation for the value of video.protocol
  • Loading branch information
desidiver authored Mar 15, 2024
1 parent 90bc7f4 commit a7a8f74
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
8 changes: 0 additions & 8 deletions modules/yieldmoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,14 +654,6 @@ function validateVideoParams(bid) {
}

validate('video.protocols', val => isDefined(val), paramRequired);
validate(
'video.protocols',
(val) =>
isArrayOfNums(val) &&
val.every((v) => v >= 1 && v <= 12 && v != 9 && v != 10), // 9 and 10 are for DAST which are not supported.
paramInvalid,
'array of numbers between 1 and 12 except for 9 or 10 , ex: [2,3, 7, 11]'
);

validate('video.api', val => isDefined(val), paramRequired);
validate('video.api', val => isArrayOfNums(val) && val.every(v => (v >= 1 && v <= 6)),
Expand Down
14 changes: 0 additions & 14 deletions test/spec/modules/yieldmoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,20 +512,6 @@ describe('YieldmoAdapter', function () {
expect(buildVideoBidAndGetVideoParam().mimes).to.deep.equal(['video/mkv']);
});

it('should validate protocol in video bid request', function () {
expect(
spec.isBidRequestValid(
mockVideoBid({}, {}, { protocols: [2, 3, 11] })
)
).to.be.true;

expect(
spec.isBidRequestValid(
mockVideoBid({}, {}, { protocols: [2, 3, 10] })
)
).to.be.false;
});

describe('video.skip state check', () => {
it('should not set video.skip if neither *.video.skip nor *.video.skippable is present', function () {
utils.deepAccess(videoBid, 'mediaTypes.video')['skippable'] = false;
Expand Down

0 comments on commit a7a8f74

Please sign in to comment.