prebid.js 8.7.0 → 8.9.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.
Files changed (350) hide show
  1. package/dist/1plusXRtdProvider.js +1 -1
  2. package/dist/33acrossBidAdapter.js +1 -1
  3. package/dist/33acrossIdSystem.js +1 -1
  4. package/dist/a1MediaRtdProvider.js +1 -1
  5. package/dist/adWMGAnalyticsAdapter.js +1 -1
  6. package/dist/adagioBidAdapter.js +1 -1
  7. package/dist/adbookpspBidAdapter.js +1 -1
  8. package/dist/adgenerationBidAdapter.js +1 -1
  9. package/dist/adkernelAdnAnalyticsAdapter.js +1 -1
  10. package/dist/adlooxAdServerVideo.js +1 -1
  11. package/dist/adlooxRtdProvider.js +1 -1
  12. package/dist/admaticBidAdapter.js +1 -1
  13. package/dist/admixerIdSystem.js +1 -1
  14. package/dist/adnuntiusRtdProvider.js +1 -1
  15. package/dist/adpartnerBidAdapter.js +1 -1
  16. package/dist/adqueryBidAdapter.js +1 -1
  17. package/dist/adqueryIdSystem.js +1 -1
  18. package/dist/adrelevantisBidAdapter.js +1 -1
  19. package/dist/adriverIdSystem.js +1 -1
  20. package/dist/adtelligentIdSystem.js +1 -1
  21. package/dist/adtrgtmeBidAdapter.js +1 -1
  22. package/dist/adxcgAnalyticsAdapter.js +1 -1
  23. package/dist/adxcgBidAdapter.js +1 -1
  24. package/dist/adxpremiumAnalyticsAdapter.js +1 -1
  25. package/dist/adyoulikeBidAdapter.js +1 -1
  26. package/dist/aidemBidAdapter.js +1 -1
  27. package/dist/ajaBidAdapter.js +1 -1
  28. package/dist/akamaiDapRtdProvider.js +1 -1
  29. package/dist/alkimiBidAdapter.js +1 -1
  30. package/dist/amxBidAdapter.js +1 -1
  31. package/dist/amxIdSystem.js +1 -1
  32. package/dist/analyticsAdapter.js +1 -1
  33. package/dist/appierAnalyticsAdapter.js +1 -1
  34. package/dist/appnexusBidAdapter.js +1 -1
  35. package/dist/asoBidAdapter.js +1 -1
  36. package/dist/atsAnalyticsAdapter.js +1 -1
  37. package/dist/automatadBidAdapter.js +1 -1
  38. package/dist/axonixBidAdapter.js +1 -1
  39. package/dist/bidViewability.js +1 -1
  40. package/dist/bidglassBidAdapter.js +1 -1
  41. package/dist/bidwatchAnalyticsAdapter.js +1 -1
  42. package/dist/big-richmediaBidAdapter.js +1 -1
  43. package/dist/brandmetricsRtdProvider.js +1 -1
  44. package/dist/bridBidAdapter.js +1 -1
  45. package/dist/bridgewellBidAdapter.js +1 -1
  46. package/dist/brightMountainMediaBidAdapter.js +1 -1
  47. package/dist/brightcomSSPBidAdapter.js +1 -1
  48. package/dist/britepoolIdSystem.js +1 -1
  49. package/dist/browsiRtdProvider.js +1 -1
  50. package/dist/byDataAnalyticsAdapter.js +1 -1
  51. package/dist/carodaBidAdapter.js +1 -1
  52. package/dist/categoryTranslation.js +1 -1
  53. package/dist/chtnwBidAdapter.js +1 -1
  54. package/dist/colossussspBidAdapter.js +1 -1
  55. package/dist/concertAnalyticsAdapter.js +1 -1
  56. package/dist/concertBidAdapter.js +1 -1
  57. package/dist/connectIdSystem.js +1 -1
  58. package/dist/connectadBidAdapter.js +1 -1
  59. package/dist/consumableBidAdapter.js +1 -1
  60. package/dist/conversantAnalyticsAdapter.js +1 -1
  61. package/dist/conversantBidAdapter.js +1 -1
  62. package/dist/craftBidAdapter.js +1 -1
  63. package/dist/criteoBidAdapter.js +1 -1
  64. package/dist/criteoIdSystem.js +1 -1
  65. package/dist/currency.js +1 -1
  66. package/dist/cwireBidAdapter.js +1 -1
  67. package/dist/dacIdSystem.js +1 -1
  68. package/dist/dailyhuntBidAdapter.js +1 -1
  69. package/dist/datablocksBidAdapter.js +1 -1
  70. package/dist/dependencies.json +4 -1
  71. package/dist/dgkeywordRtdProvider.js +1 -1
  72. package/dist/dmdIdSystem.js +1 -1
  73. package/dist/dspxBidAdapter.js +1 -1
  74. package/dist/eplanningAnalyticsAdapter.js +1 -1
  75. package/dist/eplanningBidAdapter.js +1 -1
  76. package/dist/euidIdSystem.js +1 -1
  77. package/dist/fabrickIdSystem.js +1 -1
  78. package/dist/feedadBidAdapter.js +1 -1
  79. package/dist/finativeBidAdapter.js +1 -1
  80. package/dist/fintezaAnalyticsAdapter.js +1 -1
  81. package/dist/fledgeForGpt.js +1 -1
  82. package/dist/freewheel-sspBidAdapter.js +1 -1
  83. package/dist/genericAnalyticsAdapter.js +1 -1
  84. package/dist/geoedgeRtdProvider.js +1 -1
  85. package/dist/gmosspBidAdapter.js +1 -1
  86. package/dist/gnetBidAdapter.js +1 -1
  87. package/dist/goldbachBidAdapter.js +1 -1
  88. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  89. package/dist/greenbidsRtdProvider.js +1 -1
  90. package/dist/gridBidAdapter.js +1 -1
  91. package/dist/growthCodeAnalyticsAdapter.js +1 -1
  92. package/dist/growthCodeIdSystem.js +1 -1
  93. package/dist/growthCodeRtdProvider.js +1 -1
  94. package/dist/gumgumBidAdapter.js +1 -1
  95. package/dist/h12mediaBidAdapter.js +1 -1
  96. package/dist/hadronAnalyticsAdapter.js +1 -1
  97. package/dist/hadronIdSystem.js +1 -1
  98. package/dist/hadronRtdProvider.js +1 -1
  99. package/dist/hypelabBidAdapter.js +1 -1
  100. package/dist/iasRtdProvider.js +1 -1
  101. package/dist/id5AnalyticsAdapter.js +1 -1
  102. package/dist/id5IdSystem.js +1 -1
  103. package/dist/idImportLibrary.js +1 -1
  104. package/dist/identityLinkIdSystem.js +1 -1
  105. package/dist/imRtdProvider.js +1 -1
  106. package/dist/imdsBidAdapter.js +1 -1
  107. package/dist/impactifyBidAdapter.js +1 -1
  108. package/dist/improvedigitalBidAdapter.js +1 -1
  109. package/dist/imuIdSystem.js +1 -1
  110. package/dist/insticatorBidAdapter.js +1 -1
  111. package/dist/intentIqIdSystem.js +1 -1
  112. package/dist/invisiblyAnalyticsAdapter.js +1 -1
  113. package/dist/ixBidAdapter.js +1 -1
  114. package/dist/jixieBidAdapter.js +1 -1
  115. package/dist/justpremiumBidAdapter.js +1 -1
  116. package/dist/jwplayerRtdProvider.js +1 -1
  117. package/dist/kargoAnalyticsAdapter.js +1 -1
  118. package/dist/kargoBidAdapter.js +1 -1
  119. package/dist/kinessoIdSystem.js +1 -1
  120. package/dist/konduitAnalyticsAdapter.js +1 -1
  121. package/dist/konduitWrapper.js +1 -1
  122. package/dist/kueezBidAdapter.js +1 -1
  123. package/dist/kueezRtbBidAdapter.js +1 -1
  124. package/dist/kulturemediaBidAdapter.js +1 -1
  125. package/dist/lassoBidAdapter.js +1 -1
  126. package/dist/lifestreetBidAdapter.js +1 -1
  127. package/dist/limelightDigitalBidAdapter.js +1 -1
  128. package/dist/liveIntentAnalyticsAdapter.js +1 -1
  129. package/dist/liveIntentIdSystem.js +1 -1
  130. package/dist/livewrappedAnalyticsAdapter.js +1 -1
  131. package/dist/logicadBidAdapter.js +1 -1
  132. package/dist/loglyliftBidAdapter.js +1 -1
  133. package/dist/lotamePanoramaIdSystem.js +1 -1
  134. package/dist/luponmediaBidAdapter.js +1 -1
  135. package/dist/magniteAnalyticsAdapter.js +1 -1
  136. package/dist/malltvAnalyticsAdapter.js +1 -1
  137. package/dist/mantisBidAdapter.js +1 -1
  138. package/dist/marsmediaAnalyticsAdapter.js +1 -1
  139. package/dist/marsmediaBidAdapter.js +1 -1
  140. package/dist/mediafuseBidAdapter.js +1 -1
  141. package/dist/medianetAnalyticsAdapter.js +1 -1
  142. package/dist/mediasquareBidAdapter.js +1 -1
  143. package/dist/merkleIdSystem.js +1 -1
  144. package/dist/mgidBidAdapter.js +1 -1
  145. package/dist/mgidRtdProvider.js +1 -1
  146. package/dist/minutemediaBidAdapter.js +1 -1
  147. package/dist/minutemediaplusBidAdapter.js +1 -1
  148. package/dist/mspa.js +1 -1
  149. package/dist/mwOpenLinkIdSystem.js +1 -1
  150. package/dist/nativoBidAdapter.js +1 -1
  151. package/dist/naveggIdSystem.js +1 -1
  152. package/dist/neuwoRtdProvider.js +1 -1
  153. package/dist/nexx360BidAdapter.js +1 -1
  154. package/dist/not-for-prod/prebid.js +248 -247
  155. package/dist/novatiqIdSystem.js +1 -1
  156. package/dist/oguryBidAdapter.js +1 -1
  157. package/dist/onetagBidAdapter.js +1 -1
  158. package/dist/ooloAnalyticsAdapter.js +1 -1
  159. package/dist/open8BidAdapter.js +1 -1
  160. package/dist/operaadsBidAdapter.js +1 -1
  161. package/dist/operaadsIdSystem.js +1 -0
  162. package/dist/optidigitalBidAdapter.js +1 -1
  163. package/dist/optimeraRtdProvider.js +1 -1
  164. package/dist/outbrainBidAdapter.js +1 -1
  165. package/dist/oxxionAnalyticsAdapter.js +1 -1
  166. package/dist/oxxionRtdProvider.js +1 -1
  167. package/dist/parrableIdSystem.js +1 -1
  168. package/dist/pixfutureBidAdapter.js +1 -1
  169. package/dist/prebid-core.js +2 -2
  170. package/dist/prebidServerBidAdapter.js +1 -1
  171. package/dist/prebidmanagerAnalyticsAdapter.js +1 -1
  172. package/dist/priceFloors.js +1 -1
  173. package/dist/prismaBidAdapter.js +1 -1
  174. package/dist/pubgeniusBidAdapter.js +1 -1
  175. package/dist/publinkIdSystem.js +1 -1
  176. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  177. package/dist/pubmaticBidAdapter.js +1 -1
  178. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  179. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  180. package/dist/pxyzBidAdapter.js +1 -1
  181. package/dist/quantcastBidAdapter.js +1 -1
  182. package/dist/qwarryBidAdapter.js +1 -1
  183. package/dist/readpeakBidAdapter.js +1 -1
  184. package/dist/reconciliationRtdProvider.js +1 -1
  185. package/dist/relaidoBidAdapter.js +1 -1
  186. package/dist/relevadRtdProvider.js +1 -1
  187. package/dist/retailspotBidAdapter.js +1 -1
  188. package/dist/rhythmoneBidAdapter.js +1 -1
  189. package/dist/riseBidAdapter.js +1 -1
  190. package/dist/rivrAnalyticsAdapter.js +1 -1
  191. package/dist/roxotAnalyticsAdapter.js +1 -1
  192. package/dist/rubiconBidAdapter.js +1 -1
  193. package/dist/scaleableAnalyticsAdapter.js +1 -1
  194. package/dist/seedingAllianceBidAdapter.js +1 -1
  195. package/dist/seedtagBidAdapter.js +1 -1
  196. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  197. package/dist/sharethroughBidAdapter.js +1 -1
  198. package/dist/shinezBidAdapter.js +1 -1
  199. package/dist/silverpushBidAdapter.js +1 -1
  200. package/dist/sirdataRtdProvider.js +1 -1
  201. package/dist/slimcutBidAdapter.js +1 -1
  202. package/dist/smaatoBidAdapter.js +1 -1
  203. package/dist/smartadserverBidAdapter.js +1 -1
  204. package/dist/smartxBidAdapter.js +1 -1
  205. package/dist/smartyadsBidAdapter.js +1 -1
  206. package/dist/smilewantedBidAdapter.js +1 -1
  207. package/dist/snigelBidAdapter.js +1 -1
  208. package/dist/sonobiAnalyticsAdapter.js +1 -1
  209. package/dist/sonobiBidAdapter.js +1 -1
  210. package/dist/sovrnAnalyticsAdapter.js +1 -1
  211. package/dist/sovrnBidAdapter.js +1 -1
  212. package/dist/sspBCBidAdapter.js +1 -1
  213. package/dist/staqAnalyticsAdapter.js +1 -1
  214. package/dist/stvBidAdapter.js +1 -1
  215. package/dist/sublimeBidAdapter.js +1 -1
  216. package/dist/taboolaBidAdapter.js +1 -1
  217. package/dist/talkadsBidAdapter.js +1 -1
  218. package/dist/tapadIdSystem.js +1 -1
  219. package/dist/targetVideoBidAdapter.js +1 -1
  220. package/dist/teadsBidAdapter.js +1 -1
  221. package/dist/teadsIdSystem.js +1 -1
  222. package/dist/terceptAnalyticsAdapter.js +1 -1
  223. package/dist/timeoutRtdProvider.js +1 -1
  224. package/dist/topicsFpdModule.js +1 -1
  225. package/dist/trionBidAdapter.js +1 -1
  226. package/dist/tripleliftBidAdapter.js +1 -1
  227. package/dist/ttdBidAdapter.js +1 -1
  228. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  229. package/dist/uid2IdSystem.js +1 -1
  230. package/dist/underdogmediaBidAdapter.js +1 -1
  231. package/dist/undertoneBidAdapter.js +1 -1
  232. package/dist/unifiedIdSystem.js +1 -1
  233. package/dist/verizonMediaIdSystem.js +1 -1
  234. package/dist/vidazooBidAdapter.js +1 -1
  235. package/dist/videobyteBidAdapter.js +1 -1
  236. package/dist/visxBidAdapter.js +1 -1
  237. package/dist/vrtcalBidAdapter.js +1 -1
  238. package/dist/vuukleBidAdapter.js +1 -1
  239. package/dist/weboramaRtdProvider.js +1 -1
  240. package/dist/widespaceBidAdapter.js +1 -1
  241. package/dist/winrBidAdapter.js +1 -1
  242. package/dist/yahoosspBidAdapter.js +1 -1
  243. package/dist/yieldmoBidAdapter.js +1 -1
  244. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  245. package/dist/yuktamediaAnalyticsAdapter.js +1 -1
  246. package/dist/zeta_global_sspAnalyticsAdapter.js +1 -1
  247. package/dist/zeta_global_sspBidAdapter.js +1 -1
  248. package/integrationExamples/gpt/growthcode.html +3 -12
  249. package/integrationExamples/topics/topics-server.js +72 -0
  250. package/libraries/mspa/activityControls.js +3 -1
  251. package/modules/.submodules.json +2 -1
  252. package/modules/a1MediaRtdProvider.js +1 -1
  253. package/modules/adagioBidAdapter.js +11 -3
  254. package/modules/admaticBidAdapter.js +5 -0
  255. package/modules/adqueryBidAdapter.js +23 -21
  256. package/modules/adqueryIdSystem.js +45 -30
  257. package/modules/adrelevantisBidAdapter.js +2 -0
  258. package/modules/bidViewability.js +7 -0
  259. package/modules/bidViewability.md +9 -8
  260. package/modules/brandmetricsRtdProvider.js +30 -27
  261. package/modules/concertBidAdapter.js +1 -0
  262. package/modules/criteoBidAdapter.js +66 -43
  263. package/modules/fledgeForGpt.js +17 -4
  264. package/modules/fledgeForGpt.md +17 -10
  265. package/modules/geoedgeRtdProvider.js +44 -18
  266. package/modules/geoedgeRtdProvider.md +2 -1
  267. package/modules/growthCodeAnalyticsAdapter.js +7 -4
  268. package/modules/growthCodeAnalyticsAdapter.md +1 -7
  269. package/modules/liveIntentIdSystem.js +16 -1
  270. package/modules/nativoBidAdapter.js +21 -3
  271. package/modules/nexx360BidAdapter.js +7 -1
  272. package/modules/onetagBidAdapter.js +3 -0
  273. package/modules/operaadsBidAdapter.js +5 -0
  274. package/modules/operaadsBidAdapter.md +5 -5
  275. package/modules/operaadsIdSystem.js +106 -0
  276. package/modules/operaadsIdSystem.md +52 -0
  277. package/modules/oxxionAnalyticsAdapter.js +22 -5
  278. package/modules/prebidServerBidAdapter/index.js +8 -2
  279. package/modules/pubmaticAnalyticsAdapter.js +16 -3
  280. package/modules/rubiconBidAdapter.js +2 -2
  281. package/modules/smartyadsBidAdapter.js +18 -1
  282. package/modules/snigelBidAdapter.js +69 -16
  283. package/modules/snigelBidAdapter.md +9 -3
  284. package/modules/topicsFpdModule.js +35 -9
  285. package/modules/visxBidAdapter.js +51 -1
  286. package/package.json +2 -2
  287. package/src/adapters/bidderFactory.js +14 -5
  288. package/src/adloader.js +1 -0
  289. package/src/ajax.js +126 -87
  290. package/src/constants.json +8 -2
  291. package/src/native.js +14 -3
  292. package/test/mocks/xhr.js +256 -9
  293. package/test/spec/libraries/mspa/activityControls_spec.js +6 -0
  294. package/test/spec/modules/adagioBidAdapter_spec.js +15 -0
  295. package/test/spec/modules/adlooxAdServerVideo_spec.js +1 -5
  296. package/test/spec/modules/adlooxRtdProvider_spec.js +1 -5
  297. package/test/spec/modules/admaticBidAdapter_spec.js +5 -0
  298. package/test/spec/modules/adqueryIdSystem_spec.js +13 -24
  299. package/test/spec/modules/bidViewability_spec.js +32 -1
  300. package/test/spec/modules/brandmetricsRtdProvider_spec.js +6 -0
  301. package/test/spec/modules/categoryTranslation_spec.js +7 -9
  302. package/test/spec/modules/concertBidAdapter_spec.js +1 -1
  303. package/test/spec/modules/conversantAnalyticsAdapter_spec.js +3 -5
  304. package/test/spec/modules/criteoBidAdapter_spec.js +228 -0
  305. package/test/spec/modules/currency_spec.js +2 -2
  306. package/test/spec/modules/dmdIdSystem_spec.js +2 -2
  307. package/test/spec/modules/eids_spec.js +48 -0
  308. package/test/spec/modules/euidIdSystem_spec.js +10 -9
  309. package/test/spec/modules/feedadBidAdapter_spec.js +1 -1
  310. package/test/spec/modules/fledge_spec.js +117 -43
  311. package/test/spec/modules/geoedgeRtdProvider_spec.js +52 -39
  312. package/test/spec/modules/greenbidsRtdProvider_spec.js +3 -12
  313. package/test/spec/modules/growthCodeAnalyticsAdapter_spec.js +0 -1
  314. package/test/spec/modules/hadronIdSystem_spec.js +1 -1
  315. package/test/spec/modules/id5AnalyticsAdapter_spec.js +1 -7
  316. package/test/spec/modules/id5IdSystem_spec.js +25 -25
  317. package/test/spec/modules/identityLinkIdSystem_spec.js +0 -2
  318. package/test/spec/modules/intentIqIdSystem_spec.js +0 -2
  319. package/test/spec/modules/invisiblyAnalyticsAdapter_spec.js +2 -6
  320. package/test/spec/modules/jwplayerRtdProvider_spec.js +26 -28
  321. package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +5 -0
  322. package/test/spec/modules/liveIntentIdSystem_spec.js +5 -0
  323. package/test/spec/modules/magniteAnalyticsAdapter_spec.js +2 -2
  324. package/test/spec/modules/mgidRtdProvider_spec.js +1 -5
  325. package/test/spec/modules/nativoBidAdapter_spec.js +6 -1
  326. package/test/spec/modules/nexx360BidAdapter_spec.js +48 -1
  327. package/test/spec/modules/oguryBidAdapter_spec.js +5 -19
  328. package/test/spec/modules/onetagBidAdapter_spec.js +69 -0
  329. package/test/spec/modules/ooloAnalyticsAdapter_spec.js +1 -1
  330. package/test/spec/modules/operaadsIdSystem_spec.js +53 -0
  331. package/test/spec/modules/oxxionAnalyticsAdapter_spec.js +6 -1
  332. package/test/spec/modules/prebidServerBidAdapter_spec.js +33 -2
  333. package/test/spec/modules/priceFloors_spec.js +33 -37
  334. package/test/spec/modules/publinkIdSystem_spec.js +1 -1
  335. package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +102 -18
  336. package/test/spec/modules/pubwiseAnalyticsAdapter_spec.js +2 -8
  337. package/test/spec/modules/rubiconBidAdapter_spec.js +24 -0
  338. package/test/spec/modules/smartyadsBidAdapter_spec.js +49 -0
  339. package/test/spec/modules/snigelBidAdapter_spec.js +57 -6
  340. package/test/spec/modules/teadsIdSystem_spec.js +1 -1
  341. package/test/spec/modules/topicsFpdModule_spec.js +102 -1
  342. package/test/spec/modules/uid2IdSystem_helpers.js +5 -5
  343. package/test/spec/modules/uid2IdSystem_spec.js +24 -24
  344. package/test/spec/modules/userId_spec.js +1 -1
  345. package/test/spec/modules/visxBidAdapter_spec.js +151 -1
  346. package/test/spec/modules/zeta_global_sspAnalyticsAdapter_spec.js +2 -5
  347. package/test/spec/native_spec.js +20 -5
  348. package/test/spec/unit/core/ajax_spec.js +403 -0
  349. package/test/spec/unit/core/bidderFactory_spec.js +80 -8
  350. package/test/spec/videoCache_spec.js +4 -4
@@ -2,18 +2,16 @@ import { getAdserverCategoryHook, initTranslation, storage } from 'modules/categ
2
2
  import { config } from 'src/config.js';
3
3
  import * as utils from 'src/utils.js';
4
4
  import { expect } from 'chai';
5
+ import {server} from '../../mocks/xhr.js';
5
6
 
6
7
  describe('category translation', function () {
7
- let fakeTranslationServer;
8
8
  let getLocalStorageStub;
9
9
 
10
10
  beforeEach(function () {
11
- fakeTranslationServer = sinon.fakeServer.create();
12
11
  getLocalStorageStub = sinon.stub(storage, 'getDataFromLocalStorage');
13
12
  });
14
13
 
15
14
  afterEach(function() {
16
- fakeTranslationServer.reset();
17
15
  getLocalStorageStub.restore();
18
16
  config.resetConfig();
19
17
  });
@@ -73,7 +71,7 @@ describe('category translation', function () {
73
71
  }
74
72
  }));
75
73
  initTranslation();
76
- expect(fakeTranslationServer.requests.length).to.equal(0);
74
+ expect(server.requests.length).to.equal(0);
77
75
  clock.restore();
78
76
  });
79
77
 
@@ -86,15 +84,15 @@ describe('category translation', function () {
86
84
  }
87
85
  }));
88
86
  initTranslation();
89
- expect(fakeTranslationServer.requests.length).to.equal(1);
87
+ expect(server.requests.length).to.equal(1);
90
88
  clock.restore();
91
89
  });
92
90
 
93
91
  it('should use default mapping file if publisher has not defined in config', function () {
94
92
  getLocalStorageStub.returns(null);
95
93
  initTranslation('http://sample.com', 'somekey');
96
- expect(fakeTranslationServer.requests.length).to.equal(1);
97
- expect(fakeTranslationServer.requests[0].url).to.equal('http://sample.com');
94
+ expect(server.requests.length).to.equal(1);
95
+ expect(server.requests[0].url).to.equal('http://sample.com/');
98
96
  });
99
97
 
100
98
  it('should use publisher defined mapping file', function () {
@@ -105,7 +103,7 @@ describe('category translation', function () {
105
103
  });
106
104
  getLocalStorageStub.returns(null);
107
105
  initTranslation('http://sample.com', 'somekey');
108
- expect(fakeTranslationServer.requests.length).to.equal(2);
109
- expect(fakeTranslationServer.requests[0].url).to.equal('http://sample.com');
106
+ expect(server.requests.length).to.equal(2);
107
+ expect(server.requests[0].url).to.equal('http://sample.com/');
110
108
  });
111
109
  });
@@ -116,7 +116,7 @@ describe('ConcertAdapter', function () {
116
116
  expect(payload).to.have.property('meta');
117
117
  expect(payload).to.have.property('slots');
118
118
 
119
- const metaRequiredFields = ['prebidVersion', 'pageUrl', 'screen', 'debug', 'uid', 'optedOut', 'adapterVersion', 'uspConsent', 'gdprConsent', 'gppConsent'];
119
+ const metaRequiredFields = ['prebidVersion', 'pageUrl', 'screen', 'debug', 'uid', 'optedOut', 'adapterVersion', 'uspConsent', 'gdprConsent', 'gppConsent', 'browserLanguage'];
120
120
  const slotsRequiredFields = ['name', 'bidId', 'transactionId', 'sizes', 'partnerId', 'slotType'];
121
121
 
122
122
  metaRequiredFields.forEach(function(field) {
@@ -3,6 +3,7 @@ import {expect} from 'chai';
3
3
  import {default as conversantAnalytics, CNVR_CONSTANTS, cnvrHelper} from 'modules/conversantAnalyticsAdapter';
4
4
  import * as utils from 'src/utils.js';
5
5
  import * as prebidGlobal from 'src/prebidGlobal';
6
+ import {server} from '../../mocks/xhr.js';
6
7
 
7
8
  import constants from 'src/constants.json'
8
9
 
@@ -10,14 +11,13 @@ let events = require('src/events');
10
11
 
11
12
  describe('Conversant analytics adapter tests', function() {
12
13
  let sandbox; // sinon sandbox to make restoring all stubbed objects easier
13
- let xhr; // xhr stub from sinon for capturing data sent via ajax
14
14
  let clock; // clock stub from sinon to mock our cache cleanup interval
15
15
  let logInfoStub;
16
16
 
17
17
  const PREBID_VERSION = '1.2';
18
18
  const SITE_ID = 108060;
19
19
 
20
- let requests = [];
20
+ let requests;
21
21
  const DATESTAMP = Date.now();
22
22
 
23
23
  const VALID_CONFIGURATION = {
@@ -36,10 +36,9 @@ describe('Conversant analytics adapter tests', function() {
36
36
  };
37
37
 
38
38
  beforeEach(function () {
39
+ requests = server.requests;
39
40
  sandbox = sinon.sandbox.create();
40
41
  sandbox.stub(events, 'getEvents').returns([]); // need to stub this otherwise unwanted events seem to get fired during testing
41
- xhr = sandbox.useFakeXMLHttpRequest(); // allows us to capture ajax requests
42
- xhr.onCreate = function (req) { requests.push(req); }; // save ajax requests in a private array for testing purposes
43
42
  let getGlobalStub = {
44
43
  version: PREBID_VERSION,
45
44
  getUserIds: function() { // userIdTargeting.js init() gets called on AUCTION_END so we need to mock this function.
@@ -60,7 +59,6 @@ describe('Conversant analytics adapter tests', function() {
60
59
 
61
60
  afterEach(function () {
62
61
  sandbox.restore();
63
- requests = []; // clean up any requests in our ajax request capture array.
64
62
  conversantAnalytics.disableAnalytics();
65
63
  });
66
64
 
@@ -703,6 +703,33 @@ describe('The Criteo bidding adapter', function () {
703
703
  expect(ortbRequest.source.tid).to.equal('abc');
704
704
  });
705
705
 
706
+ it('should properly transmit bidId if available', function () {
707
+ const bidderRequest = {
708
+ ortb2: {
709
+ source: {
710
+ tid: 'abc'
711
+ }
712
+ }
713
+ };
714
+ const bidRequests = [
715
+ {
716
+ bidId: 'bidId',
717
+ bidder: 'criteo',
718
+ adUnitCode: 'bid-123',
719
+ transactionId: 'transaction-123',
720
+ mediaTypes: {
721
+ banner: {
722
+ sizes: [[728, 90]]
723
+ }
724
+ },
725
+ params: {}
726
+ },
727
+ ];
728
+ const request = spec.buildRequests(bidRequests, bidderRequest);
729
+ const ortbRequest = request.data;
730
+ expect(ortbRequest.slots[0].slotid).to.equal('bidId');
731
+ });
732
+
706
733
  it('should properly build a request if refererInfo is not provided', function () {
707
734
  const bidderRequest = {};
708
735
  const bidRequests = [
@@ -1886,6 +1913,11 @@ describe('The Criteo bidding adapter', function () {
1886
1913
  bidRequests: [{
1887
1914
  adUnitCode: 'test-requestId',
1888
1915
  bidId: 'test-bidId',
1916
+ mediaTypes: {
1917
+ banner: {
1918
+ sizes: [[728, 90]]
1919
+ }
1920
+ },
1889
1921
  params: {
1890
1922
  networkId: 456,
1891
1923
  }
@@ -1904,6 +1936,202 @@ describe('The Criteo bidding adapter', function () {
1904
1936
  expect(bids[0].meta.networkName).to.equal('Criteo');
1905
1937
  });
1906
1938
 
1939
+ it('should properly parse a bid response with a networkId with twin ad unit banner win', function () {
1940
+ const response = {
1941
+ body: {
1942
+ slots: [{
1943
+ impid: 'test-requestId',
1944
+ cpm: 1.23,
1945
+ creative: 'test-ad',
1946
+ creativecode: 'test-crId',
1947
+ width: 728,
1948
+ height: 90,
1949
+ deal: 'myDealCode',
1950
+ adomain: ['criteo.com'],
1951
+ ext: {
1952
+ meta: {
1953
+ networkName: 'Criteo'
1954
+ }
1955
+ }
1956
+ }],
1957
+ },
1958
+ };
1959
+ const request = {
1960
+ bidRequests: [{
1961
+ adUnitCode: 'test-requestId',
1962
+ bidId: 'test-bidId',
1963
+ mediaTypes: {
1964
+ video: {
1965
+ context: 'instream',
1966
+ mimes: ['video/mpeg'],
1967
+ playerSize: [640, 480],
1968
+ protocols: [5, 6],
1969
+ maxduration: 30,
1970
+ api: [1, 2]
1971
+ }
1972
+ },
1973
+ params: {
1974
+ networkId: 456,
1975
+ },
1976
+ }, {
1977
+ adUnitCode: 'test-requestId',
1978
+ bidId: 'test-bidId2',
1979
+ mediaTypes: {
1980
+ banner: {
1981
+ sizes: [[728, 90]]
1982
+ }
1983
+ },
1984
+ params: {
1985
+ networkId: 456,
1986
+ }
1987
+ }]
1988
+ };
1989
+ const bids = spec.interpretResponse(response, request);
1990
+ expect(bids).to.have.lengthOf(1);
1991
+ expect(bids[0].requestId).to.equal('test-bidId2');
1992
+ expect(bids[0].cpm).to.equal(1.23);
1993
+ expect(bids[0].ad).to.equal('test-ad');
1994
+ expect(bids[0].creativeId).to.equal('test-crId');
1995
+ expect(bids[0].width).to.equal(728);
1996
+ expect(bids[0].height).to.equal(90);
1997
+ expect(bids[0].dealId).to.equal('myDealCode');
1998
+ expect(bids[0].meta.advertiserDomains[0]).to.equal('criteo.com');
1999
+ expect(bids[0].meta.networkName).to.equal('Criteo');
2000
+ });
2001
+
2002
+ it('should properly parse a bid response with a networkId with twin ad unit video win', function () {
2003
+ const response = {
2004
+ body: {
2005
+ slots: [{
2006
+ impid: 'test-requestId',
2007
+ bidId: 'abc123',
2008
+ cpm: 1.23,
2009
+ displayurl: 'http://test-ad',
2010
+ width: 728,
2011
+ height: 90,
2012
+ zoneid: 123,
2013
+ video: true,
2014
+ ext: {
2015
+ meta: {
2016
+ networkName: 'Criteo'
2017
+ }
2018
+ }
2019
+ }],
2020
+ },
2021
+ };
2022
+ const request = {
2023
+ bidRequests: [{
2024
+ adUnitCode: 'test-requestId',
2025
+ bidId: 'test-bidId',
2026
+ mediaTypes: {
2027
+ video: {
2028
+ context: 'instream',
2029
+ mimes: ['video/mpeg'],
2030
+ playerSize: [728, 90],
2031
+ protocols: [5, 6],
2032
+ maxduration: 30,
2033
+ api: [1, 2]
2034
+ }
2035
+ },
2036
+ params: {
2037
+ networkId: 456,
2038
+ },
2039
+ }, {
2040
+ adUnitCode: 'test-requestId',
2041
+ bidId: 'test-bidId2',
2042
+ mediaTypes: {
2043
+ banner: {
2044
+ sizes: [[728, 90]]
2045
+ }
2046
+ },
2047
+ params: {
2048
+ networkId: 456,
2049
+ }
2050
+ }]
2051
+ };
2052
+ const bids = spec.interpretResponse(response, request);
2053
+ expect(bids).to.have.lengthOf(1);
2054
+ expect(bids[0].requestId).to.equal('test-bidId');
2055
+ expect(bids[0].cpm).to.equal(1.23);
2056
+ expect(bids[0].vastUrl).to.equal('http://test-ad');
2057
+ expect(bids[0].mediaType).to.equal(VIDEO);
2058
+ });
2059
+
2060
+ it('should properly parse a bid response with a networkId with twin ad unit native win', function () {
2061
+ const response = {
2062
+ body: {
2063
+ slots: [{
2064
+ impid: 'test-requestId',
2065
+ cpm: 1.23,
2066
+ creative: 'test-ad',
2067
+ creativecode: 'test-crId',
2068
+ width: 728,
2069
+ height: 90,
2070
+ deal: 'myDealCode',
2071
+ adomain: ['criteo.com'],
2072
+ native: {
2073
+ 'products': [{
2074
+ 'sendTargetingKeys': false,
2075
+ 'title': 'Product title',
2076
+ 'description': 'Product desc',
2077
+ 'price': '100',
2078
+ 'click_url': 'https://product.click',
2079
+ 'image': {
2080
+ 'url': 'https://publisherdirect.criteo.com/publishertag/preprodtest/creative.png',
2081
+ 'height': 300,
2082
+ 'width': 300
2083
+ },
2084
+ 'call_to_action': 'Try it now!'
2085
+ }],
2086
+ 'advertiser': {
2087
+ 'description': 'sponsor',
2088
+ 'domain': 'criteo.com',
2089
+ 'logo': { 'url': 'https://www.criteo.com/images/criteo-logo.svg', 'height': 300, 'width': 300 }
2090
+ },
2091
+ 'privacy': {
2092
+ 'optout_click_url': 'https://info.criteo.com/privacy/informations',
2093
+ 'optout_image_url': 'https://static.criteo.net/flash/icon/nai_small.png',
2094
+ },
2095
+ 'impression_pixels': [{ 'url': 'https://my-impression-pixel/test/impression' }, { 'url': 'https://cas.com/lg.com' }]
2096
+ },
2097
+ ext: {
2098
+ meta: {
2099
+ networkName: 'Criteo'
2100
+ }
2101
+ }
2102
+ }],
2103
+ },
2104
+ };
2105
+ const request = {
2106
+ bidRequests: [{
2107
+ adUnitCode: 'test-requestId',
2108
+ bidId: 'test-bidId',
2109
+ mediaTypes: {
2110
+ native: {}
2111
+ },
2112
+ params: {
2113
+ networkId: 456,
2114
+ },
2115
+ }, {
2116
+ adUnitCode: 'test-requestId',
2117
+ bidId: 'test-bidId2',
2118
+ mediaTypes: {
2119
+ banner: {
2120
+ sizes: [[728, 90]]
2121
+ }
2122
+ },
2123
+ params: {
2124
+ networkId: 456,
2125
+ }
2126
+ }]
2127
+ };
2128
+ const bids = spec.interpretResponse(response, request);
2129
+ expect(bids).to.have.lengthOf(1);
2130
+ expect(bids[0].requestId).to.equal('test-bidId');
2131
+ expect(bids[0].cpm).to.equal(1.23);
2132
+ expect(bids[0].mediaType).to.equal(NATIVE);
2133
+ });
2134
+
1907
2135
  it('should properly parse a bid response with a zoneId', function () {
1908
2136
  const response = {
1909
2137
  body: {
@@ -14,6 +14,7 @@ import {
14
14
  } from 'modules/currency.js';
15
15
  import {createBid} from '../../../src/bidfactory.js';
16
16
  import CONSTANTS from '../../../src/constants.json';
17
+ import {server} from '../../mocks/xhr.js';
17
18
 
18
19
  var assert = require('chai').assert;
19
20
  var expect = require('chai').expect;
@@ -30,12 +31,11 @@ describe('currency', function () {
30
31
  }
31
32
 
32
33
  beforeEach(function () {
33
- fakeCurrencyFileServer = sinon.fakeServer.create();
34
+ fakeCurrencyFileServer = server;
34
35
  ready.reset();
35
36
  });
36
37
 
37
38
  afterEach(function () {
38
- fakeCurrencyFileServer.restore();
39
39
  setConfig({});
40
40
  });
41
41
 
@@ -60,7 +60,7 @@ describe('Dmd ID System', function () {
60
60
 
61
61
  it('Should invoke callback with response from API call', function () {
62
62
  const callbackSpy = sinon.spy();
63
- const domain = utils.getWindowLocation()
63
+ const domain = utils.getWindowLocation().href;
64
64
  const callback = dmdIdSubmodule.getId(config).callback;
65
65
  callback(callbackSpy);
66
66
  const request = server.requests[0];
@@ -73,7 +73,7 @@ describe('Dmd ID System', function () {
73
73
 
74
74
  it('Should log error if API response is not valid', function () {
75
75
  const callbackSpy = sinon.spy();
76
- const domain = utils.getWindowLocation()
76
+ const domain = utils.getWindowLocation().href;
77
77
  const callback = dmdIdSubmodule.getId(config).callback;
78
78
  callback(callbackSpy);
79
79
  const request = server.requests[0];
@@ -271,6 +271,39 @@ describe('eids array generation for known sub-modules', function() {
271
271
  });
272
272
  });
273
273
 
274
+ it('index', function() {
275
+ const userId = {
276
+ index: {'id': 'sample_id'}
277
+ };
278
+ const newEids = createEidsArray(userId);
279
+ expect(newEids.length).to.equal(1);
280
+ expect(newEids[0]).to.deep.equal({
281
+ source: 'liveintent.indexexchange.com',
282
+ uids: [{
283
+ id: 'sample_id',
284
+ atype: 3
285
+ }]
286
+ });
287
+ });
288
+
289
+ it('index with ext', function() {
290
+ const userId = {
291
+ index: {'id': 'sample_id', 'ext': {'provider': 'some.provider.com'}}
292
+ };
293
+ const newEids = createEidsArray(userId);
294
+ expect(newEids.length).to.equal(1);
295
+ expect(newEids[0]).to.deep.equal({
296
+ source: 'liveintent.indexexchange.com',
297
+ uids: [{
298
+ id: 'sample_id',
299
+ atype: 3,
300
+ ext: {
301
+ provider: 'some.provider.com'
302
+ }
303
+ }]
304
+ });
305
+ });
306
+
274
307
  it('liveIntentId; getValue call and NO ext', function() {
275
308
  const userId = {
276
309
  lipb: {
@@ -547,6 +580,21 @@ describe('eids array generation for known sub-modules', function() {
547
580
  });
548
581
  });
549
582
 
583
+ it('operaId', function() {
584
+ const userId = {
585
+ operaId: 'some-random-id-value'
586
+ };
587
+ const newEids = createEidsArray(userId);
588
+ expect(newEids.length).to.equal(1);
589
+ expect(newEids[0]).to.deep.equal({
590
+ source: 't.adx.opera.com',
591
+ uids: [{
592
+ id: 'some-random-id-value',
593
+ atype: 1
594
+ }]
595
+ });
596
+ });
597
+
550
598
  it('33acrossId', function() {
551
599
  const userId = {
552
600
  '33acrossId': {
@@ -1,13 +1,9 @@
1
- import {coreStorage, init, setSubmoduleRegistry, requestBidsHook} from 'modules/userId/index.js';
1
+ import {coreStorage, init, setSubmoduleRegistry} from 'modules/userId/index.js';
2
2
  import {config} from 'src/config.js';
3
- import * as utils from 'src/utils.js';
4
- import { euidIdSubmodule } from 'modules/euidIdSystem.js';
3
+ import {euidIdSubmodule} from 'modules/euidIdSystem.js';
5
4
  import 'modules/consentManagement.js';
6
5
  import 'src/prebid.js';
7
- import { getGlobal } from 'src/prebidGlobal.js';
8
- import { server } from 'test/mocks/xhr.js';
9
- import { configureTimerInterceptors } from 'test/mocks/timers.js';
10
- import { cookieHelpers, runAuction, apiHelpers, setGdprApplies } from './uid2IdSystem_helpers.js';
6
+ import {apiHelpers, cookieHelpers, runAuction, setGdprApplies} from './uid2IdSystem_helpers.js';
11
7
  import {hook} from 'src/hook.js';
12
8
  import {uninstall as uninstallGdprEnforcement} from 'modules/gdprEnforcement.js';
13
9
 
@@ -32,12 +28,15 @@ const makePrebidConfig = (params = null, extraSettings = {}, debug = false) => (
32
28
  const apiUrl = 'https://prod.euid.eu/v2/token/refresh';
33
29
  const headers = { 'Content-Type': 'application/json' };
34
30
  const makeSuccessResponseBody = () => btoa(JSON.stringify({ status: 'success', body: { ...apiHelpers.makeTokenResponse(initialToken), advertising_token: refreshedToken } }));
35
- const configureEuidResponse = (httpStatus, response) => server.respondWith('POST', apiUrl, (xhr) => xhr.respond(httpStatus, headers, response));
36
31
  const expectToken = (bid, token) => expect(bid?.userId ?? {}).to.deep.include(makeEuidIdentityContainer(token));
37
32
  const expectNoIdentity = (bid) => expect(bid).to.not.haveOwnProperty('userId');
38
33
 
39
34
  describe('EUID module', function() {
40
35
  let suiteSandbox, testSandbox, timerSpy, fullTestTitle, restoreSubtleToUndefined = false;
36
+ let server;
37
+
38
+ const configureEuidResponse = (httpStatus, response) => server.respondWith('POST', apiUrl, (xhr) => xhr.respond(httpStatus, headers, response));
39
+
41
40
  before(function() {
42
41
  uninstallGdprEnforcement();
43
42
  hook.ready();
@@ -54,10 +53,12 @@ describe('EUID module', function() {
54
53
  if (restoreSubtleToUndefined) window.crypto.subtle = undefined;
55
54
  });
56
55
  beforeEach(function() {
56
+ server = sinon.createFakeServer();
57
57
  init(config);
58
58
  setSubmoduleRegistry([euidIdSubmodule]);
59
59
  });
60
60
  afterEach(function() {
61
+ server.restore();
61
62
  $$PREBID_GLOBAL$$.requestBids.removeAll();
62
63
  config.resetConfig();
63
64
  cookieHelpers.clearCookies(moduleCookieName, publisherCookieName);
@@ -116,7 +117,7 @@ describe('EUID module', function() {
116
117
  const euidToken = apiHelpers.makeTokenResponse(initialToken, true, true);
117
118
  configureEuidResponse(200, makeSuccessResponseBody());
118
119
  config.setConfig(makePrebidConfig({euidToken}));
119
- apiHelpers.respondAfterDelay(1);
120
+ apiHelpers.respondAfterDelay(1, server);
120
121
  const bid = await runAuction();
121
122
  expectToken(bid, refreshedToken);
122
123
  });
@@ -621,7 +621,7 @@ describe('FeedAdAdapter', function () {
621
621
  expect(call.url).to.equal('https://api.feedad.com/1/prebid/web/events');
622
622
  expect(JSON.parse(call.requestBody)).to.deep.equal(expectedData);
623
623
  expect(call.method).to.equal('POST');
624
- expect(call.requestHeaders).to.include({'Content-Type': 'application/json;charset=utf-8'});
624
+ expect(call.requestHeaders).to.include({'Content-Type': 'application/json'});
625
625
  })
626
626
  });
627
627
  });