prebid.js 7.51.0 → 7.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1plusXRtdProvider.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adriverIdSystem.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/airgridRtdProvider.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/allowActivities.js +1 -0
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/beopBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/conceptxBidAdapter.js +1 -0
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/dependencies.json +6 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/eskimiBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -0
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freepassIdSystem.js +1 -0
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/gdprEnforcement.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/growthCodeRtdProvider.js +1 -0
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -1
- package/dist/kulturemediaBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/limelightDigitalBidAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +154 -146
- package/dist/objectGuard.js +1 -0
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/oxxionAnalyticsAdapter.js +1 -0
- package/dist/pairIdSystem.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/proxistoreBidAdapter.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/retailspotBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/richaudienceBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rtdModule.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/schain.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/sirdataRtdProvider.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stroeerCoreBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/uid2IdSystem.js +1 -1
- package/dist/uid2IdSystem_shared.js +1 -0
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/viouslyBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/weboramaRtdProvider.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldlabBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspBidAdapter.js +1 -1
- package/integrationExamples/gpt/growthcode.html +20 -9
- package/integrationExamples/gpt/userId_example.html +20 -6
- package/libraries/objectGuard/objectGuard.js +108 -0
- package/libraries/objectGuard/ortbGuard.js +88 -0
- package/modules/.submodules.json +3 -1
- package/modules/1plusXRtdProvider.js +31 -60
- package/modules/adagioBidAdapter.js +86 -24
- package/modules/adgenerationBidAdapter.js +14 -5
- package/modules/adkernelBidAdapter.js +2 -2
- package/modules/adriverIdSystem.js +1 -1
- package/modules/airgridRtdProvider.js +11 -12
- package/modules/allowActivities.js +74 -0
- package/modules/asoBidAdapter.js +2 -1
- package/modules/beopBidAdapter.js +6 -0
- package/modules/conceptxBidAdapter.js +70 -0
- package/modules/conceptxBidAdapter.md +36 -0
- package/modules/connectIdSystem.js +89 -13
- package/modules/connectIdSystem.md +4 -7
- package/modules/criteoBidAdapter.js +18 -2
- package/modules/eskimiBidAdapter.js +171 -41
- package/modules/eskimiBidAdapter.md +35 -16
- package/modules/euidIdSystem.js +121 -0
- package/modules/euidIdSystem.md +131 -0
- package/modules/freepassIdSystem.js +61 -0
- package/modules/freepassIdSystem.md +47 -0
- package/modules/gdprEnforcement.js +98 -169
- package/modules/greenbidsAnalyticsAdapter.js +1 -1
- package/modules/growthCodeRtdProvider.js +131 -0
- package/modules/growthCodeRtdProvider.md +55 -0
- package/modules/id5IdSystem.js +3 -5
- package/modules/ixBidAdapter.js +17 -3
- package/modules/limelightDigitalBidAdapter.js +1 -1
- package/modules/logicadBidAdapter.js +14 -1
- package/modules/mediasquareBidAdapter.js +13 -5
- package/modules/nexx360BidAdapter.js +1 -0
- package/modules/oxxionAnalyticsAdapter.js +212 -0
- package/modules/oxxionAnalyticsAdapter.md +33 -0
- package/modules/pairIdSystem.js +16 -11
- package/modules/proxistoreBidAdapter.js +11 -14
- package/modules/richaudienceBidAdapter.js +10 -1
- package/modules/riseBidAdapter.js +1 -1
- package/modules/rtdModule/index.js +12 -1
- package/modules/schain.js +2 -2
- package/modules/sharethroughBidAdapter.js +2 -2
- package/modules/sirdataRtdProvider.js +73 -146
- package/modules/smartadserverBidAdapter.js +5 -0
- package/modules/sovrnBidAdapter.js +4 -1
- package/modules/stroeerCoreBidAdapter.js +55 -6
- package/modules/stvBidAdapter.js +34 -1
- package/modules/uid2IdSystem.js +27 -210
- package/modules/uid2IdSystem.md +104 -23
- package/modules/uid2IdSystem_shared.js +232 -0
- package/modules/undertoneBidAdapter.js +9 -1
- package/modules/userId/eids.js +8 -0
- package/modules/userId/index.js +69 -41
- package/modules/userId/userId.md +2 -1
- package/modules/viouslyBidAdapter.js +2 -2
- package/modules/weboramaRtdProvider.js +25 -95
- package/modules/weboramaRtdProvider.md +4 -4
- package/modules/yahoosspBidAdapter.js +45 -3
- package/modules/yahoosspBidAdapter.md +1 -1
- package/modules/yieldlabBidAdapter.js +23 -14
- package/modules/zeta_global_sspBidAdapter.js +28 -22
- package/package.json +1 -1
- package/src/activities/activities.js +47 -0
- package/src/activities/activityParams.js +8 -0
- package/src/activities/modules.js +1 -1
- package/src/activities/params.js +59 -0
- package/src/activities/redactor.js +157 -0
- package/src/activities/rules.js +95 -0
- package/src/adapterManager.js +45 -8
- package/src/adloader.js +1 -0
- package/src/fpd/rootDomain.js +1 -1
- package/src/prebid.js +1 -1
- package/src/storageManager.js +57 -44
- package/src/userSync.js +35 -18
- package/test/spec/activities/allowActivites_spec.js +138 -0
- package/test/spec/activities/objectGuard_spec.js +144 -0
- package/test/spec/activities/ortbGuard_spec.js +140 -0
- package/test/spec/activities/params_spec.js +25 -0
- package/test/spec/activities/redactor_spec.js +296 -0
- package/test/spec/activities/rules_spec.js +135 -0
- package/test/spec/modules/1plusXRtdProvider_spec.js +98 -149
- package/test/spec/modules/adagioBidAdapter_spec.js +46 -17
- package/test/spec/modules/adgenerationBidAdapter_spec.js +52 -12
- package/test/spec/modules/airgridRtdProvider_spec.js +2 -0
- package/test/spec/modules/beopBidAdapter_spec.js +24 -0
- package/test/spec/modules/conceptxBidAdapter_spec.js +136 -0
- package/test/spec/modules/connectIdSystem_spec.js +291 -23
- package/test/spec/modules/criteoBidAdapter_spec.js +85 -1
- package/test/spec/modules/eids_spec.js +15 -0
- package/test/spec/modules/eskimiBidAdapter_spec.js +264 -112
- package/test/spec/modules/euidIdSystem_spec.js +130 -0
- package/test/spec/modules/freepassIdSystem_spec.js +186 -0
- package/test/spec/modules/gdprEnforcement_spec.js +127 -414
- package/test/spec/modules/growthCodeRtdProvider_spec.js +127 -0
- package/test/spec/modules/id5IdSystem_spec.js +10 -3
- package/test/spec/modules/ixBidAdapter_spec.js +32 -1
- package/test/spec/modules/logicadBidAdapter_spec.js +122 -2
- package/test/spec/modules/mediasquareBidAdapter_spec.js +4 -0
- package/test/spec/modules/oxxionAnalyticsAdapter_spec.js +324 -0
- package/test/spec/modules/pairIdSystem_spec.js +16 -3
- package/test/spec/modules/realTimeDataModule_spec.js +1 -1
- package/test/spec/modules/richaudienceBidAdapter_spec.js +44 -0
- package/test/spec/modules/schain_spec.js +9 -0
- package/test/spec/modules/sharethroughBidAdapter_spec.js +1 -1
- package/test/spec/modules/sirdataRtdProvider_spec.js +110 -17
- package/test/spec/modules/smartadserverBidAdapter_spec.js +42 -0
- package/test/spec/modules/sovrnBidAdapter_spec.js +13 -0
- package/test/spec/modules/stroeerCoreBidAdapter_spec.js +151 -6
- package/test/spec/modules/stvBidAdapter_spec.js +13 -1
- package/test/spec/modules/uid2IdSystem_helpers.js +70 -0
- package/test/spec/modules/uid2IdSystem_spec.js +131 -86
- package/test/spec/modules/undertoneBidAdapter_spec.js +57 -1
- package/test/spec/modules/userId_spec.js +96 -33
- package/test/spec/modules/weboramaRtdProvider_spec.js +331 -205
- package/test/spec/modules/yahoosspBidAdapter_spec.js +103 -51
- package/test/spec/modules/yieldlabBidAdapter_spec.js +42 -2
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +204 -4
- package/test/spec/unit/core/adapterManager_spec.js +181 -1
- package/test/spec/unit/core/storageManager_spec.js +76 -68
- package/test/spec/unit/pbjs_api_spec.js +15 -25
- package/test/spec/userSync_spec.js +45 -16
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import {config} from 'src/config.js';
|
|
2
|
+
import {growthCodeRtdProvider} from '../../../modules/growthCodeRtdProvider';
|
|
3
|
+
import sinon from 'sinon';
|
|
4
|
+
import * as ajaxLib from 'src/ajax.js';
|
|
5
|
+
|
|
6
|
+
const sampleConfig = {
|
|
7
|
+
name: 'growthCodeRtd',
|
|
8
|
+
waitForIt: true,
|
|
9
|
+
params: {
|
|
10
|
+
pid: 'TEST01',
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
describe('growthCodeRtdProvider', function() {
|
|
15
|
+
beforeEach(function() {
|
|
16
|
+
config.resetConfig();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
afterEach(function () {
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
describe('growthCodeRtdSubmodule', function() {
|
|
23
|
+
it('test bad config instantiates', function () {
|
|
24
|
+
const ajaxStub = sinon.stub(ajaxLib, 'ajaxBuilder').callsFake(() => {
|
|
25
|
+
return (url, cbObj) => {
|
|
26
|
+
cbObj.success('{"status":"ok","version":"1.0.0","results":1,"items":[{"bidder":"client_a","attachment_point":"data","parameters":"{\\"client_a\\":{\\"user\\":{\\"ext\\":{\\"data\\":{\\"eids\\":[{\\"source\\":\\"\\",\\"uids\\":[{\\"id\\":\\"4254074976bb6a6d970f5f693bd8a75c\\",\\"atype\\":3,\\"ext\\":{\\"stype\\":\\"hemmd5\\"}},{\\"id\\":\\"d0ee291572ffcfba0bf7edb2b1c90ca7c32d255e5040b8b50907f5963abb1898\\",\\"atype\\":3,\\"ext\\":{\\"stype\\":\\"hemsha256\\"}}]}]}}}}}"}],"expires_at":1685029931}')
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
expect(growthCodeRtdProvider.init(null, null)).to.equal(false);
|
|
30
|
+
ajaxStub.restore()
|
|
31
|
+
});
|
|
32
|
+
it('successfully instantiates', function () {
|
|
33
|
+
const ajaxStub = sinon.stub(ajaxLib, 'ajaxBuilder').callsFake(() => {
|
|
34
|
+
return (url, cbObj) => {
|
|
35
|
+
cbObj.success('{"status":"ok","version":"1.0.0","results":1,"items":[{"bidder":"client_a","attachment_point":"data","parameters":"{\\"client_a\\":{\\"user\\":{\\"ext\\":{\\"data\\":{\\"eids\\":[{\\"source\\":\\"\\",\\"uids\\":[{\\"id\\":\\"4254074976bb6a6d970f5f693bd8a75c\\",\\"atype\\":3,\\"ext\\":{\\"stype\\":\\"hemmd5\\"}},{\\"id\\":\\"d0ee291572ffcfba0bf7edb2b1c90ca7c32d255e5040b8b50907f5963abb1898\\",\\"atype\\":3,\\"ext\\":{\\"stype\\":\\"hemsha256\\"}}]}]}}}}}"}],"expires_at":1685029931}')
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
expect(growthCodeRtdProvider.init(sampleConfig, null)).to.equal(true);
|
|
39
|
+
ajaxStub.restore()
|
|
40
|
+
});
|
|
41
|
+
it('successfully instantiates (cached)', function () {
|
|
42
|
+
const ajaxStub = sinon.stub(ajaxLib, 'ajaxBuilder').callsFake(() => {
|
|
43
|
+
return (url, cbObj) => {
|
|
44
|
+
cbObj.success('{"status":"ok","version":"1.0.0","results":1,"items":[{"bidder":"client_a","attachment_point":"data","parameters":"{\\"client_a\\":{\\"user\\":{\\"ext\\":{\\"data\\":{\\"eids\\":[{\\"source\\":\\"\\",\\"uids\\":[{\\"id\\":\\"4254074976bb6a6d970f5f693bd8a75c\\",\\"atype\\":3,\\"ext\\":{\\"stype\\":\\"hemmd5\\"}},{\\"id\\":\\"d0ee291572ffcfba0bf7edb2b1c90ca7c32d255e5040b8b50907f5963abb1898\\",\\"atype\\":3,\\"ext\\":{\\"stype\\":\\"hemsha256\\"}}]}]}}}}}"}],"expires_at":1685029931}')
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const localStoreItem = '[{"bidder":"client_a","attachment_point":"data","parameters":"{\\"client_a\\":{\\"user\\":{\\"ext\\":{\\"data\\":{\\"eids\\":[{\\"source\\":\\"\\",\\"uids\\":[{\\"id\\":\\"4254074976bb6a6d970f5f693bd8a75c\\",\\"atype\\":3,\\"ext\\":{\\"stype\\":\\"hemmd5\\"}},{\\"id\\":\\"d0ee291572ffcfba0bf7edb2b1c90ca7c32d255e5040b8b50907f5963abb1898\\",\\"atype\\":3,\\"ext\\":{\\"stype\\":\\"hemsha256\\"}}]}]}}}}}"}]'
|
|
48
|
+
expect(growthCodeRtdProvider.callServer(sampleConfig, localStoreItem, '1965949885', null)).to.equal(true);
|
|
49
|
+
ajaxStub.restore()
|
|
50
|
+
});
|
|
51
|
+
it('successfully instantiates (cached,expire)', function () {
|
|
52
|
+
const ajaxStub = sinon.stub(ajaxLib, 'ajaxBuilder').callsFake(() => {
|
|
53
|
+
return (url, cbObj) => {
|
|
54
|
+
cbObj.success('{"status":"ok","version":"1.0.0","results":1,"items":[{"bidder":"client_a","attachment_point":"data","parameters":"{\\"client_a\\":{\\"user\\":{\\"ext\\":{\\"data\\":{\\"eids\\":[{\\"source\\":\\"\\",\\"uids\\":[{\\"id\\":\\"4254074976bb6a6d970f5f693bd8a75c\\",\\"atype\\":3,\\"ext\\":{\\"stype\\":\\"hemmd5\\"}},{\\"id\\":\\"d0ee291572ffcfba0bf7edb2b1c90ca7c32d255e5040b8b50907f5963abb1898\\",\\"atype\\":3,\\"ext\\":{\\"stype\\":\\"hemsha256\\"}}]}]}}}}}"}],"expires_at":1685029931}')
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
const localStoreItem = '[{"bidder":"client_a","attachment_point":"data","parameters":"{\\"client_a\\":{\\"user\\":{\\"ext\\":{\\"data\\":{\\"eids\\":[{\\"source\\":\\"\\",\\"uids\\":[{\\"id\\":\\"4254074976bb6a6d970f5f693bd8a75c\\",\\"atype\\":3,\\"ext\\":{\\"stype\\":\\"hemmd5\\"}},{\\"id\\":\\"d0ee291572ffcfba0bf7edb2b1c90ca7c32d255e5040b8b50907f5963abb1898\\",\\"atype\\":3,\\"ext\\":{\\"stype\\":\\"hemsha256\\"}}]}]}}}}}"}]'
|
|
58
|
+
expect(growthCodeRtdProvider.callServer(sampleConfig, localStoreItem, '1679188732', null)).to.equal(true);
|
|
59
|
+
ajaxStub.restore()
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('test no items response', function () {
|
|
63
|
+
const ajaxStub = sinon.stub(ajaxLib, 'ajaxBuilder').callsFake(() => {
|
|
64
|
+
return (url, cbObj) => {
|
|
65
|
+
cbObj.success('{}')
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
expect(growthCodeRtdProvider.callServer(sampleConfig, null, '1679188732', null)).to.equal(true);
|
|
69
|
+
ajaxStub.restore();
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it('ajax error response', function () {
|
|
73
|
+
const ajaxStub = sinon.stub(ajaxLib, 'ajaxBuilder').callsFake(() => {
|
|
74
|
+
return (url, cbObj) => {
|
|
75
|
+
cbObj.error();
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
expect(growthCodeRtdProvider.callServer(sampleConfig, null, '1679188732', null)).to.equal(true);
|
|
79
|
+
ajaxStub.restore();
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('test alterBid data merge into ortb2 data (bidder)', function() {
|
|
83
|
+
const gcData =
|
|
84
|
+
{
|
|
85
|
+
'client_a':
|
|
86
|
+
{
|
|
87
|
+
'user':
|
|
88
|
+
{'ext':
|
|
89
|
+
{'data':
|
|
90
|
+
{'eids': [
|
|
91
|
+
{'source': 'test.com',
|
|
92
|
+
'uids': [
|
|
93
|
+
{
|
|
94
|
+
'id': '4254074976bb6a6d970f5f693bd8a75c',
|
|
95
|
+
'atype': 3,
|
|
96
|
+
'ext': {
|
|
97
|
+
'stype': 'hemmd5'}
|
|
98
|
+
}, {
|
|
99
|
+
'id': 'd0ee291572ffcfba0bf7edb2b1c90ca7c32d255e5040b8b50907f5963abb1898',
|
|
100
|
+
'atype': 3,
|
|
101
|
+
'ext': {
|
|
102
|
+
'stype': 'hemsha256'
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const payload = [
|
|
115
|
+
{
|
|
116
|
+
'bidder': 'client_a',
|
|
117
|
+
'attachment_point': 'data',
|
|
118
|
+
'parameters': JSON.stringify(gcData)
|
|
119
|
+
}]
|
|
120
|
+
|
|
121
|
+
const bidConfig = {ortb2Fragments: {bidder: {}}};
|
|
122
|
+
growthCodeRtdProvider.addData(bidConfig, payload)
|
|
123
|
+
|
|
124
|
+
expect(bidConfig.ortb2Fragments.bidder).to.deep.equal(gcData)
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
});
|
|
@@ -42,7 +42,9 @@ describe('ID5 ID System', function () {
|
|
|
42
42
|
const ID5_STORED_OBJ = {
|
|
43
43
|
'universal_uid': ID5_STORED_ID,
|
|
44
44
|
'signature': ID5_STORED_SIGNATURE,
|
|
45
|
-
'
|
|
45
|
+
'ext': {
|
|
46
|
+
'linkType': ID5_STORED_LINK_TYPE
|
|
47
|
+
}
|
|
46
48
|
};
|
|
47
49
|
const ID5_RESPONSE_ID = 'newid5id';
|
|
48
50
|
const ID5_RESPONSE_SIGNATURE = 'abcdef';
|
|
@@ -50,7 +52,10 @@ describe('ID5 ID System', function () {
|
|
|
50
52
|
const ID5_JSON_RESPONSE = {
|
|
51
53
|
'universal_uid': ID5_RESPONSE_ID,
|
|
52
54
|
'signature': ID5_RESPONSE_SIGNATURE,
|
|
53
|
-
'link_type': ID5_RESPONSE_LINK_TYPE
|
|
55
|
+
'link_type': ID5_RESPONSE_LINK_TYPE,
|
|
56
|
+
'ext': {
|
|
57
|
+
'linkType': ID5_RESPONSE_LINK_TYPE
|
|
58
|
+
}
|
|
54
59
|
};
|
|
55
60
|
const ALLOWED_ID5_VENDOR_DATA = {
|
|
56
61
|
purpose: {
|
|
@@ -958,7 +963,9 @@ describe('ID5 ID System', function () {
|
|
|
958
963
|
it('should not expose ID when everyone is in control group', function () {
|
|
959
964
|
storedObject.ab_testing = {result: 'control'};
|
|
960
965
|
storedObject.universal_uid = '';
|
|
961
|
-
storedObject.
|
|
966
|
+
storedObject.ext = {
|
|
967
|
+
'linkType': 0
|
|
968
|
+
};
|
|
962
969
|
let decoded = id5IdSubmodule.decode(storedObject, testConfig);
|
|
963
970
|
expect(decoded).is.deep.equal(expectedDecodedObjectWithoutIdAbOn);
|
|
964
971
|
});
|
|
@@ -2570,6 +2570,36 @@ describe('IndexexchangeAdapter', function () {
|
|
|
2570
2570
|
expect(impression.video.placement).to.equal(2);
|
|
2571
2571
|
});
|
|
2572
2572
|
|
|
2573
|
+
it('should use plcmt value when set in video.params', function () {
|
|
2574
|
+
const bid = utils.deepClone(DEFAULT_VIDEO_VALID_BID[0]);
|
|
2575
|
+
bid.params.video.plcmt = 2;
|
|
2576
|
+
const request = spec.buildRequests([bid], {})[0];
|
|
2577
|
+
const impression = extractPayload(request).imp[0];
|
|
2578
|
+
|
|
2579
|
+
expect(impression.id).to.equal(DEFAULT_VIDEO_VALID_BID[0].bidId);
|
|
2580
|
+
expect(impression.video.plcmt).to.equal(2);
|
|
2581
|
+
});
|
|
2582
|
+
|
|
2583
|
+
it('invalid plcmt value when set in video.params', function () {
|
|
2584
|
+
const bid = utils.deepClone(DEFAULT_VIDEO_VALID_BID[0]);
|
|
2585
|
+
bid.params.video.plcmt = 5;
|
|
2586
|
+
const request = spec.buildRequests([bid], {})[0];
|
|
2587
|
+
const impression = extractPayload(request).imp[0];
|
|
2588
|
+
|
|
2589
|
+
expect(impression.id).to.equal(DEFAULT_VIDEO_VALID_BID[0].bidId);
|
|
2590
|
+
expect(impression.video.plcmt).to.be.undefined;
|
|
2591
|
+
});
|
|
2592
|
+
|
|
2593
|
+
it('invalid plcmt value string when set in video.params', function () {
|
|
2594
|
+
const bid = utils.deepClone(DEFAULT_VIDEO_VALID_BID[0]);
|
|
2595
|
+
bid.params.video.plcmt = '4';
|
|
2596
|
+
const request = spec.buildRequests([bid], {})[0];
|
|
2597
|
+
const impression = extractPayload(request).imp[0];
|
|
2598
|
+
|
|
2599
|
+
expect(impression.id).to.equal(DEFAULT_VIDEO_VALID_BID[0].bidId);
|
|
2600
|
+
expect(impression.video.plcmt).to.be.undefined;
|
|
2601
|
+
});
|
|
2602
|
+
|
|
2573
2603
|
it('should set imp.ext.sid for video imps if params.id exists', function () {
|
|
2574
2604
|
const bid = utils.deepClone(DEFAULT_VIDEO_VALID_BID[0]);
|
|
2575
2605
|
bid.params.id = 50;
|
|
@@ -2596,7 +2626,8 @@ describe('IndexexchangeAdapter', function () {
|
|
|
2596
2626
|
const impression = extractPayload(request).imp[0];
|
|
2597
2627
|
|
|
2598
2628
|
expect(impression.id).to.equal(DEFAULT_VIDEO_VALID_BID[0].bidId);
|
|
2599
|
-
expect(impression.video.placement).to.equal(
|
|
2629
|
+
expect(impression.video.placement).to.equal(3);
|
|
2630
|
+
expect(extractPayload(request).ext.ixdiag.vpd).to.equal(true);
|
|
2600
2631
|
});
|
|
2601
2632
|
|
|
2602
2633
|
it('should handle unexpected context', function () {
|
|
@@ -35,7 +35,52 @@ describe('LogicadAdapter', function () {
|
|
|
35
35
|
third: 'fakesharedid'
|
|
36
36
|
}
|
|
37
37
|
}]
|
|
38
|
-
}]
|
|
38
|
+
}],
|
|
39
|
+
ortb2: {
|
|
40
|
+
device: {
|
|
41
|
+
sua: {
|
|
42
|
+
source: 2,
|
|
43
|
+
platform: {
|
|
44
|
+
brand: 'Windows',
|
|
45
|
+
version: ['10', '0', '0']
|
|
46
|
+
},
|
|
47
|
+
browsers: [
|
|
48
|
+
{
|
|
49
|
+
brand: 'Chromium',
|
|
50
|
+
version: ['112', '0', '5615', '20']
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
brand: 'Google Chrome',
|
|
54
|
+
version: ['112', '0', '5615', '20']
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
brand: 'Not:A-Brand',
|
|
58
|
+
version: ['99', '0', '0', '0']
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
mobile: 0,
|
|
62
|
+
model: '',
|
|
63
|
+
bitness: '64',
|
|
64
|
+
architecture: 'x86'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
user: {
|
|
68
|
+
data: [
|
|
69
|
+
{
|
|
70
|
+
ext: {
|
|
71
|
+
segtax: 600,
|
|
72
|
+
segclass: '2206021246'
|
|
73
|
+
},
|
|
74
|
+
segment: [
|
|
75
|
+
{
|
|
76
|
+
id: '1'
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
name: 'cd.ladsp.com'
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
39
84
|
}];
|
|
40
85
|
const nativeBidRequests = [{
|
|
41
86
|
bidder: 'logicad',
|
|
@@ -77,7 +122,52 @@ describe('LogicadAdapter', function () {
|
|
|
77
122
|
third: 'fakesharedid'
|
|
78
123
|
}
|
|
79
124
|
}]
|
|
80
|
-
}]
|
|
125
|
+
}],
|
|
126
|
+
ortb2: {
|
|
127
|
+
device: {
|
|
128
|
+
sua: {
|
|
129
|
+
source: 2,
|
|
130
|
+
platform: {
|
|
131
|
+
brand: 'Windows',
|
|
132
|
+
version: ['10', '0', '0']
|
|
133
|
+
},
|
|
134
|
+
browsers: [
|
|
135
|
+
{
|
|
136
|
+
brand: 'Chromium',
|
|
137
|
+
version: ['112', '0', '5615', '20']
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
brand: 'Google Chrome',
|
|
141
|
+
version: ['112', '0', '5615', '20']
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
brand: 'Not:A-Brand',
|
|
145
|
+
version: ['99', '0', '0', '0']
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
mobile: 0,
|
|
149
|
+
model: '',
|
|
150
|
+
bitness: '64',
|
|
151
|
+
architecture: 'x86'
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
user: {
|
|
155
|
+
data: [
|
|
156
|
+
{
|
|
157
|
+
ext: {
|
|
158
|
+
segtax: 600,
|
|
159
|
+
segclass: '2206021246'
|
|
160
|
+
},
|
|
161
|
+
segment: [
|
|
162
|
+
{
|
|
163
|
+
id: '1'
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
name: 'cd.ladsp.com'
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
}
|
|
81
171
|
}];
|
|
82
172
|
const bidderRequest = {
|
|
83
173
|
refererInfo: {
|
|
@@ -184,6 +274,36 @@ describe('LogicadAdapter', function () {
|
|
|
184
274
|
expect(data.auctionId).to.equal('18fd8b8b0bd757');
|
|
185
275
|
expect(data.eids[0].source).to.equal('sharedid.org');
|
|
186
276
|
expect(data.eids[0].uids[0].id).to.equal('fakesharedid');
|
|
277
|
+
|
|
278
|
+
expect(data.sua.source).to.equal(2);
|
|
279
|
+
expect(data.sua.platform.brand).to.equal('Windows');
|
|
280
|
+
expect(data.sua.platform.version[0]).to.equal('10');
|
|
281
|
+
expect(data.sua.platform.version[1]).to.equal('0');
|
|
282
|
+
expect(data.sua.platform.version[2]).to.equal('0');
|
|
283
|
+
expect(data.sua.browsers[0].brand).to.equal('Chromium');
|
|
284
|
+
expect(data.sua.browsers[0].version[0]).to.equal('112');
|
|
285
|
+
expect(data.sua.browsers[0].version[1]).to.equal('0');
|
|
286
|
+
expect(data.sua.browsers[0].version[2]).to.equal('5615');
|
|
287
|
+
expect(data.sua.browsers[0].version[3]).to.equal('20');
|
|
288
|
+
expect(data.sua.browsers[1].brand).to.equal('Google Chrome');
|
|
289
|
+
expect(data.sua.browsers[1].version[0]).to.equal('112');
|
|
290
|
+
expect(data.sua.browsers[1].version[1]).to.equal('0');
|
|
291
|
+
expect(data.sua.browsers[1].version[2]).to.equal('5615');
|
|
292
|
+
expect(data.sua.browsers[1].version[3]).to.equal('20');
|
|
293
|
+
expect(data.sua.browsers[2].brand).to.equal('Not:A-Brand');
|
|
294
|
+
expect(data.sua.browsers[2].version[0]).to.equal('99');
|
|
295
|
+
expect(data.sua.browsers[2].version[1]).to.equal('0');
|
|
296
|
+
expect(data.sua.browsers[2].version[2]).to.equal('0');
|
|
297
|
+
expect(data.sua.browsers[2].version[3]).to.equal('0');
|
|
298
|
+
expect(data.sua.mobile).to.equal(0);
|
|
299
|
+
expect(data.sua.model).to.equal('');
|
|
300
|
+
expect(data.sua.bitness).to.equal('64');
|
|
301
|
+
expect(data.sua.architecture).to.equal('x86');
|
|
302
|
+
|
|
303
|
+
expect(data.userData[0].name).to.equal('cd.ladsp.com');
|
|
304
|
+
expect(data.userData[0].segment[0].id).to.equal('1');
|
|
305
|
+
expect(data.userData[0].ext.segtax).to.equal(600);
|
|
306
|
+
expect(data.userData[0].ext.segclass).to.equal('2206021246');
|
|
187
307
|
});
|
|
188
308
|
});
|
|
189
309
|
|
|
@@ -98,6 +98,7 @@ describe('MediaSquare bid adapter tests', function () {
|
|
|
98
98
|
'code': 'test/publishername_atf_desktop_rg_pave',
|
|
99
99
|
'bid_id': 'aaaa1234',
|
|
100
100
|
'adomain': ['test.com'],
|
|
101
|
+
'context': 'instream',
|
|
101
102
|
}],
|
|
102
103
|
}};
|
|
103
104
|
|
|
@@ -161,7 +162,10 @@ describe('MediaSquare bid adapter tests', function () {
|
|
|
161
162
|
expect(bid.ttl).to.equal(300);
|
|
162
163
|
expect(bid.requestId).to.equal('aaaa1234');
|
|
163
164
|
expect(bid.mediasquare).to.exist;
|
|
165
|
+
expect(bid.mediasquare.bidder).to.exist;
|
|
164
166
|
expect(bid.mediasquare.bidder).to.equal('msqClassic');
|
|
167
|
+
expect(bid.mediasquare.context).to.exist;
|
|
168
|
+
expect(bid.mediasquare.context).to.equal('instream');
|
|
165
169
|
expect(bid.mediasquare.code).to.equal([DEFAULT_PARAMS[0].params.owner, DEFAULT_PARAMS[0].params.code].join('/'));
|
|
166
170
|
expect(bid.meta).to.exist;
|
|
167
171
|
expect(bid.meta.advertiserDomains).to.exist;
|