prebid.js 8.4.0 → 8.6.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/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/a1MediaRtdProvider.js +1 -0
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adfBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelAdnBidAdapter.js +1 -1
- package/dist/adkernelBidAdapter.js +1 -1
- package/dist/admixerIdSystem.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adqueryIdSystem.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adsinteractiveBidAdapter.js +1 -1
- package/dist/adtelligentIdSystem.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- 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/beachfrontBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/britepoolIdSystem.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagementGpp.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/criteoIdSystem.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/czechAdIdSystem.js +1 -1
- package/dist/dacIdSystem.js +1 -1
- package/dist/deepintentDpesIdSystem.js +1 -1
- package/dist/dependencies.json +6 -0
- package/dist/dmdIdSystem.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/fabrickIdSystem.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/ftrackIdSystem.js +1 -1
- package/dist/geolocationRtdProvider.js +1 -0
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/gravitoIdSystem.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/growthCodeAnalyticsAdapter.js +1 -1
- package/dist/growthCodeIdSystem.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hadronIdSystem.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/identityLinkIdSystem.js +1 -1
- package/dist/idxIdSystem.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/imuIdSystem.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/intentIqIdSystem.js +1 -1
- package/dist/invibesBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/justIdSystem.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/kinessoIdSystem.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/liveIntentIdSystem.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/lotamePanoramaIdSystem.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/merkleIdSystem.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/mspa.js +1 -1
- package/dist/mwOpenLinkIdSystem.js +1 -1
- package/dist/naveggIdSystem.js +1 -1
- package/dist/netIdSystem.js +1 -1
- package/dist/newspassidBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +186 -181
- package/dist/novatiqIdSystem.js +1 -1
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/oneKeyIdSystem.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/ozoneBidAdapter.js +1 -1
- 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/pubCircleBidAdapter.js +1 -0
- 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/quantcastIdSystem.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/relevadRtdProvider.js +1 -1
- package/dist/retailspotBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharedIdSystem.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/silverpushBidAdapter.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/ssmasBidAdapter.js +1 -0
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/tapadIdSystem.js +1 -1
- package/dist/tappxBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/tncIdSystem.js +1 -1
- package/dist/topicsFpdModule.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/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/unifiedIdSystem.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/utiqSystem.js +1 -1
- package/dist/verizonMediaIdSystem.js +1 -1
- package/dist/viantOrtbBidAdapter.js +1 -0
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/videojsVideoProvider.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vrtcalBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/zeotapIdPlusIdSystem.js +1 -1
- package/integrationExamples/gpt/adUnitFloors.html +0 -1
- package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +1 -1
- package/integrationExamples/videoModule/jwplayer/bidRequestScheduling.html +1 -1
- package/integrationExamples/videoModule/jwplayer/bidsBackHandlerOverride.html +137 -0
- package/integrationExamples/videoModule/jwplayer/eventListeners.html +1 -1
- package/integrationExamples/videoModule/jwplayer/eventsUI.html +1 -1
- package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +1 -1
- package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +1 -1
- package/integrationExamples/videoModule/jwplayer/playlist.html +1 -1
- package/integrationExamples/videoModule/videojs/bidsBackHandlerOverride.html +164 -0
- package/libraries/mspa/activityControls.js +51 -32
- package/modules/.submodules.json +1 -0
- package/modules/33acrossIdSystem.js +9 -0
- package/modules/a1MediaRtdProvider.js +92 -0
- package/modules/a1MediaRtdProvider.md +46 -0
- package/modules/adfBidAdapter.js +4 -1
- package/modules/adgenerationBidAdapter.js +3 -3
- package/modules/adkernelAdnBidAdapter.js +1 -1
- package/modules/adkernelBidAdapter.js +10 -3
- package/modules/admixerIdSystem.js +6 -0
- package/modules/adnuntiusBidAdapter.js +5 -13
- package/modules/adqueryIdSystem.js +6 -0
- package/modules/adsinteractiveBidAdapter.js +2 -2
- package/modules/adtelligentIdSystem.js +6 -0
- package/modules/adyoulikeBidAdapter.js +6 -3
- package/modules/amxIdSystem.js +6 -0
- package/modules/appnexusBidAdapter.js +1 -1
- package/modules/beachfrontBidAdapter.js +32 -6
- package/modules/britepoolIdSystem.js +6 -0
- package/modules/connectIdSystem.js +6 -0
- package/modules/consentManagementGpp.js +10 -1
- package/modules/consumableBidAdapter.js +9 -1
- package/modules/criteoBidAdapter.js +18 -0
- package/modules/criteoIdSystem.js +6 -0
- package/modules/cwireBidAdapter.js +19 -0
- package/modules/czechAdIdSystem.js +6 -0
- package/modules/dacIdSystem.js +6 -0
- package/modules/deepintentDpesIdSystem.js +7 -2
- package/modules/dmdIdSystem.js +6 -0
- package/modules/euidIdSystem.js +9 -0
- package/modules/fabrickIdSystem.js +6 -0
- package/modules/ftrackIdSystem.js +16 -0
- package/modules/geolocationRtdProvider.js +65 -0
- package/modules/gravitoIdSystem.js +6 -0
- package/modules/greenbidsRtdProvider.js +1 -1
- package/modules/growthCodeAnalyticsAdapter.js +7 -2
- package/modules/growthCodeIdSystem.js +20 -1
- package/modules/hadronIdSystem.js +6 -0
- package/modules/id5IdSystem.js +34 -8
- package/modules/identityLinkIdSystem.js +6 -0
- package/modules/idxIdSystem.js +6 -0
- package/modules/imdsBidAdapter.js +38 -14
- package/modules/imuIdSystem.js +10 -0
- package/modules/intentIqIdSystem.js +6 -0
- package/modules/invibesBidAdapter.js +5 -5
- package/modules/ixBidAdapter.js +16 -0
- package/modules/justIdSystem.js +6 -0
- package/modules/kinessoIdSystem.js +7 -2
- package/modules/liveIntentIdSystem.js +53 -0
- package/modules/lotamePanoramaIdSystem.js +6 -0
- package/modules/merkleIdSystem.js +24 -0
- package/modules/mwOpenLinkIdSystem.js +6 -0
- package/modules/naveggIdSystem.js +6 -0
- package/modules/netIdSystem.js +6 -0
- package/modules/newspassid.md +76 -0
- package/modules/newspassidBidAdapter.js +44 -18
- package/modules/novatiqIdSystem.js +12 -0
- package/modules/oneKeyIdSystem.js +26 -0
- package/modules/ozoneBidAdapter.js +65 -18
- package/modules/ozoneBidAdapter.md +3 -1
- package/modules/pairIdSystem.js +6 -0
- package/modules/parrableIdSystem.js +38 -2
- package/modules/pubCircleBidAdapter.js +231 -0
- package/modules/pubCircleBidAdapter.md +79 -0
- package/modules/publinkIdSystem.js +7 -1
- package/modules/quantcastIdSystem.js +6 -0
- package/modules/relevadRtdProvider.js +6 -7
- package/modules/rubiconBidAdapter.js +9 -0
- package/modules/sharedIdSystem.js +6 -0
- package/modules/silverpushBidAdapter.js +2 -2
- package/modules/ssmasBidAdapter.js +126 -0
- package/modules/ssmasBidAdapter.md +35 -0
- package/modules/sspBCBidAdapter.js +36 -13
- package/modules/tapadIdSystem.js +6 -0
- package/modules/tappxBidAdapter.js +10 -1
- package/modules/tappxBidAdapter.md +17 -0
- package/modules/tncIdSystem.js +6 -0
- package/modules/topicsFpdModule.js +21 -48
- package/modules/tripleliftBidAdapter.js +5 -0
- package/modules/uid2IdSystem.js +14 -0
- package/modules/unifiedIdSystem.js +11 -0
- package/modules/userId/eids.js +6 -445
- package/modules/userId/index.js +36 -24
- package/modules/utiqSystem.js +9 -0
- package/modules/verizonMediaIdSystem.js +6 -0
- package/modules/viantOrtbBidAdapter.js +113 -0
- package/modules/viantOrtbBidAdapter.md +54 -0
- package/modules/vidazooBidAdapter.js +9 -2
- package/modules/videojsVideoProvider.js +9 -2
- package/modules/vrtcalBidAdapter.js +10 -6
- package/modules/zeotapIdPlusIdSystem.js +6 -0
- package/package.json +1 -1
- package/src/adapters/bidderFactory.js +15 -6
- package/src/adloader.js +2 -1
- package/test/spec/libraries/mspa/activityControls_spec.js +145 -212
- package/test/spec/modules/a1MediaRtdProvider_spec.js +105 -0
- package/test/spec/modules/adfBidAdapter_spec.js +47 -0
- package/test/spec/modules/adgenerationBidAdapter_spec.js +6 -6
- package/test/spec/modules/adkernelAdnBidAdapter_spec.js +1 -2
- package/test/spec/modules/adkernelBidAdapter_spec.js +7 -2
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +116 -64
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +13 -24
- package/test/spec/modules/appnexusBidAdapter_spec.js +12 -1
- package/test/spec/modules/beachfrontBidAdapter_spec.js +35 -2
- package/test/spec/modules/consentManagementGpp_spec.js +16 -0
- package/test/spec/modules/consumableBidAdapter_spec.js +15 -0
- package/test/spec/modules/criteoBidAdapter_spec.js +31 -3
- package/test/spec/modules/cwireBidAdapter_spec.js +47 -0
- package/test/spec/modules/freewheel-sspBidAdapter_spec.js +5 -5
- package/test/spec/modules/geolocationRtdProvider_spec.js +119 -0
- package/test/spec/modules/greenbidsRtdProvider_spec.js +1 -1
- package/test/spec/modules/id5IdSystem_spec.js +18 -0
- package/test/spec/modules/imdsBidAdapter_spec.js +98 -17
- package/test/spec/modules/invibesBidAdapter_spec.js +123 -32
- package/test/spec/modules/ixBidAdapter_spec.js +23 -5
- package/test/spec/modules/medianetBidAdapter_spec.js +117 -0
- package/test/spec/modules/newspassidBidAdapter_spec.js +6 -0
- package/test/spec/modules/outbrainBidAdapter_spec.js +3 -5
- package/test/spec/modules/ozoneBidAdapter_spec.js +27 -1
- package/test/spec/modules/prebidServerBidAdapter_spec.js +2 -20
- package/test/spec/modules/priceFloors_spec.js +14 -0
- package/test/spec/modules/pubCircleBidAdapter_spec.js +399 -0
- package/test/spec/modules/pubmaticBidAdapter_spec.js +6 -373
- package/test/spec/modules/rubiconBidAdapter_spec.js +220 -9
- package/test/spec/modules/smaatoBidAdapter_spec.js +4 -6
- package/test/spec/modules/ssmasBidAdapter_spec.js +244 -0
- package/test/spec/modules/sspBCBidAdapter_spec.js +18 -19
- package/test/spec/modules/topicsFpdModule_spec.js +343 -365
- package/test/spec/modules/tripleliftBidAdapter_spec.js +40 -0
- package/test/spec/modules/userId_spec.js +116 -7
- package/test/spec/modules/viantOrtbBidAdapter_spec.js +432 -0
- package/test/spec/modules/vrtcalBidAdapter_spec.js +12 -4
- package/test/spec/modules/xeBidAdapter_spec.js +366 -368
- package/test/spec/modules/yahoosspBidAdapter_spec.js +5 -18
- package/test/spec/unit/core/bidderFactory_spec.js +61 -14
- package/integrationExamples/gpt/pbjs_video_adUnit.html +0 -109
|
@@ -9,11 +9,12 @@ import {
|
|
|
9
9
|
} from 'modules/criteoBidAdapter.js';
|
|
10
10
|
import * as utils from 'src/utils.js';
|
|
11
11
|
import * as refererDetection from 'src/refererDetection.js';
|
|
12
|
+
import * as ajax from 'src/ajax.js';
|
|
12
13
|
import { config } from '../../../src/config.js';
|
|
13
14
|
import { BANNER, NATIVE, VIDEO } from '../../../src/mediaTypes.js';
|
|
14
15
|
|
|
15
16
|
describe('The Criteo bidding adapter', function () {
|
|
16
|
-
let utilsMock, sandbox;
|
|
17
|
+
let utilsMock, sandbox, ajaxStub;
|
|
17
18
|
|
|
18
19
|
beforeEach(function () {
|
|
19
20
|
$$PREBID_GLOBAL$$.bidderSettings = {
|
|
@@ -26,6 +27,7 @@ describe('The Criteo bidding adapter', function () {
|
|
|
26
27
|
utilsMock = sinon.mock(utils);
|
|
27
28
|
|
|
28
29
|
sandbox = sinon.sandbox.create();
|
|
30
|
+
ajaxStub = sandbox.stub(ajax, 'ajax');
|
|
29
31
|
});
|
|
30
32
|
|
|
31
33
|
afterEach(function () {
|
|
@@ -33,6 +35,7 @@ describe('The Criteo bidding adapter', function () {
|
|
|
33
35
|
global.Criteo = undefined;
|
|
34
36
|
utilsMock.restore();
|
|
35
37
|
sandbox.restore();
|
|
38
|
+
ajaxStub.restore();
|
|
36
39
|
});
|
|
37
40
|
|
|
38
41
|
describe('getUserSyncs', function () {
|
|
@@ -56,7 +59,9 @@ describe('The Criteo bidding adapter', function () {
|
|
|
56
59
|
cookiesAreEnabledStub,
|
|
57
60
|
localStorageIsEnabledStub,
|
|
58
61
|
getCookieStub,
|
|
59
|
-
|
|
62
|
+
setCookieStub,
|
|
63
|
+
getDataFromLocalStorageStub,
|
|
64
|
+
removeDataFromLocalStorageStub;
|
|
60
65
|
|
|
61
66
|
beforeEach(function () {
|
|
62
67
|
getConfigStub = sinon.stub(config, 'getConfig');
|
|
@@ -75,8 +80,10 @@ describe('The Criteo bidding adapter', function () {
|
|
|
75
80
|
localStorageIsEnabledStub = sinon.stub(storage, 'localStorageIsEnabled');
|
|
76
81
|
localStorageIsEnabledStub.returns(true);
|
|
77
82
|
|
|
78
|
-
getCookieStub = sinon.stub(storage, 'getCookie')
|
|
83
|
+
getCookieStub = sinon.stub(storage, 'getCookie');
|
|
84
|
+
setCookieStub = sinon.stub(storage, 'setCookie');
|
|
79
85
|
getDataFromLocalStorageStub = sinon.stub(storage, 'getDataFromLocalStorage');
|
|
86
|
+
removeDataFromLocalStorageStub = sinon.stub(storage, 'removeDataFromLocalStorage');
|
|
80
87
|
});
|
|
81
88
|
|
|
82
89
|
afterEach(function () {
|
|
@@ -86,7 +93,9 @@ describe('The Criteo bidding adapter', function () {
|
|
|
86
93
|
cookiesAreEnabledStub.restore();
|
|
87
94
|
localStorageIsEnabledStub.restore();
|
|
88
95
|
getCookieStub.restore();
|
|
96
|
+
setCookieStub.restore();
|
|
89
97
|
getDataFromLocalStorageStub.restore();
|
|
98
|
+
removeDataFromLocalStorageStub.restore();
|
|
90
99
|
});
|
|
91
100
|
|
|
92
101
|
it('should not trigger sync if publisher is using fast bid', function () {
|
|
@@ -198,6 +207,25 @@ describe('The Criteo bidding adapter', function () {
|
|
|
198
207
|
url: `https://gum.criteo.com/syncframe?origin=criteoPrebidAdapter&topUrl=www.abc.com&us_privacy=ABC#${JSON.stringify(expectedHash).replace(/"/g, '%22')}`
|
|
199
208
|
}]);
|
|
200
209
|
});
|
|
210
|
+
|
|
211
|
+
it('should delete user data when calling onDataDeletionRequest', () => {
|
|
212
|
+
const cookieData = {
|
|
213
|
+
'cto_bundle': 'a'
|
|
214
|
+
};
|
|
215
|
+
const lsData = {
|
|
216
|
+
'cto_bundle': 'a'
|
|
217
|
+
}
|
|
218
|
+
getCookieStub.callsFake(cookieName => cookieData[cookieName]);
|
|
219
|
+
setCookieStub.callsFake((cookieName, value, expires) => cookieData[cookieName] = value);
|
|
220
|
+
removeDataFromLocalStorageStub.callsFake(name => lsData[name] = '');
|
|
221
|
+
spec.onDataDeletionRequest([]);
|
|
222
|
+
expect(getCookieStub.calledOnce).to.equal(true);
|
|
223
|
+
expect(setCookieStub.calledOnce).to.equal(true);
|
|
224
|
+
expect(removeDataFromLocalStorageStub.calledOnce).to.equal(true);
|
|
225
|
+
expect(cookieData.cto_bundle).to.equal('');
|
|
226
|
+
expect(lsData.cto_bundle).to.equal('');
|
|
227
|
+
expect(ajaxStub.calledOnce).to.equal(true);
|
|
228
|
+
});
|
|
201
229
|
});
|
|
202
230
|
|
|
203
231
|
describe('isBidRequestValid', function () {
|
|
@@ -293,4 +293,51 @@ describe('C-WIRE bid adapter', () => {
|
|
|
293
293
|
expect(bids[0].ad).to.exist;
|
|
294
294
|
})
|
|
295
295
|
});
|
|
296
|
+
|
|
297
|
+
describe('add user-syncs', function () {
|
|
298
|
+
it('empty user-syncs if no consent given', function () {
|
|
299
|
+
const userSyncs = spec.getUserSyncs({}, {}, {}, {});
|
|
300
|
+
|
|
301
|
+
expect(userSyncs).to.be.empty
|
|
302
|
+
})
|
|
303
|
+
it('empty user-syncs if no syncOption enabled', function () {
|
|
304
|
+
let gdprConsent = {
|
|
305
|
+
vendorData: {
|
|
306
|
+
purpose: {
|
|
307
|
+
consents: 1
|
|
308
|
+
}
|
|
309
|
+
}};
|
|
310
|
+
const userSyncs = spec.getUserSyncs({}, {}, gdprConsent, {});
|
|
311
|
+
|
|
312
|
+
expect(userSyncs).to.be.empty
|
|
313
|
+
})
|
|
314
|
+
|
|
315
|
+
it('user-syncs with enabled pixel option', function () {
|
|
316
|
+
let gdprConsent = {
|
|
317
|
+
vendorData: {
|
|
318
|
+
purpose: {
|
|
319
|
+
consents: 1
|
|
320
|
+
}
|
|
321
|
+
}};
|
|
322
|
+
let synOptions = {pixelEnabled: true, iframeEnabled: true};
|
|
323
|
+
const userSyncs = spec.getUserSyncs(synOptions, {}, gdprConsent, {});
|
|
324
|
+
|
|
325
|
+
expect(userSyncs[0].type).to.equal('image');
|
|
326
|
+
expect(userSyncs[0].url).to.equal('https://ib.adnxs.com/getuid?https://prebid.cwi.re/v1/cookiesync?xandrId=$UID');
|
|
327
|
+
})
|
|
328
|
+
|
|
329
|
+
it('user-syncs with enabled iframe option', function () {
|
|
330
|
+
let gdprConsent = {
|
|
331
|
+
vendorData: {
|
|
332
|
+
purpose: {
|
|
333
|
+
consents: 1
|
|
334
|
+
}
|
|
335
|
+
}};
|
|
336
|
+
let synOptions = {iframeEnabled: true};
|
|
337
|
+
const userSyncs = spec.getUserSyncs(synOptions, {}, gdprConsent, {});
|
|
338
|
+
|
|
339
|
+
expect(userSyncs[0].type).to.equal('iframe');
|
|
340
|
+
expect(userSyncs[0].url).to.equal('https://ib.adnxs.com/getuid?https://prebid.cwi.re/v1/cookiesync?xandrId=$UID');
|
|
341
|
+
})
|
|
342
|
+
})
|
|
296
343
|
});
|
|
@@ -135,11 +135,11 @@ describe('freewheelSSP BidAdapter Test', () => {
|
|
|
135
135
|
|
|
136
136
|
it('should pass 3rd party IDs with the request when present', function () {
|
|
137
137
|
const bidRequest = bidRequests[0];
|
|
138
|
-
bidRequest.userIdAsEids =
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
138
|
+
bidRequest.userIdAsEids = [
|
|
139
|
+
{source: 'adserver.org', uids: [{id: 'TTD_ID_FROM_USER_ID_MODULE', atype: 1, ext: {rtiPartner: 'TDID'}}]},
|
|
140
|
+
{source: 'admixer.net', uids: [{id: 'admixerId_FROM_USER_ID_MODULE', atype: 3}]},
|
|
141
|
+
{source: 'adtelligent.com', uids: [{id: 'adtelligentId_FROM_USER_ID_MODULE', atype: 3}]},
|
|
142
|
+
];
|
|
143
143
|
const request = spec.buildRequests(bidRequests);
|
|
144
144
|
const payload = request[0].data;
|
|
145
145
|
expect(payload._fw_prebid_3p_UID).to.deep.equal(JSON.stringify([
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import {config as _config, config} from 'src/config.js';
|
|
2
|
+
import { expect } from 'chai';
|
|
3
|
+
import * as events from 'src/events.js';
|
|
4
|
+
import * as prebidGlobal from 'src/prebidGlobal.js';
|
|
5
|
+
import { geolocationSubmodule } from 'modules/geolocationRtdProvider.js';
|
|
6
|
+
import * as utils from 'src/utils.js';
|
|
7
|
+
import {getGlobal} from 'src/prebidGlobal.js';
|
|
8
|
+
import 'src/prebid.js';
|
|
9
|
+
|
|
10
|
+
describe('Geolocation RTD Provider', function () {
|
|
11
|
+
let sandbox;
|
|
12
|
+
let placeholder;
|
|
13
|
+
const pbjs = getGlobal();
|
|
14
|
+
const adUnit = {
|
|
15
|
+
code: 'ad-slot-1',
|
|
16
|
+
mediaTypes: {
|
|
17
|
+
banner: {
|
|
18
|
+
sizes: [ [300, 250] ]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
bids: [
|
|
22
|
+
{
|
|
23
|
+
bidder: 'fake'
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
};
|
|
27
|
+
const providerConfig = {name: 'geolocation', waitForIt: true};
|
|
28
|
+
const rtdConfig = {realTimeData: {auctionDelay: 200, dataProviders: [providerConfig]}}
|
|
29
|
+
describe('Geolocation not supported', function() {
|
|
30
|
+
beforeEach(function() {
|
|
31
|
+
sandbox = sinon.sandbox.create();
|
|
32
|
+
});
|
|
33
|
+
afterEach(function() {
|
|
34
|
+
sandbox.restore();
|
|
35
|
+
sandbox = undefined;
|
|
36
|
+
});
|
|
37
|
+
it('init should return false', function () {
|
|
38
|
+
if (navigator.permissions) { sandbox.stub(navigator.permissions, 'query').value(undefined); expect(geolocationSubmodule.init({})).is.false; }
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
describe('Geolocation supported', function() {
|
|
42
|
+
beforeEach(function() {
|
|
43
|
+
sandbox = sinon.sandbox.create();
|
|
44
|
+
// placeholder = createDiv();
|
|
45
|
+
// append();
|
|
46
|
+
const __config = {};
|
|
47
|
+
sandbox.stub(_config, 'getConfig').callsFake(function (path) {
|
|
48
|
+
return utils.deepAccess(__config, path);
|
|
49
|
+
});
|
|
50
|
+
sandbox.stub(_config, 'setConfig').callsFake(function (obj) {
|
|
51
|
+
utils.mergeDeep(__config, obj);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
afterEach(function() {
|
|
55
|
+
sandbox.restore();
|
|
56
|
+
// remove();
|
|
57
|
+
sandbox = undefined;
|
|
58
|
+
placeholder = undefined;
|
|
59
|
+
pbjs.removeAdUnit();
|
|
60
|
+
});
|
|
61
|
+
it('init should return true', function () {
|
|
62
|
+
navigator.permissions && expect(geolocationSubmodule.init({})).is.true;
|
|
63
|
+
});
|
|
64
|
+
it('should set geolocation. (request all)', function(done) {
|
|
65
|
+
navigator.permissions && sandbox.stub(navigator.permissions, 'query').value(() => Promise.resolve({
|
|
66
|
+
state: 'granted',
|
|
67
|
+
}));
|
|
68
|
+
navigator.geolocation && sandbox.stub(navigator.geolocation, 'getCurrentPosition').value((cb) => {
|
|
69
|
+
// eslint-disable-next-line standard/no-callback-literal
|
|
70
|
+
cb({coords: {latitude: 1, longitude: 1}});
|
|
71
|
+
});
|
|
72
|
+
pbjs.addAdUnits([utils.deepClone(adUnit)]);
|
|
73
|
+
config.setConfig(rtdConfig);
|
|
74
|
+
const onDone = sandbox.stub();
|
|
75
|
+
const requestBidObject = {};
|
|
76
|
+
geolocationSubmodule.init({});
|
|
77
|
+
geolocationSubmodule.getBidRequestData(
|
|
78
|
+
requestBidObject,
|
|
79
|
+
onDone,
|
|
80
|
+
providerConfig
|
|
81
|
+
);
|
|
82
|
+
expect(pbjs.adUnits.length).to.eq(1);
|
|
83
|
+
setTimeout(function() {
|
|
84
|
+
// expect(requestBidObject?.ortb2Fragments?.global.device.geo?.type).to.eq(1);
|
|
85
|
+
done();
|
|
86
|
+
}, 300);
|
|
87
|
+
});
|
|
88
|
+
it('should call done due timeout', function(done) {
|
|
89
|
+
// sandbox.stub(navigator.permissions, 'query').value(() => new Promise(() => {}));
|
|
90
|
+
// sandbox.stub(navigator.geolocation, 'getCurrentPosition').value((cb) => {});
|
|
91
|
+
config.setConfig(rtdConfig);
|
|
92
|
+
// remove();
|
|
93
|
+
const onDone = sandbox.stub();
|
|
94
|
+
const requestBidObject = {adUnits: [utils.deepClone(adUnit)]};
|
|
95
|
+
geolocationSubmodule.init({});
|
|
96
|
+
geolocationSubmodule.getBidRequestData(
|
|
97
|
+
requestBidObject,
|
|
98
|
+
onDone,
|
|
99
|
+
{...providerConfig, test: 1}
|
|
100
|
+
);
|
|
101
|
+
setTimeout(function() {
|
|
102
|
+
sinon.assert.calledOnce(onDone);
|
|
103
|
+
expect(requestBidObject).to.not.have.property('ortb2Fragments.global.device.geo');
|
|
104
|
+
done();
|
|
105
|
+
}, 300);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
// function createDiv() {
|
|
109
|
+
// const div = document.createElement('div');
|
|
110
|
+
// div.id = adUnit.code;
|
|
111
|
+
// return div;
|
|
112
|
+
// }
|
|
113
|
+
// function append() {
|
|
114
|
+
// placeholder && document.body.appendChild(placeholder);
|
|
115
|
+
// }
|
|
116
|
+
// function remove() {
|
|
117
|
+
// placeholder && placeholder.parentElement && placeholder.parentElement.removeChild(placeholder);
|
|
118
|
+
// }
|
|
119
|
+
});
|
|
@@ -407,6 +407,24 @@ describe('ID5 ID System', function () {
|
|
|
407
407
|
})
|
|
408
408
|
});
|
|
409
409
|
|
|
410
|
+
it('should call the ID5 server for config with partner id being a string', function () {
|
|
411
|
+
let xhrServerMock = new XhrServerMock(sinon.createFakeServer())
|
|
412
|
+
let id5FetchConfig = getId5FetchConfig();
|
|
413
|
+
id5FetchConfig.params.partner = '173';
|
|
414
|
+
let submoduleResponse = callSubmoduleGetId(id5FetchConfig, undefined, undefined);
|
|
415
|
+
|
|
416
|
+
return xhrServerMock.expectConfigRequest()
|
|
417
|
+
.then(configRequest => {
|
|
418
|
+
let requestBody = JSON.parse(configRequest.requestBody)
|
|
419
|
+
expect(requestBody.params.partner).is.eq(173)
|
|
420
|
+
return xhrServerMock.respondWithConfigAndExpectNext(configRequest)
|
|
421
|
+
})
|
|
422
|
+
.then(fetchRequest => {
|
|
423
|
+
fetchRequest.respond(200, responseHeader, JSON.stringify(ID5_JSON_RESPONSE));
|
|
424
|
+
return submoduleResponse
|
|
425
|
+
})
|
|
426
|
+
});
|
|
427
|
+
|
|
410
428
|
it('should call the ID5 server for config with overridden url', function () {
|
|
411
429
|
let xhrServerMock = new XhrServerMock(sinon.createFakeServer())
|
|
412
430
|
let id5FetchConfig = getId5FetchConfig();
|
|
@@ -192,12 +192,45 @@ describe('imdsBidAdapter ', function () {
|
|
|
192
192
|
timeout: 3000
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
-
let
|
|
195
|
+
let bidderRequestWithUSPInExt = {
|
|
196
196
|
bidderRequestId: 'xyz123',
|
|
197
197
|
refererInfo: {
|
|
198
198
|
referer: 'https://test.com/foo/bar'
|
|
199
199
|
},
|
|
200
|
-
|
|
200
|
+
ortb2: {
|
|
201
|
+
regs: {
|
|
202
|
+
ext: {
|
|
203
|
+
us_privacy: '1YYY'
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
let bidderRequestWithUSPInRegs = {
|
|
210
|
+
bidderRequestId: 'xyz123',
|
|
211
|
+
refererInfo: {
|
|
212
|
+
referer: 'https://test.com/foo/bar'
|
|
213
|
+
},
|
|
214
|
+
ortb2: {
|
|
215
|
+
regs: {
|
|
216
|
+
us_privacy: '1YYY'
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
let bidderRequestWithUSPAndOthersInExt = {
|
|
222
|
+
bidderRequestId: 'xyz123',
|
|
223
|
+
refererInfo: {
|
|
224
|
+
referer: 'https://test.com/foo/bar'
|
|
225
|
+
},
|
|
226
|
+
ortb2: {
|
|
227
|
+
regs: {
|
|
228
|
+
ext: {
|
|
229
|
+
extra: 'extra item',
|
|
230
|
+
us_privacy: '1YYY'
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
201
234
|
};
|
|
202
235
|
|
|
203
236
|
let validBidRequestWithUserIds = {
|
|
@@ -391,7 +424,7 @@ describe('imdsBidAdapter ', function () {
|
|
|
391
424
|
let req = spec.buildRequests([badFloorBidRequest], bidderRequest);
|
|
392
425
|
expect(req).to.have.property('method', 'POST');
|
|
393
426
|
expect(req).to.have.property('url');
|
|
394
|
-
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?src
|
|
427
|
+
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?src=pbjs%2F$prebid.version$');
|
|
395
428
|
expect(req.data.id).to.equal('xyz123');
|
|
396
429
|
expect(req.data.imp).to.eql([
|
|
397
430
|
{
|
|
@@ -422,7 +455,7 @@ describe('imdsBidAdapter ', function () {
|
|
|
422
455
|
let req = spec.buildRequests([badFloorBidRequest], bidderRequest);
|
|
423
456
|
expect(req).to.have.property('method', 'POST');
|
|
424
457
|
expect(req).to.have.property('url');
|
|
425
|
-
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?src
|
|
458
|
+
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?src=pbjs%2F$prebid.version$');
|
|
426
459
|
expect(req.data.id).to.equal('xyz123');
|
|
427
460
|
expect(req.data.imp).to.eql([
|
|
428
461
|
{
|
|
@@ -454,7 +487,7 @@ describe('imdsBidAdapter ', function () {
|
|
|
454
487
|
let req = spec.buildRequests([newPosBidRequest], bidderRequest);
|
|
455
488
|
expect(req).to.have.property('method', 'POST');
|
|
456
489
|
expect(req).to.have.property('url');
|
|
457
|
-
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?src
|
|
490
|
+
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?src=pbjs%2F$prebid.version$');
|
|
458
491
|
expect(req.data.id).to.equal('xyz123');
|
|
459
492
|
expect(req.data.imp).to.eql([
|
|
460
493
|
{
|
|
@@ -485,7 +518,7 @@ describe('imdsBidAdapter ', function () {
|
|
|
485
518
|
let req = spec.buildRequests([newPosBidRequest], bidderRequest);
|
|
486
519
|
expect(req).to.have.property('method', 'POST');
|
|
487
520
|
expect(req).to.have.property('url');
|
|
488
|
-
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?src
|
|
521
|
+
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?src=pbjs%2F$prebid.version$');
|
|
489
522
|
expect(req.data.id).to.equal('xyz123');
|
|
490
523
|
expect(req.data.imp).to.eql([
|
|
491
524
|
{
|
|
@@ -577,7 +610,7 @@ describe('imdsBidAdapter ', function () {
|
|
|
577
610
|
let req = spec.buildRequests([validBidRequestVideo], bidderRequest);
|
|
578
611
|
expect(req).to.have.property('method', 'POST');
|
|
579
612
|
expect(req).to.have.property('url');
|
|
580
|
-
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?src
|
|
613
|
+
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?src=pbjs%2F$prebid.version$');
|
|
581
614
|
expect(req.data.id).to.equal('xyz123');
|
|
582
615
|
expect(req.data.imp).to.eql([
|
|
583
616
|
{
|
|
@@ -635,7 +668,7 @@ describe('imdsBidAdapter ', function () {
|
|
|
635
668
|
let req = spec.buildRequests([validBidRequestVideo], bidderRequest);
|
|
636
669
|
expect(req).to.have.property('method', 'POST');
|
|
637
670
|
expect(req).to.have.property('url');
|
|
638
|
-
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?src
|
|
671
|
+
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?src=pbjs%2F$prebid.version$');
|
|
639
672
|
expect(req.data.id).to.equal('xyz123');
|
|
640
673
|
expect(req.data.imp).to.eql([
|
|
641
674
|
{
|
|
@@ -701,16 +734,42 @@ describe('imdsBidAdapter ', function () {
|
|
|
701
734
|
}
|
|
702
735
|
]);
|
|
703
736
|
});
|
|
704
|
-
it('should
|
|
737
|
+
it('should have us_privacy string in regs instead of regs.ext bidder request', function () {
|
|
738
|
+
let req = spec.buildRequests([validBidRequest], bidderRequestWithUSPInExt);
|
|
739
|
+
expect(req).be.an('object');
|
|
740
|
+
expect(req).to.have.property('method', 'POST');
|
|
741
|
+
expect(req).to.have.property('url');
|
|
742
|
+
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?');
|
|
743
|
+
expect(req.data).to.exist.and.to.be.an('object');
|
|
744
|
+
expect(req.data.id).to.equal('xyz123');
|
|
745
|
+
expect(req.data.regs.us_privacy).to.equal('1YYY');
|
|
746
|
+
expect(req.data.regs.ext).to.not.exist;
|
|
747
|
+
expect(req.data.imp).to.eql([expectedDataImp1]);
|
|
748
|
+
});
|
|
749
|
+
it('should accept us_privacy string in regs', function () {
|
|
750
|
+
// banner test
|
|
751
|
+
let req = spec.buildRequests([validBidRequest], bidderRequestWithUSPInRegs);
|
|
752
|
+
expect(req).be.an('object');
|
|
753
|
+
expect(req).to.have.property('method', 'POST');
|
|
754
|
+
expect(req).to.have.property('url');
|
|
755
|
+
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?');
|
|
756
|
+
expect(req.data).to.exist.and.to.be.an('object');
|
|
757
|
+
expect(req.data.id).to.equal('xyz123');
|
|
758
|
+
expect(req.data.regs.us_privacy).to.equal('1YYY');
|
|
759
|
+
expect(req.data.regs.ext).to.not.exist;
|
|
760
|
+
expect(req.data.imp).to.eql([expectedDataImp1]);
|
|
761
|
+
});
|
|
762
|
+
it('should not remove regs.ext when moving us_privacy if there are other things in regs.ext', function () {
|
|
705
763
|
// banner test
|
|
706
|
-
let req = spec.buildRequests([validBidRequest],
|
|
764
|
+
let req = spec.buildRequests([validBidRequest], bidderRequestWithUSPAndOthersInExt);
|
|
707
765
|
expect(req).be.an('object');
|
|
708
766
|
expect(req).to.have.property('method', 'POST');
|
|
709
767
|
expect(req).to.have.property('url');
|
|
710
768
|
expect(req.url).to.contain('https://prebid.technoratimedia.com/openrtb/bids/prebid?');
|
|
711
769
|
expect(req.data).to.exist.and.to.be.an('object');
|
|
712
770
|
expect(req.data.id).to.equal('xyz123');
|
|
713
|
-
expect(req.data.regs.
|
|
771
|
+
expect(req.data.regs.us_privacy).to.equal('1YYY');
|
|
772
|
+
expect(req.data.regs.ext.extra).to.equal('extra item');
|
|
714
773
|
expect(req.data.imp).to.eql([expectedDataImp1]);
|
|
715
774
|
});
|
|
716
775
|
it('should contain user object when user ids are present in the bidder request', function () {
|
|
@@ -780,14 +839,14 @@ describe('imdsBidAdapter ', function () {
|
|
|
780
839
|
let req = spec.buildRequests([validBannerBidRequest], bidderRequest);
|
|
781
840
|
expect(req).to.have.property('method', 'POST');
|
|
782
841
|
expect(req).to.have.property('url');
|
|
783
|
-
expect(req.url).to.contain('//prebid.technoratimedia.com/openrtb/bids/prebid?src
|
|
842
|
+
expect(req.url).to.contain('//prebid.technoratimedia.com/openrtb/bids/prebid?src=pbjs%2F$prebid.version$');
|
|
784
843
|
});
|
|
785
844
|
|
|
786
845
|
it('should return valid bid request for video impression', function () {
|
|
787
846
|
let req = spec.buildRequests([validVideoBidReq], bidderRequest);
|
|
788
847
|
expect(req).to.have.property('method', 'POST');
|
|
789
848
|
expect(req).to.have.property('url');
|
|
790
|
-
expect(req.url).to.contain('//prebid.technoratimedia.com/openrtb/bids/prebid?src
|
|
849
|
+
expect(req.url).to.contain('//prebid.technoratimedia.com/openrtb/bids/prebid?src=pbjs%2F$prebid.version$');
|
|
791
850
|
});
|
|
792
851
|
});
|
|
793
852
|
|
|
@@ -887,7 +946,7 @@ describe('imdsBidAdapter ', function () {
|
|
|
887
946
|
let req = spec.buildRequests([validBidReq], bidderRequest);
|
|
888
947
|
expect(req).to.have.property('method', 'POST');
|
|
889
948
|
expect(req).to.have.property('url');
|
|
890
|
-
expect(req.url).to.contain('//prebid.technoratimedia.com/openrtb/bids/prebid?src
|
|
949
|
+
expect(req.url).to.contain('//prebid.technoratimedia.com/openrtb/bids/prebid?src=pbjs%2F$prebid.version$');
|
|
891
950
|
expect(req.data).to.have.property('source');
|
|
892
951
|
expect(req.data.source).to.have.property('ext');
|
|
893
952
|
expect(req.data.source.ext).to.have.property('schain');
|
|
@@ -1293,20 +1352,42 @@ describe('imdsBidAdapter ', function () {
|
|
|
1293
1352
|
});
|
|
1294
1353
|
});
|
|
1295
1354
|
describe('getUserSyncs', function () {
|
|
1296
|
-
it('should return
|
|
1355
|
+
it('should return an iframe usersync when iframes is enabled', function () {
|
|
1297
1356
|
let usersyncs = spec.getUserSyncs({
|
|
1298
1357
|
iframeEnabled: true
|
|
1299
1358
|
}, null);
|
|
1300
|
-
expect(usersyncs).to.be.an('array').
|
|
1359
|
+
expect(usersyncs).to.be.an('array').with.lengthOf(1);
|
|
1301
1360
|
expect(usersyncs[0]).to.have.property('type', 'iframe');
|
|
1302
1361
|
expect(usersyncs[0]).to.have.property('url');
|
|
1303
1362
|
expect(usersyncs[0].url).to.contain('https://ad-cdn.technoratimedia.com/html/usersync.html');
|
|
1304
1363
|
});
|
|
1305
1364
|
|
|
1306
|
-
it('should
|
|
1365
|
+
it('should return a pixel usersync when pixels is enabled', function () {
|
|
1307
1366
|
let usersyncs = spec.getUserSyncs({
|
|
1308
1367
|
pixelEnabled: true
|
|
1309
1368
|
}, null);
|
|
1369
|
+
expect(usersyncs).to.be.an('array').with.lengthOf(1);
|
|
1370
|
+
expect(usersyncs[0]).to.have.property('type', 'pixel');
|
|
1371
|
+
expect(usersyncs[0]).to.have.property('url');
|
|
1372
|
+
expect(usersyncs[0].url).to.contain('https://sync.technoratimedia.com/services');
|
|
1373
|
+
});
|
|
1374
|
+
|
|
1375
|
+
it('should return an iframe usersync when both iframe and pixels is enabled', function () {
|
|
1376
|
+
let usersyncs = spec.getUserSyncs({
|
|
1377
|
+
iframeEnabled: true,
|
|
1378
|
+
pixelEnabled: true
|
|
1379
|
+
}, null);
|
|
1380
|
+
expect(usersyncs).to.be.an('array').with.lengthOf(1);
|
|
1381
|
+
expect(usersyncs[0]).to.have.property('type', 'iframe');
|
|
1382
|
+
expect(usersyncs[0]).to.have.property('url');
|
|
1383
|
+
expect(usersyncs[0].url).to.contain('https://ad-cdn.technoratimedia.com/html/usersync.html');
|
|
1384
|
+
});
|
|
1385
|
+
|
|
1386
|
+
it('should not return a usersync when neither iframes nor pixel are enabled', function () {
|
|
1387
|
+
let usersyncs = spec.getUserSyncs({
|
|
1388
|
+
iframeEnabled: false,
|
|
1389
|
+
pixelEnabled: false
|
|
1390
|
+
}, null);
|
|
1310
1391
|
expect(usersyncs).to.be.an('array').that.is.empty;
|
|
1311
1392
|
});
|
|
1312
1393
|
});
|