prebid.js 9.2.0 → 9.3.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/33acrossAnalyticsAdapter.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/BTBidAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adagioUtils.js +1 -1
- package/dist/addefendBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adstirBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/agmaAnalyticsAdapter.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/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/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/chunk-core.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.js +1 -0
- package/dist/consentManagementGpp.js +1 -1
- package/dist/consentManagementTcf.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/copper6sspBidAdapter.js +1 -0
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/dailymotionBidAdapter.js +1 -1
- package/dist/dependencies.json +18 -4
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/dxkultureBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/exadsBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.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/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/illuminBidAdapter.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/intentIqIdSystem.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/kimberliteBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.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/luceadBidAdapter.js +1 -1
- package/dist/mabidderBidAdapter.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/medianetAnalyticsAdapter.js +1 -1
- package/dist/medianetBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/missenaBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/nobidAnalyticsAdapter.js +1 -1
- package/dist/nobidBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +172 -167
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openwebBidAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/orakiBidAdapter.js +1 -0
- package/dist/orbidderBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/pairIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/publirBidAdapter.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.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/riseBidAdapter.js +1 -1
- package/dist/rubiconBidAdapter.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/shinezRtbBidAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smartyadsBidAdapter.js +1 -1
- package/dist/smartyadsUtils.js +1 -0
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/snigelBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stnBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/tagorasBidAdapter.js +1 -1
- package/dist/tappxBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/terceptAnalyticsAdapter.js +1 -1
- package/dist/themoneytizerBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/twistDigitalBidAdapter.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/unrulyBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/vidazooUtils.js +1 -0
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahooAdsBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/yuktamediaAnalyticsAdapter.js +1 -1
- package/libraries/consentManagement/cmUtils.js +38 -0
- package/libraries/smartyadsUtils/getAdUrlByRegion.js +32 -0
- package/libraries/vidazooUtils/bidderUtils.js +481 -0
- package/libraries/vidazooUtils/constants.js +7 -0
- package/modules/addefendBidAdapter.js +1 -2
- package/modules/adlooxRtdProvider.js +1 -1
- package/modules/adnuntiusBidAdapter.js +1 -0
- package/modules/adxcgAnalyticsAdapter.js +1 -2
- package/modules/consentManagementGpp.js +2 -38
- package/modules/consentManagementTcf.js +7 -38
- package/modules/conversantAnalyticsAdapter.js +1 -2
- package/modules/copper6sspBidAdapter.js +19 -0
- package/modules/copper6sspBidAdapter.md +79 -0
- package/modules/criteoBidAdapter.js +10 -3
- package/modules/id5AnalyticsAdapter.js +1 -2
- package/modules/intentIqIdSystem.js +408 -50
- package/modules/intentIqIdSystem.md +92 -0
- package/modules/liveIntentIdSystem.js +2 -2
- package/modules/mabidderBidAdapter.js +1 -2
- package/modules/medianetAnalyticsAdapter.js +1 -2
- package/modules/medianetBidAdapter.js +1 -1
- package/modules/orakiBidAdapter.js +19 -0
- package/modules/orakiBidAdapter.md +79 -0
- package/modules/orbidderBidAdapter.js +4 -2
- package/modules/pairIdSystem.js +27 -10
- package/modules/pixfutureBidAdapter.js +1 -2
- package/modules/prebidServerBidAdapter/index.js +1 -1
- package/modules/seedtagBidAdapter.js +4 -0
- package/modules/smartadserverBidAdapter.js +3 -0
- package/modules/smartyadsBidAdapter.js +6 -110
- package/modules/snigelBidAdapter.js +1 -2
- package/modules/tappxBidAdapter.js +1 -2
- package/modules/terceptAnalyticsAdapter.js +1 -2
- package/modules/twistDigitalBidAdapter.js +1 -12
- package/modules/userId/index.js +31 -21
- package/modules/vidazooBidAdapter.js +26 -468
- package/modules/yahooAdsBidAdapter.js +4 -1
- package/modules/yuktamediaAnalyticsAdapter.js +1 -2
- package/package.json +1 -1
- package/test/spec/fpd/gdpr_spec.js +24 -2
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +6 -3
- package/test/spec/modules/conversantAnalyticsAdapter_spec.js +1 -1
- package/test/spec/modules/copper6sspBidAdapter_spec.js +514 -0
- package/test/spec/modules/intentIqIdSystem_spec.js +264 -36
- package/test/spec/modules/orakiBidAdapter_spec.js +510 -0
- package/test/spec/modules/seedtagBidAdapter_spec.js +27 -0
- package/test/spec/modules/smartadserverBidAdapter_spec.js +7 -0
- package/test/spec/modules/smartyadsBidAdapter_spec.js +6 -83
- package/test/spec/modules/twistDigitalBidAdapter_spec.js +5 -3
- package/test/spec/modules/userId_spec.js +86 -47
- package/test/spec/modules/vidazooBidAdapter_spec.js +21 -23
- package/test/spec/modules/yahooAdsBidAdapter_spec.js +1 -1
|
@@ -3,9 +3,6 @@ import {
|
|
|
3
3
|
spec as adapter,
|
|
4
4
|
createDomain,
|
|
5
5
|
hashCode,
|
|
6
|
-
extractPID,
|
|
7
|
-
extractCID,
|
|
8
|
-
extractSubDomain,
|
|
9
6
|
getStorageItem,
|
|
10
7
|
setStorageItem,
|
|
11
8
|
tryParseJSON,
|
|
@@ -18,6 +15,11 @@ import {useFakeTimers} from 'sinon';
|
|
|
18
15
|
import {BANNER, VIDEO} from '../../../src/mediaTypes';
|
|
19
16
|
import {config} from '../../../src/config';
|
|
20
17
|
import {deepSetValue} from 'src/utils.js';
|
|
18
|
+
import {
|
|
19
|
+
extractPID,
|
|
20
|
+
extractCID,
|
|
21
|
+
extractSubDomain
|
|
22
|
+
} from '../../../libraries/vidazooUtils/bidderUtils.js';
|
|
21
23
|
|
|
22
24
|
export const TEST_ID_SYSTEMS = ['britepoolid', 'criteoId', 'id5id', 'idl_env', 'lipb', 'netId', 'parrableId', 'pubcid', 'tdid', 'pubProvidedId'];
|
|
23
25
|
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
coreStorage,
|
|
5
5
|
dep,
|
|
6
6
|
findRootDomain,
|
|
7
|
-
getConsentHash,
|
|
7
|
+
getConsentHash, getValidSubmoduleConfigs,
|
|
8
8
|
init,
|
|
9
9
|
PBJS_USER_ID_OPTOUT_NAME,
|
|
10
10
|
requestBidsHook,
|
|
@@ -190,6 +190,65 @@ describe('User ID', function () {
|
|
|
190
190
|
})
|
|
191
191
|
})
|
|
192
192
|
|
|
193
|
+
describe('userId config validation', () => {
|
|
194
|
+
beforeEach(() => {
|
|
195
|
+
sandbox.stub(utils, 'logWarn');
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
function mockConfig(storageConfig = {}) {
|
|
199
|
+
return {
|
|
200
|
+
name: 'mockModule',
|
|
201
|
+
storage: {
|
|
202
|
+
name: 'mockStorage',
|
|
203
|
+
type: 'cookie',
|
|
204
|
+
...storageConfig
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
Object.entries({
|
|
210
|
+
'not an object': 'garbage',
|
|
211
|
+
'missing name': {},
|
|
212
|
+
'empty name': {name: ''},
|
|
213
|
+
'empty storage config': {name: 'mockId', storage: {}},
|
|
214
|
+
'storage type, but no storage name': mockConfig({name: ''}),
|
|
215
|
+
'storage name, but no storage type': mockConfig({type: undefined}),
|
|
216
|
+
}).forEach(([t, config]) => {
|
|
217
|
+
it(`should log a warning and reject configuration with ${t}`, () => {
|
|
218
|
+
expect(getValidSubmoduleConfigs([config]).length).to.equal(0);
|
|
219
|
+
sinon.assert.called(utils.logWarn);
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
it('should reject non-array userId configuration', () => {
|
|
224
|
+
expect(getValidSubmoduleConfigs({})).to.eql([]);
|
|
225
|
+
sinon.assert.called(utils.logWarn);
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
it('should accept null configuration', () => {
|
|
229
|
+
expect(getValidSubmoduleConfigs()).to.eql([]);
|
|
230
|
+
sinon.assert.notCalled(utils.logWarn);
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
['refreshInSeconds', 'expires'].forEach(param => {
|
|
234
|
+
describe(`${param} parameter`, () => {
|
|
235
|
+
it('should be made a number, when possible', () => {
|
|
236
|
+
expect(getValidSubmoduleConfigs([mockConfig({[param]: '123'})])[0].storage[param]).to.equal(123);
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
it('should log a warning when not a number', () => {
|
|
240
|
+
expect(getValidSubmoduleConfigs([mockConfig({[param]: 'garbage'})])[0].storage[param]).to.not.exist;
|
|
241
|
+
sinon.assert.called(utils.logWarn)
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
it('should be left untouched when not specified', () => {
|
|
245
|
+
expect(getValidSubmoduleConfigs([mockConfig()])[0].storage[param]).to.not.exist;
|
|
246
|
+
sinon.assert.notCalled(utils.logWarn);
|
|
247
|
+
});
|
|
248
|
+
})
|
|
249
|
+
})
|
|
250
|
+
})
|
|
251
|
+
|
|
193
252
|
describe('Decorate Ad Units', function () {
|
|
194
253
|
beforeEach(function () {
|
|
195
254
|
// reset mockGpt so nothing else interferes
|
|
@@ -2173,60 +2232,40 @@ describe('User ID', function () {
|
|
|
2173
2232
|
});
|
|
2174
2233
|
});
|
|
2175
2234
|
|
|
2176
|
-
describe('
|
|
2177
|
-
let
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
init(config);
|
|
2182
|
-
cookie = document.cookie;
|
|
2183
|
-
cookieStub = sinon.stub(document, 'cookie');
|
|
2184
|
-
cookieStub.get(() => cookie);
|
|
2185
|
-
cookieStub.set((val) => cookie = val);
|
|
2186
|
-
});
|
|
2187
|
-
|
|
2188
|
-
afterEach(function () {
|
|
2189
|
-
cookieStub.restore();
|
|
2190
|
-
});
|
|
2191
|
-
|
|
2192
|
-
it('should allow submodules to override the domain', function () {
|
|
2193
|
-
const submodule = {
|
|
2194
|
-
submodule: {
|
|
2195
|
-
domainOverride: function () {
|
|
2196
|
-
return 'foo.com'
|
|
2197
|
-
}
|
|
2198
|
-
},
|
|
2235
|
+
describe('Submodule ID storage', () => {
|
|
2236
|
+
let submodule;
|
|
2237
|
+
beforeEach(() => {
|
|
2238
|
+
submodule = {
|
|
2239
|
+
submodule: {},
|
|
2199
2240
|
config: {
|
|
2200
2241
|
name: 'mockId',
|
|
2201
|
-
storage: {
|
|
2202
|
-
type: 'cookie'
|
|
2203
|
-
}
|
|
2204
2242
|
},
|
|
2205
2243
|
storageMgr: {
|
|
2206
|
-
setCookie: sinon.stub()
|
|
2244
|
+
setCookie: sinon.stub(),
|
|
2245
|
+
setDataInLocalStorage: sinon.stub()
|
|
2207
2246
|
},
|
|
2208
|
-
enabledStorageTypes: [
|
|
2247
|
+
enabledStorageTypes: ['cookie', 'html5']
|
|
2209
2248
|
}
|
|
2210
|
-
setStoredValue(submodule, 'bar');
|
|
2211
|
-
expect(submodule.storageMgr.setCookie.getCall(0).args[4]).to.equal('foo.com');
|
|
2212
2249
|
});
|
|
2213
2250
|
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
submodule
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2251
|
+
describe('Set cookie behavior', function () {
|
|
2252
|
+
beforeEach(() => {
|
|
2253
|
+
submodule.config.storage = {
|
|
2254
|
+
type: 'cookie'
|
|
2255
|
+
}
|
|
2256
|
+
});
|
|
2257
|
+
it('should allow submodules to override the domain', function () {
|
|
2258
|
+
submodule.submodule.domainOverride = function() {
|
|
2259
|
+
return 'foo.com'
|
|
2260
|
+
}
|
|
2261
|
+
setStoredValue(submodule, 'bar');
|
|
2262
|
+
expect(submodule.storageMgr.setCookie.getCall(0).args[4]).to.equal('foo.com');
|
|
2263
|
+
});
|
|
2264
|
+
|
|
2265
|
+
it('should pass no domain if submodule does not override the domain', function () {
|
|
2266
|
+
setStoredValue(submodule, 'bar');
|
|
2267
|
+
expect(submodule.storageMgr.setCookie.getCall(0).args[4]).to.equal(null);
|
|
2268
|
+
});
|
|
2230
2269
|
});
|
|
2231
2270
|
});
|
|
2232
2271
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import {expect} from 'chai';
|
|
2
2
|
import {
|
|
3
3
|
spec as adapter,
|
|
4
|
+
storage,
|
|
4
5
|
createDomain,
|
|
6
|
+
webSessionId
|
|
7
|
+
} from 'modules/vidazooBidAdapter.js';
|
|
8
|
+
import {
|
|
5
9
|
hashCode,
|
|
6
10
|
extractPID,
|
|
7
11
|
extractCID,
|
|
@@ -11,9 +15,9 @@ import {
|
|
|
11
15
|
tryParseJSON,
|
|
12
16
|
getUniqueDealId,
|
|
13
17
|
getNextDealId,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from '
|
|
18
|
+
getTopWindowQueryParams,
|
|
19
|
+
getVidazooSessionId
|
|
20
|
+
} from 'libraries/vidazooUtils/bidderUtils.js'
|
|
17
21
|
import * as utils from 'src/utils.js';
|
|
18
22
|
import {version} from 'package.json';
|
|
19
23
|
import {useFakeTimers} from 'sinon';
|
|
@@ -205,15 +209,6 @@ const REQUEST = {
|
|
|
205
209
|
}
|
|
206
210
|
};
|
|
207
211
|
|
|
208
|
-
function getTopWindowQueryParams() {
|
|
209
|
-
try {
|
|
210
|
-
const parsedUrl = utils.parseUrl(window.top.document.URL, {decodeSearchAsString: true});
|
|
211
|
-
return parsedUrl.search;
|
|
212
|
-
} catch (e) {
|
|
213
|
-
return '';
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
212
|
describe('VidazooBidAdapter', function () {
|
|
218
213
|
describe('validtae spec', function () {
|
|
219
214
|
it('exists and is a function', function () {
|
|
@@ -317,6 +312,7 @@ describe('VidazooBidAdapter', function () {
|
|
|
317
312
|
gpid: '',
|
|
318
313
|
prebidVersion: version,
|
|
319
314
|
ptrace: '1000',
|
|
315
|
+
vdzhum: '1000',
|
|
320
316
|
publisherId: '59ac17c192832d0011283fe3',
|
|
321
317
|
url: 'https%3A%2F%2Fwww.greatsite.com',
|
|
322
318
|
referrer: 'https://www.somereferrer.com',
|
|
@@ -436,6 +432,7 @@ describe('VidazooBidAdapter', function () {
|
|
|
436
432
|
prebidVersion: version,
|
|
437
433
|
schain: BID.schain,
|
|
438
434
|
ptrace: '1000',
|
|
435
|
+
vdzhum: '1000',
|
|
439
436
|
res: `${window.top.screen.width}x${window.top.screen.height}`,
|
|
440
437
|
mediaTypes: [BANNER],
|
|
441
438
|
uqs: getTopWindowQueryParams(),
|
|
@@ -526,6 +523,7 @@ describe('VidazooBidAdapter', function () {
|
|
|
526
523
|
prebidVersion: version,
|
|
527
524
|
schain: BID.schain,
|
|
528
525
|
ptrace: '1000',
|
|
526
|
+
vdzhum: '1000',
|
|
529
527
|
res: `${window.top.screen.width}x${window.top.screen.height}`,
|
|
530
528
|
mediaTypes: [BANNER],
|
|
531
529
|
uqs: getTopWindowQueryParams(),
|
|
@@ -800,14 +798,14 @@ describe('VidazooBidAdapter', function () {
|
|
|
800
798
|
$$PREBID_GLOBAL$$.bidderSettings = {};
|
|
801
799
|
});
|
|
802
800
|
it('should get undefined vidazoo session id', function () {
|
|
803
|
-
const sessionId = getVidazooSessionId();
|
|
801
|
+
const sessionId = getVidazooSessionId(storage);
|
|
804
802
|
expect(sessionId).to.be.empty;
|
|
805
803
|
});
|
|
806
804
|
|
|
807
805
|
it('should get vidazoo session id from storage', function () {
|
|
808
806
|
const vidSid = '1234-5678';
|
|
809
807
|
window.localStorage.setItem('vidSid', vidSid);
|
|
810
|
-
const sessionId = getVidazooSessionId();
|
|
808
|
+
const sessionId = getVidazooSessionId(storage);
|
|
811
809
|
expect(sessionId).to.be.equal(vidSid);
|
|
812
810
|
});
|
|
813
811
|
});
|
|
@@ -826,15 +824,15 @@ describe('VidazooBidAdapter', function () {
|
|
|
826
824
|
const key = 'myDealKey';
|
|
827
825
|
|
|
828
826
|
it('should get the next deal id', function () {
|
|
829
|
-
const dealId = getNextDealId(key);
|
|
830
|
-
const nextDealId = getNextDealId(key);
|
|
827
|
+
const dealId = getNextDealId(storage, key);
|
|
828
|
+
const nextDealId = getNextDealId(storage, key);
|
|
831
829
|
expect(dealId).to.be.equal(1);
|
|
832
830
|
expect(nextDealId).to.be.equal(2);
|
|
833
831
|
});
|
|
834
832
|
|
|
835
833
|
it('should get the first deal id on expiration', function (done) {
|
|
836
834
|
setTimeout(function () {
|
|
837
|
-
const dealId = getNextDealId(key, 100);
|
|
835
|
+
const dealId = getNextDealId(storage, key, 100);
|
|
838
836
|
expect(dealId).to.be.equal(1);
|
|
839
837
|
done();
|
|
840
838
|
}, 200);
|
|
@@ -855,13 +853,13 @@ describe('VidazooBidAdapter', function () {
|
|
|
855
853
|
const key = 'myKey';
|
|
856
854
|
let uniqueDealId;
|
|
857
855
|
beforeEach(() => {
|
|
858
|
-
uniqueDealId = getUniqueDealId(key, 0);
|
|
856
|
+
uniqueDealId = getUniqueDealId(storage, key, 0);
|
|
859
857
|
})
|
|
860
858
|
|
|
861
859
|
it('should get current unique deal id', function (done) {
|
|
862
860
|
// waiting some time so `now` will become past
|
|
863
861
|
setTimeout(() => {
|
|
864
|
-
const current = getUniqueDealId(key);
|
|
862
|
+
const current = getUniqueDealId(storage, key);
|
|
865
863
|
expect(current).to.be.equal(uniqueDealId);
|
|
866
864
|
done();
|
|
867
865
|
}, 200);
|
|
@@ -869,7 +867,7 @@ describe('VidazooBidAdapter', function () {
|
|
|
869
867
|
|
|
870
868
|
it('should get new unique deal id on expiration', function (done) {
|
|
871
869
|
setTimeout(() => {
|
|
872
|
-
const current = getUniqueDealId(key, 100);
|
|
870
|
+
const current = getUniqueDealId(storage, key, 100);
|
|
873
871
|
expect(current).to.not.be.equal(uniqueDealId);
|
|
874
872
|
done();
|
|
875
873
|
}, 200)
|
|
@@ -893,8 +891,8 @@ describe('VidazooBidAdapter', function () {
|
|
|
893
891
|
shouldAdvanceTime: true,
|
|
894
892
|
now
|
|
895
893
|
});
|
|
896
|
-
setStorageItem('myKey', 2020);
|
|
897
|
-
const {value, created} = getStorageItem('myKey');
|
|
894
|
+
setStorageItem(storage, 'myKey', 2020);
|
|
895
|
+
const {value, created} = getStorageItem(storage, 'myKey');
|
|
898
896
|
expect(created).to.be.equal(now);
|
|
899
897
|
expect(value).to.be.equal(2020);
|
|
900
898
|
expect(typeof value).to.be.equal('number');
|
|
@@ -905,7 +903,7 @@ describe('VidazooBidAdapter', function () {
|
|
|
905
903
|
it('should get external stored value', function () {
|
|
906
904
|
const value = 'superman'
|
|
907
905
|
window.localStorage.setItem('myExternalKey', value);
|
|
908
|
-
const item = getStorageItem('myExternalKey');
|
|
906
|
+
const item = getStorageItem(storage, 'myExternalKey');
|
|
909
907
|
expect(item).to.be.equal(value);
|
|
910
908
|
});
|
|
911
909
|
|
|
@@ -193,7 +193,7 @@ describe('Yahoo Advertising Bid Adapter:', () => {
|
|
|
193
193
|
});
|
|
194
194
|
|
|
195
195
|
it('should define the correct bidder aliases', () => {
|
|
196
|
-
expect(spec.aliases).to.deep.equal(['yahoossp', 'yahooAdvertising']);
|
|
196
|
+
expect(spec.aliases).to.deep.equal([{ 'code': 'yahoossp', 'gvlid': 25 }, { 'code': 'yahooAdvertising', 'gvlid': 25 }]);
|
|
197
197
|
});
|
|
198
198
|
|
|
199
199
|
it('should define the correct vendor ID', () => {
|