prebid.js 7.10.0 → 7.13.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 (366) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE.md +16 -10
  2. package/.github/codeql/codeql-config.yml +4 -0
  3. package/.github/workflows/codeql-analysis.yml +73 -0
  4. package/.github/workflows/issue_tracker.yml +1 -1
  5. package/README.md +0 -2
  6. package/babelConfig.js +10 -4
  7. package/dist/33acrossBidAdapter.js +1 -1
  8. package/dist/acuityAdsBidAdapter.js +1 -0
  9. package/dist/adagioBidAdapter.js +1 -1
  10. package/dist/adbookpspBidAdapter.js +1 -1
  11. package/dist/adgenerationBidAdapter.js +1 -1
  12. package/dist/adkernelBidAdapter.js +1 -1
  13. package/dist/adrelevantisBidAdapter.js +1 -1
  14. package/dist/adriverBidAdapter.js +1 -1
  15. package/dist/adriverIdSystem.js +1 -1
  16. package/dist/adtelligentBidAdapter.js +1 -1
  17. package/dist/adtrgtmeBidAdapter.js +1 -0
  18. package/dist/adxcgBidAdapter.js +1 -1
  19. package/dist/adyoulikeBidAdapter.js +1 -1
  20. package/dist/ajaBidAdapter.js +1 -1
  21. package/dist/alkimiBidAdapter.js +1 -1
  22. package/dist/amxBidAdapter.js +1 -1
  23. package/dist/amxIdSystem.js +1 -1
  24. package/dist/aniviewBidAdapter.js +1 -1
  25. package/dist/aolBidAdapter.js +1 -1
  26. package/dist/appierAnalyticsAdapter.js +1 -1
  27. package/dist/appnexusBidAdapter.js +1 -1
  28. package/dist/asoBidAdapter.js +1 -1
  29. package/dist/audiencerunBidAdapter.js +1 -1
  30. package/dist/axonixBidAdapter.js +1 -1
  31. package/dist/beopBidAdapter.js +1 -1
  32. package/dist/betweenBidAdapter.js +1 -1
  33. package/dist/bidglassBidAdapter.js +1 -1
  34. package/dist/bidwatchAnalyticsAdapter.js +1 -1
  35. package/dist/big-richmediaBidAdapter.js +1 -1
  36. package/dist/bluebillywigBidAdapter.js +1 -1
  37. package/dist/brandmetricsRtdProvider.js +1 -1
  38. package/dist/bridgewellBidAdapter.js +1 -1
  39. package/dist/brightMountainMediaBidAdapter.js +1 -1
  40. package/dist/browsiRtdProvider.js +1 -1
  41. package/dist/cleanioRtdProvider.js +1 -1
  42. package/dist/concertBidAdapter.js +1 -1
  43. package/dist/connectadBidAdapter.js +1 -1
  44. package/dist/consentManagement.js +1 -1
  45. package/dist/consentManagementUsp.js +1 -1
  46. package/dist/consumableBidAdapter.js +1 -1
  47. package/dist/conversantBidAdapter.js +1 -1
  48. package/dist/cpmstarBidAdapter.js +1 -1
  49. package/dist/craftBidAdapter.js +1 -1
  50. package/dist/criteoBidAdapter.js +1 -1
  51. package/dist/currency.js +1 -1
  52. package/dist/datawrkzBidAdapter.js +1 -0
  53. package/dist/debugging-standalone.js +1 -1
  54. package/dist/dfpAdServerVideo.js +1 -1
  55. package/dist/dgkeywordRtdProvider.js +1 -1
  56. package/dist/displayioBidAdapter.js +1 -3
  57. package/dist/dspxBidAdapter.js +1 -1
  58. package/dist/enrichmentFpdModule.js +1 -1
  59. package/dist/eplanningBidAdapter.js +1 -1
  60. package/dist/finativeBidAdapter.js +1 -1
  61. package/dist/glimpseBidAdapter.js +1 -1
  62. package/dist/gmosspBidAdapter.js +1 -1
  63. package/dist/goldbachBidAdapter.js +1 -1
  64. package/dist/gridBidAdapter.js +1 -1
  65. package/dist/gridNMBidAdapter.js +1 -1
  66. package/dist/gumgumBidAdapter.js +1 -1
  67. package/dist/h12mediaBidAdapter.js +1 -1
  68. package/dist/id5IdSystem.js +1 -1
  69. package/dist/imRtdProvider.js +1 -1
  70. package/dist/impactifyBidAdapter.js +1 -1
  71. package/dist/improvedigitalBidAdapter.js +1 -1
  72. package/dist/inmarBidAdapter.js +1 -1
  73. package/dist/insticatorBidAdapter.js +1 -1
  74. package/dist/ixBidAdapter.js +1 -1
  75. package/dist/jixieBidAdapter.js +1 -1
  76. package/dist/justpremiumBidAdapter.js +1 -1
  77. package/dist/kargoBidAdapter.js +1 -1
  78. package/dist/konduitAnalyticsAdapter.js +1 -1
  79. package/dist/kueezBidAdapter.js +1 -1
  80. package/dist/lassoBidAdapter.js +1 -1
  81. package/dist/lifestreetBidAdapter.js +1 -0
  82. package/dist/limelightDigitalBidAdapter.js +1 -1
  83. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  84. package/dist/logicadBidAdapter.js +1 -1
  85. package/dist/loglyliftBidAdapter.js +1 -1
  86. package/dist/mabidderBidAdapter.js +1 -0
  87. package/dist/malltvAnalyticsAdapter.js +1 -1
  88. package/dist/marsmediaBidAdapter.js +1 -1
  89. package/dist/mediafuseBidAdapter.js +1 -1
  90. package/dist/mediagoBidAdapter.js +1 -0
  91. package/dist/mediakeysBidAdapter.js +1 -1
  92. package/dist/mediasquareBidAdapter.js +1 -1
  93. package/dist/mgidBidAdapter.js +1 -1
  94. package/dist/minutemediaBidAdapter.js +1 -1
  95. package/dist/nextMillenniumBidAdapter.js +1 -1
  96. package/dist/not-for-prod/prebid.js +153 -147
  97. package/dist/oguryBidAdapter.js +1 -1
  98. package/dist/oneKeyIdSystem.js +1 -0
  99. package/dist/oneKeyRtdProvider.js +1 -0
  100. package/dist/onetagBidAdapter.js +1 -1
  101. package/dist/ooloAnalyticsAdapter.js +1 -1
  102. package/dist/openxAnalyticsAdapter.js +1 -1
  103. package/dist/outbrainBidAdapter.js +1 -1
  104. package/dist/parrableIdSystem.js +1 -1
  105. package/dist/permutiveRtdProvider.js +1 -1
  106. package/dist/pixfutureBidAdapter.js +1 -1
  107. package/dist/prebid-core.js +2 -2
  108. package/dist/publinkIdSystem.js +1 -1
  109. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  110. package/dist/pubmaticBidAdapter.js +1 -1
  111. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  112. package/dist/pxyzBidAdapter.js +1 -1
  113. package/dist/quantcastBidAdapter.js +1 -1
  114. package/dist/rasBidAdapter.js +1 -1
  115. package/dist/readpeakBidAdapter.js +1 -1
  116. package/dist/relaidoBidAdapter.js +1 -1
  117. package/dist/rhythmoneBidAdapter.js +1 -1
  118. package/dist/riseBidAdapter.js +1 -1
  119. package/dist/rtbhouseBidAdapter.js +1 -1
  120. package/dist/rubiconAnalyticsAdapter.js +1 -1
  121. package/dist/rubiconBidAdapter.js +1 -1
  122. package/dist/seedingAllianceBidAdapter.js +1 -1
  123. package/dist/seedtagBidAdapter.js +1 -1
  124. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  125. package/dist/sharethroughBidAdapter.js +1 -1
  126. package/dist/shinezBidAdapter.js +1 -1
  127. package/dist/smaatoBidAdapter.js +1 -1
  128. package/dist/smartadserverBidAdapter.js +1 -1
  129. package/dist/smartxBidAdapter.js +1 -1
  130. package/dist/smilewantedBidAdapter.js +1 -1
  131. package/dist/sonobiBidAdapter.js +1 -1
  132. package/dist/sovrnAnalyticsAdapter.js +1 -1
  133. package/dist/sovrnBidAdapter.js +1 -1
  134. package/dist/sspBCBidAdapter.js +1 -1
  135. package/dist/sublimeBidAdapter.js +1 -1
  136. package/dist/synacormediaBidAdapter.js +1 -1
  137. package/dist/tappxBidAdapter.js +1 -1
  138. package/dist/targetVideoBidAdapter.js +1 -1
  139. package/dist/teadsBidAdapter.js +1 -1
  140. package/dist/trionBidAdapter.js +1 -1
  141. package/dist/tripleliftBidAdapter.js +1 -1
  142. package/dist/trustpidSystem.js +1 -1
  143. package/dist/ttdBidAdapter.js +1 -1
  144. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  145. package/dist/underdogmediaBidAdapter.js +1 -1
  146. package/dist/undertoneBidAdapter.js +1 -1
  147. package/dist/userId.js +1 -1
  148. package/dist/vidazooBidAdapter.js +1 -1
  149. package/dist/videobyteBidAdapter.js +1 -1
  150. package/dist/viewability.js +1 -1
  151. package/dist/visxBidAdapter.js +1 -1
  152. package/dist/vuukleBidAdapter.js +1 -1
  153. package/dist/widespaceBidAdapter.js +1 -1
  154. package/dist/winrBidAdapter.js +1 -1
  155. package/dist/yahoosspBidAdapter.js +1 -1
  156. package/dist/yieldmoBidAdapter.js +1 -1
  157. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  158. package/dist/zeta_global_sspBidAdapter.js +1 -1
  159. package/integrationExamples/gpt/permutiveRtdProvider_example.html +1 -1
  160. package/karma.conf.maker.js +2 -13
  161. package/modules/.submodules.json +2 -0
  162. package/modules/acuityAdsBidAdapter.js +207 -0
  163. package/modules/acuityAdsBidAdapter.md +79 -0
  164. package/modules/adagioBidAdapter.js +2 -3
  165. package/modules/adgenerationBidAdapter.js +2 -2
  166. package/modules/adkernelBidAdapter.js +28 -12
  167. package/modules/admixerBidAdapter.js +1 -1
  168. package/modules/adnowBidAdapter.js +1 -1
  169. package/modules/adpod.js +1 -1
  170. package/modules/adrelevantisBidAdapter.js +2 -2
  171. package/modules/adriverBidAdapter.js +5 -12
  172. package/modules/adriverIdSystem.js +2 -1
  173. package/modules/adtargetBidAdapter.js +1 -1
  174. package/modules/adtelligentBidAdapter.js +6 -2
  175. package/modules/adtrgtmeBidAdapter.js +333 -0
  176. package/modules/adtrgtmeBidAdapter.md +69 -0
  177. package/modules/adtrueBidAdapter.js +1 -1
  178. package/modules/adxpremiumAnalyticsAdapter.js +1 -1
  179. package/modules/adyoulikeBidAdapter.js +1 -1
  180. package/modules/alkimiBidAdapter.js +2 -1
  181. package/modules/aniviewBidAdapter.js +1 -1
  182. package/modules/appnexusBidAdapter.js +13 -93
  183. package/modules/apstreamBidAdapter.js +2 -2
  184. package/modules/beopBidAdapter.js +4 -4
  185. package/modules/betweenBidAdapter.js +4 -4
  186. package/modules/bidwatchAnalyticsAdapter.js +112 -59
  187. package/modules/bizzclickBidAdapter.js +1 -1
  188. package/modules/brightMountainMediaBidAdapter.js +1 -1
  189. package/modules/browsiRtdProvider.js +24 -10
  190. package/modules/cleanmedianetBidAdapter.js +1 -1
  191. package/modules/consentManagement.js +1 -1
  192. package/modules/consentManagementUsp.js +1 -1
  193. package/modules/consumableBidAdapter.js +43 -3
  194. package/modules/cpmstarBidAdapter.js +23 -13
  195. package/modules/criteoBidAdapter.js +19 -13
  196. package/modules/currency.js +1 -0
  197. package/modules/cwireBidAdapter.js +1 -1
  198. package/modules/datablocksBidAdapter.js +1 -1
  199. package/modules/datawrkzBidAdapter.js +633 -0
  200. package/modules/datawrkzBidAdapter.md +160 -0
  201. package/modules/dfpAdServerVideo.js +2 -2
  202. package/modules/dgkeywordRtdProvider.js +10 -1
  203. package/modules/displayioBidAdapter.js +92 -97
  204. package/modules/dspxBidAdapter.js +1 -1
  205. package/modules/e_volutionBidAdapter.js +3 -3
  206. package/modules/ebdrBidAdapter.js +1 -1
  207. package/modules/emx_digitalBidAdapter.js +1 -1
  208. package/modules/enrichmentFpdModule.js +11 -0
  209. package/modules/fabrickIdSystem.js +2 -2
  210. package/modules/gamoshiBidAdapter.js +1 -1
  211. package/modules/getintentBidAdapter.js +1 -1
  212. package/modules/gjirafaBidAdapter.js +2 -2
  213. package/modules/goldbachBidAdapter.js +8 -8
  214. package/modules/gothamadsBidAdapter.js +2 -2
  215. package/modules/gumgumBidAdapter.js +3 -3
  216. package/modules/h12mediaBidAdapter.js +1 -1
  217. package/modules/id5AnalyticsAdapter.js +1 -1
  218. package/modules/id5IdSystem.js +160 -111
  219. package/modules/id5IdSystem.md +16 -14
  220. package/modules/imRtdProvider.js +20 -7
  221. package/modules/imRtdProvider.md +3 -1
  222. package/modules/impactifyBidAdapter.js +1 -1
  223. package/modules/improvedigitalBidAdapter.js +50 -28
  224. package/modules/inskinBidAdapter.js +1 -1
  225. package/modules/insticatorBidAdapter.js +1 -1
  226. package/modules/integr8BidAdapter.js +2 -2
  227. package/modules/intentIqIdSystem.js +2 -2
  228. package/modules/interactiveOffersBidAdapter.js +1 -1
  229. package/modules/iqmBidAdapter.js +1 -1
  230. package/modules/ixBidAdapter.js +21 -328
  231. package/modules/ixBidAdapter.md +1 -19
  232. package/modules/kargoBidAdapter.js +4 -5
  233. package/modules/krushmediaBidAdapter.js +2 -2
  234. package/modules/lassoBidAdapter.js +3 -3
  235. package/modules/lifestreetBidAdapter.js +143 -0
  236. package/modules/limelightDigitalBidAdapter.js +2 -1
  237. package/modules/livewrappedAnalyticsAdapter.js +3 -3
  238. package/modules/lkqdBidAdapter.js +3 -3
  239. package/modules/loganBidAdapter.js +2 -2
  240. package/modules/luponmediaBidAdapter.js +3 -3
  241. package/modules/mabidderBidAdapter.js +60 -0
  242. package/modules/mabidderBidAdapter.md +31 -0
  243. package/modules/malltvBidAdapter.js +2 -2
  244. package/modules/mediagoBidAdapter.js +462 -0
  245. package/modules/mediagoBidAdapter.md +34 -0
  246. package/modules/mediakeysBidAdapter.js +2 -2
  247. package/modules/mgidBidAdapter.js +2 -2
  248. package/modules/nextMillenniumBidAdapter.js +25 -6
  249. package/modules/nobidBidAdapter.js +2 -2
  250. package/modules/novatiqIdSystem.js +1 -1
  251. package/modules/oneKeyIdSystem.js +78 -0
  252. package/modules/oneKeyIdSystem.md +109 -0
  253. package/modules/oneKeyRtdProvider.js +98 -0
  254. package/modules/oneKeyRtdProvider.md +127 -0
  255. package/modules/open8BidAdapter.js +1 -1
  256. package/modules/openwebBidAdapter.js +1 -1
  257. package/modules/openxAnalyticsAdapter.js +5 -744
  258. package/modules/openxAnalyticsAdapter.md +4 -0
  259. package/modules/openxBidAdapter.js +3 -3
  260. package/modules/permutiveRtdProvider.js +55 -8
  261. package/modules/pixfutureBidAdapter.js +1 -1
  262. package/modules/prebidmanagerAnalyticsAdapter.js +1 -1
  263. package/modules/priceFloors.js +1 -1
  264. package/modules/pubmaticAnalyticsAdapter.js +1 -1
  265. package/modules/pubmaticBidAdapter.js +19 -1
  266. package/modules/pubwiseAnalyticsAdapter.js +1 -1
  267. package/modules/pubwiseBidAdapter.js +3 -3
  268. package/modules/pubxBidAdapter.js +1 -1
  269. package/modules/pubxaiAnalyticsAdapter.js +2 -2
  270. package/modules/quantcastIdSystem.js +1 -1
  271. package/modules/radsBidAdapter.js +1 -1
  272. package/modules/rasBidAdapter.js +8 -0
  273. package/modules/rasBidAdapter.md +14 -13
  274. package/modules/revcontentBidAdapter.js +1 -1
  275. package/modules/richaudienceBidAdapter.js +1 -1
  276. package/modules/rtbhouseBidAdapter.js +25 -1
  277. package/modules/schain.js +1 -1
  278. package/modules/seedtagBidAdapter.md +25 -56
  279. package/modules/showheroes-bsBidAdapter.js +1 -1
  280. package/modules/sizeMappingV2.js +1 -1
  281. package/modules/smaatoBidAdapter.js +2 -2
  282. package/modules/sonobiAnalyticsAdapter.js +1 -1
  283. package/modules/sonobiBidAdapter.js +4 -3
  284. package/modules/staqAnalyticsAdapter.js +1 -1
  285. package/modules/tappxBidAdapter.js +11 -2
  286. package/modules/targetVideoBidAdapter.js +1 -1
  287. package/modules/theAdxBidAdapter.js +2 -2
  288. package/modules/tpmnBidAdapter.js +1 -1
  289. package/modules/trionBidAdapter.js +2 -2
  290. package/modules/tripleliftBidAdapter.js +20 -1
  291. package/modules/trustpidSystem.js +6 -42
  292. package/modules/trustpidSystem.md +10 -10
  293. package/modules/underdogmediaBidAdapter.js +1 -1
  294. package/modules/userId/eids.js +26 -0
  295. package/modules/userId/userId.md +2 -2
  296. package/modules/vdoaiBidAdapter.js +1 -1
  297. package/modules/vidazooBidAdapter.js +7 -5
  298. package/modules/vidoomyBidAdapter.js +1 -1
  299. package/modules/viewability.js +14 -14
  300. package/modules/winrBidAdapter.js +1 -1
  301. package/modules/yahoosspBidAdapter.js +3 -3
  302. package/modules/yandexBidAdapter.js +1 -1
  303. package/modules/yieldmoBidAdapter.js +3 -3
  304. package/modules/yieldoneBidAdapter.js +2 -2
  305. package/modules/zeta_global_sspBidAdapter.js +24 -21
  306. package/package.json +3 -3
  307. package/src/Renderer.js +1 -1
  308. package/src/adloader.js +2 -1
  309. package/src/adserver.js +0 -56
  310. package/src/auction.js +60 -16
  311. package/src/bidfactory.js +1 -1
  312. package/src/native.js +75 -60
  313. package/src/refererDetection.js +12 -1
  314. package/src/sizeMapping.js +5 -7
  315. package/src/targeting.js +1 -1
  316. package/src/userSync.js +1 -1
  317. package/src/utils/promise.js +3 -1
  318. package/src/utils.js +27 -0
  319. package/src/video.js +5 -4
  320. package/src/videoCache.js +8 -2
  321. package/test/pages/instream.html +2 -2
  322. package/test/spec/modules/acuityAdsBidAdapter_spec.js +398 -0
  323. package/test/spec/modules/adagioBidAdapter_spec.js +2 -0
  324. package/test/spec/modules/adkernelBidAdapter_spec.js +11 -2
  325. package/test/spec/modules/adriverBidAdapter_spec.js +6 -13
  326. package/test/spec/modules/adriverIdSystem_spec.js +3 -8
  327. package/test/spec/modules/adtelligentBidAdapter_spec.js +2 -0
  328. package/test/spec/modules/adtrgtmeBidAdapter_spec.js +802 -0
  329. package/test/spec/modules/alkimiBidAdapter_spec.js +2 -1
  330. package/test/spec/modules/appnexusBidAdapter_spec.js +1 -0
  331. package/test/spec/modules/beopBidAdapter_spec.js +11 -0
  332. package/test/spec/modules/betweenBidAdapter_spec.js +17 -0
  333. package/test/spec/modules/bidwatchAnalyticsAdapter_spec.js +28 -12
  334. package/test/spec/modules/big-richmediaBidAdapter_spec.js +1 -0
  335. package/test/spec/modules/browsiRtdProvider_spec.js +40 -1
  336. package/test/spec/modules/consumableBidAdapter_spec.js +158 -0
  337. package/test/spec/modules/cpmstarBidAdapter_spec.js +1 -1
  338. package/test/spec/modules/criteoBidAdapter_spec.js +35 -26
  339. package/test/spec/modules/currency_spec.js +22 -0
  340. package/test/spec/modules/datawrkzBidAdapter_spec.js +656 -0
  341. package/test/spec/modules/dgkeywordRtdProvider_spec.js +1 -1
  342. package/test/spec/modules/displayioBidAdapter_spec.js +16 -52
  343. package/test/spec/modules/enrichmentFpdModule_spec.js +16 -1
  344. package/test/spec/modules/fpdModule_spec.js +2 -1
  345. package/test/spec/modules/id5IdSystem_spec.js +529 -172
  346. package/test/spec/modules/imRtdProvider_spec.js +10 -5
  347. package/test/spec/modules/improvedigitalBidAdapter_spec.js +9 -13
  348. package/test/spec/modules/ixBidAdapter_spec.js +216 -123
  349. package/test/spec/modules/kargoBidAdapter_spec.js +11 -2
  350. package/test/spec/modules/lifestreetBidAdapter_spec.js +232 -0
  351. package/test/spec/modules/limelightDigitalBidAdapter_spec.js +59 -7
  352. package/test/spec/modules/mabidderBidAdapter_spec.js +125 -0
  353. package/test/spec/modules/mediagoBidAdapter_spec.js +97 -0
  354. package/test/spec/modules/nextMillenniumBidAdapter_spec.js +2 -7
  355. package/test/spec/modules/oneKeyIdSystem_spec.js +107 -0
  356. package/test/spec/modules/oneKeyRtdProvider_spec.js +152 -0
  357. package/test/spec/modules/openxAnalyticsAdapter_spec.js +6 -638
  358. package/test/spec/modules/permutiveRtdProvider_spec.js +152 -2
  359. package/test/spec/modules/pubmaticBidAdapter_spec.js +69 -4
  360. package/test/spec/modules/rasBidAdapter_spec.js +2 -0
  361. package/test/spec/modules/tripleliftBidAdapter_spec.js +18 -0
  362. package/test/spec/modules/trustpidSystem_spec.js +27 -45
  363. package/test/spec/modules/vidazooBidAdapter_spec.js +36 -23
  364. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +59 -0
  365. package/test/spec/native_spec.js +257 -2
  366. package/test/spec/videoCache_spec.js +37 -7
@@ -27,7 +27,8 @@ describe('imRtdProvider', function () {
27
27
  const moduleConfig = {
28
28
  params: {
29
29
  cid: 5126,
30
- setGptKeyValues: true
30
+ setGptKeyValues: true,
31
+ maxSegments: 2
31
32
  }
32
33
  }
33
34
 
@@ -60,11 +61,11 @@ describe('imRtdProvider', function () {
60
61
 
61
62
  it(`should return bid with correct key data: ${bidderName}`, function () {
62
63
  const bid = {bidder: bidderName};
63
- expect(getBidderFunction(bidderName)(bid, {'im_segments': ['12345', '67890']})).to.equal(bid);
64
+ expect(getBidderFunction(bidderName)(bid, {'im_segments': ['12345', '67890']}, {params: {}})).to.equal(bid);
64
65
  });
65
66
  it(`should return bid without data: ${bidderName}`, function () {
66
67
  const bid = {bidder: bidderName};
67
- expect(getBidderFunction(bidderName)(bid, '')).to.equal(bid);
68
+ expect(getBidderFunction(bidderName)(bid, '', {params: {}})).to.equal(bid);
68
69
  });
69
70
  });
70
71
  it(`should return null with unexpected bidder`, function () {
@@ -73,7 +74,7 @@ describe('imRtdProvider', function () {
73
74
  describe('fluct bidder function', function () {
74
75
  it('should return a bid w/o im_segments if not any exists', function () {
75
76
  const bid = {bidder: 'fluct'};
76
- expect(getBidderFunction('fluct')(bid, '')).to.eql(bid);
77
+ expect(getBidderFunction('fluct')(bid, '', {params: {}})).to.eql(bid);
77
78
  });
78
79
  it('should return a bid w/ im_segments if any exists', function () {
79
80
  const bid = {
@@ -84,7 +85,11 @@ describe('imRtdProvider', function () {
84
85
  }
85
86
  }
86
87
  };
87
- expect(getBidderFunction('fluct')(bid, {im_segments: ['12345', '67890']}))
88
+ expect(getBidderFunction('fluct')(
89
+ bid,
90
+ {im_segments: ['12345', '67890', '09876']},
91
+ {params: {maxSegments: 2}}
92
+ ))
88
93
  .to.eql(
89
94
  {
90
95
  bidder: 'fluct',
@@ -1031,7 +1031,7 @@ describe('Improve Digital Adapter Tests', function () {
1031
1031
  width: 728,
1032
1032
  height: 90,
1033
1033
  ttl: 300,
1034
- ad: '<html><body style="margin:0%"><a href="https://na-ice.360yield.com/click/wIUgWAXQ-Teg9bFreqmjvvwpXD86tInZbesBQgOtGBHqZatmIY9C1mo-1kWRx32zN2mfOxtmyaaHpr.Qh5pspzJarrsm08TtkRSeTc2mnsRuQ2MKzCTvbospesMJR28YLZ.3g06DwS6c5XOJuesd0eODk7GCqtmJ18c6CTmdWDUdDxiknLAPHVXAfvlDH5AA9utF7TNNGjaxvyMpQD51.Dt5GFjcJLnwWnGSajoSr9JfomoGenbLkabLmzylSXd1p9xyrzTmWU39FvagEOZnMb2ixlc.JDxXA1ZnaR.e7ywkwiJnDtg1Om0EJAYOmUh0oTozbXeo26iwLLZxVxV0owOHY61zhHYyHcpBakqtelYPWZcmBJEXfl5KIekB2CiLQqxCi3TKdg5FztAQY0Tf3mTmiGZev0RkeiX5fnxS8jbWSD-cCgB51PNLn0X5EEkUPkOJh9JV713OOcyDhsgaFPezUcvuD7nNrxB71aWcH6MMfk1BFQ7kSVi9WHQvauaTxrWm//https%3A%2F%2Fazerion.com" target="_blank"><img style="border: 0;" border="0" width=728 height=90 src="https://creative.360yield.com/file/241121/728x90.jpg" alt=" "/></a><img src="https://na-ice.360yield.com/imp_pixel?ic=wIUgWDjQ.pQrjtYOEKs44M3pIqNnfojBPkSd3WRdHnRawHiRiER7A-0RowzsOtOLq7MWtEFnWsRXYZZmJcZPGft0cNSs8lNOVZnXWHLDv3Dyqo8VGI4737RieGIK0DrIjlVXzFmuYeXufriRfPHVGiV-hz6VIateQ6I7.xR5O.48..ZoEGfRpIJGzqeqz12cWnFUPhBScQ6sPLlb6B1RiTpNh170OhIVfX80N2g4jn-U.xJ262ND29bBvImQsJjz29o8mmGL3TfbzUHzr.ob-ozfP9.ZHh.B5tD-M5qG9rAlIU6Q7I-zchnhv1W5OzU5mfMYy9yMLKqBemQGJA1KaiZJV79lwnDki-6PIg1v09h86eJqXYHHsUobx4Np5lMT6-5UdHXZPpR8T08b4keLREQw-lpqKum92pwUCVAYPeFdmTeKk1gUKPcaWxN8QfaQeoLJfb.88n3-vp.-aBCkxlZwXjXSd55QV.uwi-bTtFwaZjGHpNkIBG3D19kNl.Yb55Rk" alt=" " style="display:none"/><improvedigital_ad_output_information tp_id="" buyer_id="0" rtb_advertiser="" campaign_id="123159" line_item_id="320896" creative_id="510265" crid="0" placement_id="22135702"></improvedigital_ad_output_information></body></html>',
1034
+ ad: '<html><body style="margin:0%"><script>window.__razr_config = {"prebid":{"bidRequest":{"bidder":"improvedigital","params":{"placementId":1053688,"keyValues":{"testKey":["testValue"]},"bidFloor":0.05,"bidFloorCur":"eUR","size":{"w":800,"h":600}},"adUnitCode":"div-gpt-ad-1499748733608-0","transactionId":"f183e871-fbed-45f0-a427-c8a63c4c01eb","bidId":"33e9500b21129f","bidderRequestId":"2772c1e566670b","auctionId":"192721e36a0239","mediaTypes":{"banner":{"sizes":[[300,250],[160,600]]}},"sizes":[[300,250],[160,600]]},"bid":{"requestId":"33e9500b21129f","cpm":1.9200543539802946,"creativeId":"510265","currency":"EUR","dealId":320896,"meta":{"advertiserDomains":[]},"netRevenue":false,"ttl":300,"mediaType":"banner","ad":"<html><body style=\\"margin:0%\\"><a href=\\"https://na-ice.360yield.com/click/wIUgWAXQ-Teg9bFreqmjvvwpXD86tInZbesBQgOtGBHqZatmIY9C1mo-1kWRx32zN2mfOxtmyaaHpr.Qh5pspzJarrsm08TtkRSeTc2mnsRuQ2MKzCTvbospesMJR28YLZ.3g06DwS6c5XOJuesd0eODk7GCqtmJ18c6CTmdWDUdDxiknLAPHVXAfvlDH5AA9utF7TNNGjaxvyMpQD51.Dt5GFjcJLnwWnGSajoSr9JfomoGenbLkabLmzylSXd1p9xyrzTmWU39FvagEOZnMb2ixlc.JDxXA1ZnaR.e7ywkwiJnDtg1Om0EJAYOmUh0oTozbXeo26iwLLZxVxV0owOHY61zhHYyHcpBakqtelYPWZcmBJEXfl5KIekB2CiLQqxCi3TKdg5FztAQY0Tf3mTmiGZev0RkeiX5fnxS8jbWSD-cCgB51PNLn0X5EEkUPkOJh9JV713OOcyDhsgaFPezUcvuD7nNrxB71aWcH6MMfk1BFQ7kSVi9WHQvauaTxrWm//https%3A%2F%2Fazerion.com\\" target=\\"_blank\\"><img style=\\"border: 0;\\" border=\\"0\\" width=728 height=90 src=\\"https://creative.360yield.com/file/241121/728x90.jpg\\" alt=\\" \\"/></a><img src=\\"https://na-ice.360yield.com/imp_pixel?ic=wIUgWDjQ.pQrjtYOEKs44M3pIqNnfojBPkSd3WRdHnRawHiRiER7A-0RowzsOtOLq7MWtEFnWsRXYZZmJcZPGft0cNSs8lNOVZnXWHLDv3Dyqo8VGI4737RieGIK0DrIjlVXzFmuYeXufriRfPHVGiV-hz6VIateQ6I7.xR5O.48..ZoEGfRpIJGzqeqz12cWnFUPhBScQ6sPLlb6B1RiTpNh170OhIVfX80N2g4jn-U.xJ262ND29bBvImQsJjz29o8mmGL3TfbzUHzr.ob-ozfP9.ZHh.B5tD-M5qG9rAlIU6Q7I-zchnhv1W5OzU5mfMYy9yMLKqBemQGJA1KaiZJV79lwnDki-6PIg1v09h86eJqXYHHsUobx4Np5lMT6-5UdHXZPpR8T08b4keLREQw-lpqKum92pwUCVAYPeFdmTeKk1gUKPcaWxN8QfaQeoLJfb.88n3-vp.-aBCkxlZwXjXSd55QV.uwi-bTtFwaZjGHpNkIBG3D19kNl.Yb55Rk\\" alt=\\" \\" style=\\"display:none\\"/><improvedigital_ad_output_information tp_id=\\"\\" buyer_id=\\"0\\" rtb_advertiser=\\"\\" campaign_id=\\"123159\\" line_item_id=\\"320896\\" creative_id=\\"510265\\" crid=\\"0\\" placement_id=\\"22135702\\"></improvedigital_ad_output_information></body></html>","width":728,"height":90}}};</script><a href="https://na-ice.360yield.com/click/wIUgWAXQ-Teg9bFreqmjvvwpXD86tInZbesBQgOtGBHqZatmIY9C1mo-1kWRx32zN2mfOxtmyaaHpr.Qh5pspzJarrsm08TtkRSeTc2mnsRuQ2MKzCTvbospesMJR28YLZ.3g06DwS6c5XOJuesd0eODk7GCqtmJ18c6CTmdWDUdDxiknLAPHVXAfvlDH5AA9utF7TNNGjaxvyMpQD51.Dt5GFjcJLnwWnGSajoSr9JfomoGenbLkabLmzylSXd1p9xyrzTmWU39FvagEOZnMb2ixlc.JDxXA1ZnaR.e7ywkwiJnDtg1Om0EJAYOmUh0oTozbXeo26iwLLZxVxV0owOHY61zhHYyHcpBakqtelYPWZcmBJEXfl5KIekB2CiLQqxCi3TKdg5FztAQY0Tf3mTmiGZev0RkeiX5fnxS8jbWSD-cCgB51PNLn0X5EEkUPkOJh9JV713OOcyDhsgaFPezUcvuD7nNrxB71aWcH6MMfk1BFQ7kSVi9WHQvauaTxrWm//https%3A%2F%2Fazerion.com" target="_blank"><img style="border: 0;" border="0" width=728 height=90 src="https://creative.360yield.com/file/241121/728x90.jpg" alt=" "/></a><img src="https://na-ice.360yield.com/imp_pixel?ic=wIUgWDjQ.pQrjtYOEKs44M3pIqNnfojBPkSd3WRdHnRawHiRiER7A-0RowzsOtOLq7MWtEFnWsRXYZZmJcZPGft0cNSs8lNOVZnXWHLDv3Dyqo8VGI4737RieGIK0DrIjlVXzFmuYeXufriRfPHVGiV-hz6VIateQ6I7.xR5O.48..ZoEGfRpIJGzqeqz12cWnFUPhBScQ6sPLlb6B1RiTpNh170OhIVfX80N2g4jn-U.xJ262ND29bBvImQsJjz29o8mmGL3TfbzUHzr.ob-ozfP9.ZHh.B5tD-M5qG9rAlIU6Q7I-zchnhv1W5OzU5mfMYy9yMLKqBemQGJA1KaiZJV79lwnDki-6PIg1v09h86eJqXYHHsUobx4Np5lMT6-5UdHXZPpR8T08b4keLREQw-lpqKum92pwUCVAYPeFdmTeKk1gUKPcaWxN8QfaQeoLJfb.88n3-vp.-aBCkxlZwXjXSd55QV.uwi-bTtFwaZjGHpNkIBG3D19kNl.Yb55Rk" alt=" " style="display:none"/><improvedigital_ad_output_information tp_id="" buyer_id="0" rtb_advertiser="" campaign_id="123159" line_item_id="320896" creative_id="510265" crid="0" placement_id="22135702"></improvedigital_ad_output_information></body></html>',
1035
1035
  creativeId: '510265',
1036
1036
  dealId: 320896,
1037
1037
  netRevenue: false,
@@ -1042,6 +1042,12 @@ describe('Improve Digital Adapter Tests', function () {
1042
1042
  }
1043
1043
  ];
1044
1044
 
1045
+ const multiFormatExpectedBid = [
1046
+ Object.assign({}, expectedBid[0], {
1047
+ ad: '<html><body style="margin:0%"><script>window.__razr_config = {"prebid":{"bidRequest":{"bidder":"improvedigital","params":{"placementId":1053688},"adUnitCode":"div-gpt-ad-1499748733608-0","transactionId":"f183e871-fbed-45f0-a427-c8a63c4c01eb","bidId":"33e9500b21129f","bidderRequestId":"2772c1e566670b","auctionId":"192721e36a0239","mediaTypes":{"banner":{"sizes":[[300,250],[160,600]]},"native":{},"video":{"context":"outstream","playerSize":[640,480]}},"sizes":[[300,250],[160,600]],"nativeParams":{"body":{"required":true}}},"bid":{"requestId":"33e9500b21129f","cpm":1.9200543539802946,"creativeId":"510265","currency":"EUR","dealId":320896,"meta":{"advertiserDomains":[]},"netRevenue":false,"ttl":300,"mediaType":"banner","ad":"<html><body style=\\"margin:0%\\"><a href=\\"https://na-ice.360yield.com/click/wIUgWAXQ-Teg9bFreqmjvvwpXD86tInZbesBQgOtGBHqZatmIY9C1mo-1kWRx32zN2mfOxtmyaaHpr.Qh5pspzJarrsm08TtkRSeTc2mnsRuQ2MKzCTvbospesMJR28YLZ.3g06DwS6c5XOJuesd0eODk7GCqtmJ18c6CTmdWDUdDxiknLAPHVXAfvlDH5AA9utF7TNNGjaxvyMpQD51.Dt5GFjcJLnwWnGSajoSr9JfomoGenbLkabLmzylSXd1p9xyrzTmWU39FvagEOZnMb2ixlc.JDxXA1ZnaR.e7ywkwiJnDtg1Om0EJAYOmUh0oTozbXeo26iwLLZxVxV0owOHY61zhHYyHcpBakqtelYPWZcmBJEXfl5KIekB2CiLQqxCi3TKdg5FztAQY0Tf3mTmiGZev0RkeiX5fnxS8jbWSD-cCgB51PNLn0X5EEkUPkOJh9JV713OOcyDhsgaFPezUcvuD7nNrxB71aWcH6MMfk1BFQ7kSVi9WHQvauaTxrWm//https%3A%2F%2Fazerion.com\\" target=\\"_blank\\"><img style=\\"border: 0;\\" border=\\"0\\" width=728 height=90 src=\\"https://creative.360yield.com/file/241121/728x90.jpg\\" alt=\\" \\"/></a><img src=\\"https://na-ice.360yield.com/imp_pixel?ic=wIUgWDjQ.pQrjtYOEKs44M3pIqNnfojBPkSd3WRdHnRawHiRiER7A-0RowzsOtOLq7MWtEFnWsRXYZZmJcZPGft0cNSs8lNOVZnXWHLDv3Dyqo8VGI4737RieGIK0DrIjlVXzFmuYeXufriRfPHVGiV-hz6VIateQ6I7.xR5O.48..ZoEGfRpIJGzqeqz12cWnFUPhBScQ6sPLlb6B1RiTpNh170OhIVfX80N2g4jn-U.xJ262ND29bBvImQsJjz29o8mmGL3TfbzUHzr.ob-ozfP9.ZHh.B5tD-M5qG9rAlIU6Q7I-zchnhv1W5OzU5mfMYy9yMLKqBemQGJA1KaiZJV79lwnDki-6PIg1v09h86eJqXYHHsUobx4Np5lMT6-5UdHXZPpR8T08b4keLREQw-lpqKum92pwUCVAYPeFdmTeKk1gUKPcaWxN8QfaQeoLJfb.88n3-vp.-aBCkxlZwXjXSd55QV.uwi-bTtFwaZjGHpNkIBG3D19kNl.Yb55Rk\\" alt=\\" \\" style=\\"display:none\\"/><improvedigital_ad_output_information tp_id=\\"\\" buyer_id=\\"0\\" rtb_advertiser=\\"\\" campaign_id=\\"123159\\" line_item_id=\\"320896\\" creative_id=\\"510265\\" crid=\\"0\\" placement_id=\\"22135702\\"></improvedigital_ad_output_information></body></html>","width":728,"height":90}}};</script><a href="https://na-ice.360yield.com/click/wIUgWAXQ-Teg9bFreqmjvvwpXD86tInZbesBQgOtGBHqZatmIY9C1mo-1kWRx32zN2mfOxtmyaaHpr.Qh5pspzJarrsm08TtkRSeTc2mnsRuQ2MKzCTvbospesMJR28YLZ.3g06DwS6c5XOJuesd0eODk7GCqtmJ18c6CTmdWDUdDxiknLAPHVXAfvlDH5AA9utF7TNNGjaxvyMpQD51.Dt5GFjcJLnwWnGSajoSr9JfomoGenbLkabLmzylSXd1p9xyrzTmWU39FvagEOZnMb2ixlc.JDxXA1ZnaR.e7ywkwiJnDtg1Om0EJAYOmUh0oTozbXeo26iwLLZxVxV0owOHY61zhHYyHcpBakqtelYPWZcmBJEXfl5KIekB2CiLQqxCi3TKdg5FztAQY0Tf3mTmiGZev0RkeiX5fnxS8jbWSD-cCgB51PNLn0X5EEkUPkOJh9JV713OOcyDhsgaFPezUcvuD7nNrxB71aWcH6MMfk1BFQ7kSVi9WHQvauaTxrWm//https%3A%2F%2Fazerion.com" target="_blank"><img style="border: 0;" border="0" width=728 height=90 src="https://creative.360yield.com/file/241121/728x90.jpg" alt=" "/></a><img src="https://na-ice.360yield.com/imp_pixel?ic=wIUgWDjQ.pQrjtYOEKs44M3pIqNnfojBPkSd3WRdHnRawHiRiER7A-0RowzsOtOLq7MWtEFnWsRXYZZmJcZPGft0cNSs8lNOVZnXWHLDv3Dyqo8VGI4737RieGIK0DrIjlVXzFmuYeXufriRfPHVGiV-hz6VIateQ6I7.xR5O.48..ZoEGfRpIJGzqeqz12cWnFUPhBScQ6sPLlb6B1RiTpNh170OhIVfX80N2g4jn-U.xJ262ND29bBvImQsJjz29o8mmGL3TfbzUHzr.ob-ozfP9.ZHh.B5tD-M5qG9rAlIU6Q7I-zchnhv1W5OzU5mfMYy9yMLKqBemQGJA1KaiZJV79lwnDki-6PIg1v09h86eJqXYHHsUobx4Np5lMT6-5UdHXZPpR8T08b4keLREQw-lpqKum92pwUCVAYPeFdmTeKk1gUKPcaWxN8QfaQeoLJfb.88n3-vp.-aBCkxlZwXjXSd55QV.uwi-bTtFwaZjGHpNkIBG3D19kNl.Yb55Rk" alt=" " style="display:none"/><improvedigital_ad_output_information tp_id="" buyer_id="0" rtb_advertiser="" campaign_id="123159" line_item_id="320896" creative_id="510265" crid="0" placement_id="22135702"></improvedigital_ad_output_information></body></html>'
1048
+ })
1049
+ ];
1050
+
1045
1051
  const expectedTwoBids = [
1046
1052
  expectedBid[0],
1047
1053
  {
@@ -1051,7 +1057,7 @@ describe('Improve Digital Adapter Tests', function () {
1051
1057
  width: 300,
1052
1058
  height: 250,
1053
1059
  ttl: 300,
1054
- ad: '<html><body style="margin:0%"><a href="https://na-ice.360yield.com/click/.2RC3VhfEsdhtcsRiT8bWksMTmBbkfnj1AaD3C6Bht.Bp85KK5vjzZvJMpigI4ECdhllWuzbk2UhQt8VEGq1tg8m1OEot7Gs94PplWYs2ESdXpGAPFHiqdbZstOOhfiWL4D.k6lXfgNmbRhpL.SktYeEAiRaOZHQAX.22IEQ0swRnEdNyjHXYEkNIgpvMLqkZTv.JYM.iW9NwyJLIqk4Djh8X301iRLxexGBTl7-.n93WbkSCVY6uwdXSzoQrtK1r3fTrS34rdgpqFt6ZIBLKWI2ByLM2.aQqfvev5BCMOeyEKY8CcSg9SoDiPyQsvcz9bTckLtqs3AD3Qu8I.2rGn1NID7ljgg6-dERrorPK9A5XK67Pv34UqUe2xILQ6wvi52dX4p5d3yxsI9BMfnxzkn7MullVJdn-NiSB2rTe2MFozJc5G1nEwtpsMwZpBxl00PCcMsyETtaKbhqa3Gq5nCuce4AEhL6109IrZscUUzBMSKLSX16HlFfmPZ.gDnWCI3lO35UbGdL7lKjbT9mHYQ-//http%3A%2F%2Fblah.com" target="_blank"><img style="border: 0;" border="0" width=300 height=250 src="https://creative.360yield.com/file/238052/test_ads-300x250.jpg" alt=" "/></a><img src="https://na-ice.360yield.com/imp_pixel?ic=.2RC3VqxeCtOU3G5i6Wejh69dm5JnKlRXeieMtJA63nfGMyuFoWTTjSU5PfHLg2PtnmDRFgHJgGE19QyjAGj6ZQVy0iUk-HF-.zsAlx.7Fx3m5fPE7RIYw.kjy-BvuprFqfU-qlm03KTks6zVLDSIspuxemNQ1HBhq6QZSm9qqAVY-1XS-KbImfb.fll3VvhJXy7Ru.KstgDfAJwt5vYxVab6efvjAIhOrrv6uXaywFVTtu9-gK5pKgIkdixxuYE2jLUyEh9GiRyRCH0jhhUVUmSfrjE4OuTq-7TmCYXQQ5Vk9AqOV.JybF8d35IeyAbF2aywwdZA2SGGEGeYIoOy.7D8TpuVqXxvnUyeKXlCfmzXcJs27W2sKGUTfpWc-TyhAOHKzwqrxP-QN5D1QRCXFWgAm.rwUBguE-oL1Q7NOaCsaRwINRwvQrastWNFUDEYzrB32NL-wIkILdh9e96JwhKiwGwJ1VqH.6RDDutUi9CLreYQl348exTfqL44Ia5VTLn7e0rA6s9V1tg55V7TX36" alt=" " style="display:none"/><improvedigital_ad_output_information tp_id="" buyer_id="0" rtb_advertiser="" campaign_id="123159" line_item_id="320896" creative_id="479163" crid="0" placement_id="22135702"></improvedigital_ad_output_information></body></html>',
1060
+ ad: '<html><body style="margin:0%"><script>window.__razr_config = {"prebid":{"bidRequest":{"bidder":"improvedigital","params":{"placementId":1053688,"keyValues":{"testKey":["testValue"]},"bidFloor":0.05,"bidFloorCur":"eUR","size":{"w":800,"h":600}},"adUnitCode":"div-gpt-ad-1499748733608-0","transactionId":"f183e871-fbed-45f0-a427-c8a63c4c01eb","bidId":"33e9500b21129f","bidderRequestId":"2772c1e566670b","auctionId":"192721e36a0239","mediaTypes":{"banner":{"sizes":[[300,250],[160,600]]}},"sizes":[[300,250],[160,600]]},"bid":{"requestId":"33e9500b21129f","cpm":1.9200543539802946,"creativeId":"479163","currency":"EUR","dealId":320896,"meta":{"advertiserDomains":[]},"netRevenue":false,"ttl":300,"mediaType":"banner","ad":"<html><body style=\\"margin:0%\\"><a href=\\"https://na-ice.360yield.com/click/.2RC3VhfEsdhtcsRiT8bWksMTmBbkfnj1AaD3C6Bht.Bp85KK5vjzZvJMpigI4ECdhllWuzbk2UhQt8VEGq1tg8m1OEot7Gs94PplWYs2ESdXpGAPFHiqdbZstOOhfiWL4D.k6lXfgNmbRhpL.SktYeEAiRaOZHQAX.22IEQ0swRnEdNyjHXYEkNIgpvMLqkZTv.JYM.iW9NwyJLIqk4Djh8X301iRLxexGBTl7-.n93WbkSCVY6uwdXSzoQrtK1r3fTrS34rdgpqFt6ZIBLKWI2ByLM2.aQqfvev5BCMOeyEKY8CcSg9SoDiPyQsvcz9bTckLtqs3AD3Qu8I.2rGn1NID7ljgg6-dERrorPK9A5XK67Pv34UqUe2xILQ6wvi52dX4p5d3yxsI9BMfnxzkn7MullVJdn-NiSB2rTe2MFozJc5G1nEwtpsMwZpBxl00PCcMsyETtaKbhqa3Gq5nCuce4AEhL6109IrZscUUzBMSKLSX16HlFfmPZ.gDnWCI3lO35UbGdL7lKjbT9mHYQ-//http%3A%2F%2Fblah.com\\" target=\\"_blank\\"><img style=\\"border: 0;\\" border=\\"0\\" width=300 height=250 src=\\"https://creative.360yield.com/file/238052/test_ads-300x250.jpg\\" alt=\\" \\"/></a><img src=\\"https://na-ice.360yield.com/imp_pixel?ic=.2RC3VqxeCtOU3G5i6Wejh69dm5JnKlRXeieMtJA63nfGMyuFoWTTjSU5PfHLg2PtnmDRFgHJgGE19QyjAGj6ZQVy0iUk-HF-.zsAlx.7Fx3m5fPE7RIYw.kjy-BvuprFqfU-qlm03KTks6zVLDSIspuxemNQ1HBhq6QZSm9qqAVY-1XS-KbImfb.fll3VvhJXy7Ru.KstgDfAJwt5vYxVab6efvjAIhOrrv6uXaywFVTtu9-gK5pKgIkdixxuYE2jLUyEh9GiRyRCH0jhhUVUmSfrjE4OuTq-7TmCYXQQ5Vk9AqOV.JybF8d35IeyAbF2aywwdZA2SGGEGeYIoOy.7D8TpuVqXxvnUyeKXlCfmzXcJs27W2sKGUTfpWc-TyhAOHKzwqrxP-QN5D1QRCXFWgAm.rwUBguE-oL1Q7NOaCsaRwINRwvQrastWNFUDEYzrB32NL-wIkILdh9e96JwhKiwGwJ1VqH.6RDDutUi9CLreYQl348exTfqL44Ia5VTLn7e0rA6s9V1tg55V7TX36\\" alt=\\" \\" style=\\"display:none\\"/><improvedigital_ad_output_information tp_id=\\"\\" buyer_id=\\"0\\" rtb_advertiser=\\"\\" campaign_id=\\"123159\\" line_item_id=\\"320896\\" creative_id=\\"479163\\" crid=\\"0\\" placement_id=\\"22135702\\"></improvedigital_ad_output_information></body></html>","width":300,"height":250}}};</script><a href="https://na-ice.360yield.com/click/.2RC3VhfEsdhtcsRiT8bWksMTmBbkfnj1AaD3C6Bht.Bp85KK5vjzZvJMpigI4ECdhllWuzbk2UhQt8VEGq1tg8m1OEot7Gs94PplWYs2ESdXpGAPFHiqdbZstOOhfiWL4D.k6lXfgNmbRhpL.SktYeEAiRaOZHQAX.22IEQ0swRnEdNyjHXYEkNIgpvMLqkZTv.JYM.iW9NwyJLIqk4Djh8X301iRLxexGBTl7-.n93WbkSCVY6uwdXSzoQrtK1r3fTrS34rdgpqFt6ZIBLKWI2ByLM2.aQqfvev5BCMOeyEKY8CcSg9SoDiPyQsvcz9bTckLtqs3AD3Qu8I.2rGn1NID7ljgg6-dERrorPK9A5XK67Pv34UqUe2xILQ6wvi52dX4p5d3yxsI9BMfnxzkn7MullVJdn-NiSB2rTe2MFozJc5G1nEwtpsMwZpBxl00PCcMsyETtaKbhqa3Gq5nCuce4AEhL6109IrZscUUzBMSKLSX16HlFfmPZ.gDnWCI3lO35UbGdL7lKjbT9mHYQ-//http%3A%2F%2Fblah.com" target="_blank"><img style="border: 0;" border="0" width=300 height=250 src="https://creative.360yield.com/file/238052/test_ads-300x250.jpg" alt=" "/></a><img src="https://na-ice.360yield.com/imp_pixel?ic=.2RC3VqxeCtOU3G5i6Wejh69dm5JnKlRXeieMtJA63nfGMyuFoWTTjSU5PfHLg2PtnmDRFgHJgGE19QyjAGj6ZQVy0iUk-HF-.zsAlx.7Fx3m5fPE7RIYw.kjy-BvuprFqfU-qlm03KTks6zVLDSIspuxemNQ1HBhq6QZSm9qqAVY-1XS-KbImfb.fll3VvhJXy7Ru.KstgDfAJwt5vYxVab6efvjAIhOrrv6uXaywFVTtu9-gK5pKgIkdixxuYE2jLUyEh9GiRyRCH0jhhUVUmSfrjE4OuTq-7TmCYXQQ5Vk9AqOV.JybF8d35IeyAbF2aywwdZA2SGGEGeYIoOy.7D8TpuVqXxvnUyeKXlCfmzXcJs27W2sKGUTfpWc-TyhAOHKzwqrxP-QN5D1QRCXFWgAm.rwUBguE-oL1Q7NOaCsaRwINRwvQrastWNFUDEYzrB32NL-wIkILdh9e96JwhKiwGwJ1VqH.6RDDutUi9CLreYQl348exTfqL44Ia5VTLn7e0rA6s9V1tg55V7TX36" alt=" " style="display:none"/><improvedigital_ad_output_information tp_id="" buyer_id="0" rtb_advertiser="" campaign_id="123159" line_item_id="320896" creative_id="479163" crid="0" placement_id="22135702"></improvedigital_ad_output_information></body></html>',
1055
1061
  creativeId: '479163',
1056
1062
  dealId: 320896,
1057
1063
  netRevenue: false,
@@ -1091,7 +1097,7 @@ describe('Improve Digital Adapter Tests', function () {
1091
1097
 
1092
1098
  it('should return a well-formed display bid for multi-format ad unit', function () {
1093
1099
  const bids = spec.interpretResponse(serverResponse, {bidderRequest: multiFormatBidderRequest});
1094
- expect(bids).to.deep.equal(expectedBid);
1100
+ expect(bids).to.deep.equal(multiFormatExpectedBid);
1095
1101
  });
1096
1102
 
1097
1103
  it('should return two bids', function () {
@@ -1233,16 +1239,6 @@ describe('Improve Digital Adapter Tests', function () {
1233
1239
  bids = spec.interpretResponse(videoResponse, {bidderRequest: multiFormatBidderRequest});
1234
1240
  expect(bids[0].mediaType).to.equal(VIDEO);
1235
1241
  });
1236
-
1237
- it('should not affect non-RAZR bids', function () {
1238
- const bids = spec.interpretResponse(serverResponse, {bidderRequest});
1239
- expect(bids[0].renderer).to.not.exist;
1240
- });
1241
-
1242
- it('should detect RAZR bids', function () {
1243
- const bids = spec.interpretResponse(serverResponseRazr, {bidderRequest});
1244
- expect(bids[0].renderer).to.exist;
1245
- });
1246
1242
  });
1247
1243
 
1248
1244
  describe('getUserSyncs', function () {
@@ -10,7 +10,6 @@ describe('IndexexchangeAdapter', function () {
10
10
  const IX_SECURE_ENDPOINT = 'https://htlb.casalemedia.com/openrtb/pbjs';
11
11
  const VIDEO_ENDPOINT_VERSION = 8.1;
12
12
  const BANNER_ENDPOINT_VERSION = 7.2;
13
- const NATIVE_ENDPOINT_VERSION = undefined;
14
13
 
15
14
  const SAMPLE_SCHAIN = {
16
15
  'ver': '1.0',
@@ -172,7 +171,8 @@ describe('IndexexchangeAdapter', function () {
172
171
  sizes: [[300, 250], [300, 600]],
173
172
  mediaTypes: {
174
173
  banner: {
175
- sizes: [[300, 250], [300, 600]]
174
+ sizes: [[300, 250], [300, 600]],
175
+ pos: 0
176
176
  }
177
177
  },
178
178
  ortb2Imp: {
@@ -378,6 +378,7 @@ describe('IndexexchangeAdapter', function () {
378
378
  required: false
379
379
  },
380
380
  title: {
381
+ len: 25,
381
382
  required: true
382
383
  },
383
384
  body: {
@@ -387,13 +388,20 @@ describe('IndexexchangeAdapter', function () {
387
388
  required: true
388
389
  },
389
390
  video: {
390
- required: false
391
+ required: false,
392
+ mimes: ['video/mp4', 'video/webm'],
393
+ minduration: 0,
394
+ maxduration: 120,
395
+ protocols: [2, 3, 5, 6]
391
396
  },
392
397
  sponsoredBy: {
393
398
  required: true
394
399
  }
395
400
  }
396
401
  },
402
+ nativeOrtbRequest: {
403
+ assets: [{id: 0, required: 0, img: {type: 1}}, {id: 1, required: 1, title: {len: 140}}, {id: 2, required: 1, data: {type: 2}}, {id: 3, required: 1, img: {type: 3}}, {id: 4, required: false, video: {mimes: ['video/mp4', 'video/webm'], minduration: 0, maxduration: 120, protocols: [2, 3, 5, 6]}}]
404
+ },
397
405
  adUnitCode: 'div-gpt-ad-1460505748563-0',
398
406
  transactionId: '173f49a8-7549-4218-a23c-e7ba59b47231',
399
407
  bidId: '1a2b3c4f',
@@ -432,6 +440,9 @@ describe('IndexexchangeAdapter', function () {
432
440
  }
433
441
  }
434
442
  },
443
+ nativeOrtbRequest: {
444
+ assets: [{id: 0, required: 0, img: {type: 1}}, {id: 1, required: 1, title: {len: 140}}, {id: 2, required: 1, data: {type: 2}}, {id: 3, required: 1, img: {type: 3}}, {id: 4, required: false, video: {mimes: ['video/mp4', 'video/webm'], minduration: 0, maxduration: 120, protocols: [2, 3, 5, 6]}}]
445
+ },
435
446
  adUnitCode: 'div-gpt-ad-1460505748562-0',
436
447
  transactionId: '173f49a8-7549-4218-a23c-e7ba59b47230',
437
448
  bidId: '1a2b3c4e',
@@ -442,7 +453,7 @@ describe('IndexexchangeAdapter', function () {
442
453
  ];
443
454
 
444
455
  const DEFAULT_NATIVE_IMP = {
445
- request: '{"assets":[{"required":0,"img":{"type":1},"id":201},{"required":1,"title":{"len":25},"id":100},{"required":1,"data":{"type":2},"id":402},{"required":1,"img":{"type":3},"id":203},{"required":0,"video":{"mimes":["video/mp4","video/webm"],"minduration":0,"maxduration":120,"protocols":[2,3,5,6]},"id":300},{"required":1,"data":{"type":1},"id":401}],"ver":"1.2","eventtrackers":[{"event":1,"methods":[1,2]}],"privacy":1}',
456
+ request: '{"assets":[{"id":0,"required":0,"img":{"type":1}},{"id":1,"required":1,"title":{"len":140}},{"id":2,"required":1,"data":{"type":2}},{"id":3,"required":1,"img":{"type":3}},{"id":4,"required":false,"video":{"mimes":["video/mp4","video/webm"],"minduration":0,"maxduration":120,"protocols":[2,3,5,6]}}],"eventtrackers":[{"event":1,"methods":[1,2]}],"privacy":1}',
446
457
  ver: '1.2'
447
458
  }
448
459
 
@@ -588,7 +599,7 @@ describe('IndexexchangeAdapter', function () {
588
599
  advbrandid: 303325,
589
600
  advbrand: 'OECTA'
590
601
  },
591
- adm: '{"native":{"ver":"1.2","assets":[{"id":201,"img":{"url":"https://cdn.liftoff.io/customers/1209/creatives/2501-icon-250x250.png","w":250,"h":250}},{"id":203,"img":{"url":"https://cdn.liftoff.io/customers/5a9cab9cc6/image/lambda_png/a0355879b06c09b09232.png","w":1200,"h":627}},{"id":401,"data":{"value":"autodoc.co.uk"}},{"id":402,"data":{"value":"Les pièces automobiles dont vous avez besoin, toujours sous la main."}},{"id":100,"title":{"text":"Autodoc"}},{"id":300,"video":{"vasttag":"<VAST>blah</VAST>"}}],"link":{"url":"https://play.google.com/store/apps/details?id=de.autodoc.gmbh","clicktrackers":["https://click.liftoff.io/v1/campaign_click/blah"]},"eventtrackers":[{"event":1,"method":1,"url":"https://impression-europe.liftoff.io/index/impression"},{"event":1,"method":1,"url":"https://a701.casalemedia.com/impression/v1"}],"privacy":"https://privacy.link.com"}}'
602
+ adm: '{"native":{"ver":"1.2","assets":[{"id":0,"img":{"url":"https://cdn.liftoff.io/customers/1209/creatives/2501-icon-250x250.png","w":250,"h":250}},{"id":1,"img":{"url":"https://cdn.liftoff.io/customers/5a9cab9cc6/image/lambda_png/a0355879b06c09b09232.png","w":1200,"h":627}},{"id":2,"data":{"value":"autodoc.co.uk"}},{"id":3,"data":{"value":"Les pièces automobiles dont vous avez besoin, toujours sous la main."}},{"id":4,"title":{"text":"Autodoc"}},{"id":5,"video":{"vasttag":"<VAST>blah</VAST>"}}],"link":{"url":"https://play.google.com/store/apps/details?id=de.autodoc.gmbh","clicktrackers":["https://click.liftoff.io/v1/campaign_click/blah"]},"eventtrackers":[{"event":1,"method":1,"url":"https://impression-europe.liftoff.io/index/impression"},{"event":1,"method":1,"url":"https://a701.casalemedia.com/impression/v1"}],"privacy":"https://privacy.link.com"}}'
592
603
  }
593
604
  ],
594
605
  seat: '3970'
@@ -864,7 +875,7 @@ describe('IndexexchangeAdapter', function () {
864
875
  expect(spec.isBidRequestValid(bid)).to.equal(true);
865
876
  });
866
877
 
867
- it('should return true when required params found for a banner or video ad', function () {
878
+ it('should return true when required params found for a banner, video or native ad', function () {
868
879
  expect(spec.isBidRequestValid(DEFAULT_BANNER_VALID_BID[0])).to.equal(true);
869
880
  expect(spec.isBidRequestValid(DEFAULT_VIDEO_VALID_BID[0])).to.equal(true);
870
881
  expect(spec.isBidRequestValid(DEFAULT_NATIVE_VALID_BID[0])).to.equal(true);
@@ -1064,15 +1075,12 @@ describe('IndexexchangeAdapter', function () {
1064
1075
  expect(spec.isBidRequestValid(bid)).to.equal(false);
1065
1076
  });
1066
1077
 
1067
- it('should fail when native contains unrecongized properties', function () {
1078
+ it('should fail if native openRTB object contains no valid assets', function () {
1068
1079
  let bid = utils.deepClone(DEFAULT_NATIVE_VALID_BID[0]);
1069
- bid.mediaTypes.native.test = {}
1080
+ bid.nativeOrtbRequest = {}
1070
1081
  expect(spec.isBidRequestValid(bid)).to.be.false;
1071
- });
1072
1082
 
1073
- it('should fail if native mediaTypes should contains no valid assets', function () {
1074
- let bid = utils.deepClone(DEFAULT_NATIVE_VALID_BID[0]);
1075
- bid.mediaTypes.native = {}
1083
+ bid.nativeOrtbRequest = {assets: []}
1076
1084
  expect(spec.isBidRequestValid(bid)).to.be.false;
1077
1085
  });
1078
1086
  });
@@ -1832,6 +1840,7 @@ describe('IndexexchangeAdapter', function () {
1832
1840
  expect(impression.id).to.equal(DEFAULT_BANNER_VALID_BID[0].bidId);
1833
1841
  expect(impression.banner.format).to.be.length(2);
1834
1842
  expect(impression.banner.topframe).to.be.oneOf([0, 1]);
1843
+ expect(impression.banner.pos).to.equal(0);
1835
1844
  expect(impression.ext.tid).to.equal(DEFAULT_BANNER_VALID_BID[0].transactionId);
1836
1845
 
1837
1846
  impression.banner.format.map(({ w, h, ext }, index) => {
@@ -2145,7 +2154,7 @@ describe('IndexexchangeAdapter', function () {
2145
2154
  it('should have native request', () => {
2146
2155
  const nativeImpression = JSON.parse(request[1].data.r).imp[0];
2147
2156
 
2148
- expect(request[1].data.v).to.equal(NATIVE_ENDPOINT_VERSION);
2157
+ expect(request[1].data.hasOwnProperty('v')).to.equal(false);
2149
2158
  expect(nativeImpression.id).to.equal(DEFAULT_NATIVE_VALID_BID[0].bidId);
2150
2159
  expect(nativeImpression.native).to.deep.equal(DEFAULT_NATIVE_IMP);
2151
2160
  });
@@ -2316,15 +2325,7 @@ describe('IndexexchangeAdapter', function () {
2316
2325
  });
2317
2326
 
2318
2327
  describe('detect missing sizes', function () {
2319
- beforeEach(function () {
2320
- config.setConfig({
2321
- ix: {
2322
- detectMissingSizes: false
2323
- }
2324
- });
2325
- })
2326
-
2327
- it('request should not contain missing sizes if detectMissingSizes = false', function () {
2328
+ it('request should always contain missing sizes', function () {
2328
2329
  const bid1 = utils.deepClone(DEFAULT_BANNER_VALID_BID[0]);
2329
2330
  bid1.mediaTypes.banner.sizes = LARGE_SET_OF_SIZES;
2330
2331
 
@@ -2441,11 +2442,13 @@ describe('IndexexchangeAdapter', function () {
2441
2442
  bid.mediaTypes.video.protocols = [6];
2442
2443
  bid.mediaTypes.video.mimes = ['video/mp4'];
2443
2444
  bid.mediaTypes.video.api = 2;
2445
+ bid.mediaTypes.video.pos = 0;
2444
2446
  const request = spec.buildRequests([bid], {})[0];
2445
2447
  const impression = JSON.parse(request.data.r).imp[0];
2446
2448
 
2447
2449
  expect(impression.video.protocols[0]).to.equal(6);
2448
2450
  expect(impression.video.api).to.equal(2);
2451
+ expect(impression.video.pos).to.equal(0);
2449
2452
  expect(impression.video.mimes[0]).to.equal('video/mp4');
2450
2453
  });
2451
2454
 
@@ -2491,7 +2494,7 @@ describe('IndexexchangeAdapter', function () {
2491
2494
  const request = spec.buildRequests(DEFAULT_NATIVE_VALID_BID, DEFAULT_OPTION);
2492
2495
  const query = request[0].data;
2493
2496
 
2494
- expect(query.v).to.equal(NATIVE_ENDPOINT_VERSION);
2497
+ expect(query.hasOwnProperty('v')).to.equal(false);
2495
2498
  expect(query.s).to.equal(DEFAULT_NATIVE_VALID_BID[0].params.siteId);
2496
2499
  expect(query.r).to.exist;
2497
2500
  expect(query.ac).to.equal('j');
@@ -2516,92 +2519,148 @@ describe('IndexexchangeAdapter', function () {
2516
2519
  const request = spec.buildRequests(DEFAULT_NATIVE_VALID_BID, DEFAULT_OPTION);
2517
2520
  const nativeImpression = JSON.parse(request[0].data.r).imp[0];
2518
2521
 
2519
- expect(request[0].data.v).to.equal(NATIVE_ENDPOINT_VERSION);
2522
+ expect(request[0].data.hasOwnProperty('v')).to.equal(false);
2520
2523
  expect(nativeImpression.id).to.equal(DEFAULT_NATIVE_VALID_BID[0].bidId);
2521
2524
  expect(nativeImpression.native).to.deep.equal(DEFAULT_NATIVE_IMP);
2522
2525
  });
2523
2526
 
2524
2527
  it('should build request with given asset properties', function() {
2525
2528
  let bid = utils.deepClone(DEFAULT_NATIVE_VALID_BID)
2526
- bid[0].mediaTypes.native = {
2527
- title: {
2528
- len: 200
2529
- },
2530
- video: {
2531
- mimes: [
2532
- 'javascript'
2533
- ],
2534
- minduration: 10,
2535
- maxduration: 60,
2536
- protocols: [1]
2537
- }
2529
+ bid[0].nativeOrtbRequest = {
2530
+ assets: [{id: 0, required: 0, title: {len: 140}}, {id: 1, required: 0, video: {mimes: ['javascript'], minduration: 10, maxduration: 60, protocols: [1]}}]
2538
2531
  }
2539
2532
  const request = spec.buildRequests(bid, DEFAULT_OPTION);
2540
2533
  const nativeImpression = JSON.parse(request[0].data.r).imp[0];
2541
- expect(nativeImpression.native).to.deep.equal({request: '{"assets":[{"required":0,"title":{"len":200},"id":100},{"required":0,"video":{"mimes":["javascript"],"minduration":10,"maxduration":60,"protocols":[1]},"id":300}],"ver":"1.2","eventtrackers":[{"event":1,"methods":[1,2]}],"privacy":1}', ver: '1.2'});
2534
+ expect(nativeImpression.native).to.deep.equal({request: '{"assets":[{"id":0,"required":0,"title":{"len":140}},{"id":1,"required":0,"video":{"mimes":["javascript"],"minduration":10,"maxduration":60,"protocols":[1]}}],"eventtrackers":[{"event":1,"methods":[1,2]}],"privacy":1}', ver: '1.2'});
2542
2535
  });
2543
2536
 
2544
2537
  it('should build request with all possible Prebid asset properties', function() {
2545
2538
  let bid = utils.deepClone(DEFAULT_NATIVE_VALID_BID)
2546
- bid[0].mediaTypes.native = {
2547
- title: {
2548
- required: false
2549
- },
2550
- body: {
2551
- required: false
2552
- },
2553
- body2: {
2554
- required: false
2555
- },
2556
- sponsoredBy: {
2557
- required: false
2558
- },
2559
- icon: {
2560
- required: false
2561
- },
2562
- image: {
2563
- required: false
2564
- },
2565
- clickUrl: {
2566
- required: false
2567
- },
2568
- displayUrl: {
2569
- required: false
2570
- },
2571
- privacyLink: {
2572
- required: false
2573
- },
2574
- privacyIcon: {
2575
- required: false
2576
- },
2577
- cta: {
2578
- required: false
2579
- },
2580
- rating: {
2581
- required: false
2582
- },
2583
- downloads: {
2584
- required: false
2585
- },
2586
- likes: {
2587
- required: false
2588
- },
2589
- price: {
2590
- required: false
2591
- },
2592
- salePrice: {
2593
- required: false
2594
- },
2595
- address: {
2596
- required: false
2597
- },
2598
- phone: {
2599
- required: false
2600
- },
2539
+ bid[0].nativeOrtbRequest = {
2540
+ 'ver': '1.2',
2541
+ 'assets': [
2542
+ {
2543
+ 'id': 0,
2544
+ 'required': 0,
2545
+ 'title': {
2546
+ 'len': 140
2547
+ }
2548
+ },
2549
+ {
2550
+ 'id': 1,
2551
+ 'required': 0,
2552
+ 'data': {
2553
+ 'type': 2
2554
+ }
2555
+ },
2556
+ {
2557
+ 'id': 2,
2558
+ 'required': 0,
2559
+ 'data': {
2560
+ 'type': 10
2561
+ }
2562
+ },
2563
+ {
2564
+ 'id': 3,
2565
+ 'required': 0,
2566
+ 'data': {
2567
+ 'type': 1
2568
+ }
2569
+ },
2570
+ {
2571
+ 'id': 4,
2572
+ 'required': 0,
2573
+ 'img': {
2574
+ 'type': 1
2575
+ }
2576
+ },
2577
+ {
2578
+ 'id': 5,
2579
+ 'required': 0,
2580
+ 'img': {
2581
+ 'type': 3
2582
+ }
2583
+ },
2584
+ {
2585
+ 'id': 6,
2586
+ 'required': 0
2587
+ },
2588
+ {
2589
+ 'id': 7,
2590
+ 'required': 0,
2591
+ 'data': {
2592
+ 'type': 11
2593
+ }
2594
+ },
2595
+ {
2596
+ 'id': 8,
2597
+ 'required': 0
2598
+ },
2599
+ {
2600
+ 'id': 9,
2601
+ 'required': 0
2602
+ },
2603
+ {
2604
+ 'id': 10,
2605
+ 'required': 0,
2606
+ 'data': {
2607
+ 'type': 12
2608
+ }
2609
+ },
2610
+ {
2611
+ 'id': 11,
2612
+ 'required': 0,
2613
+ 'data': {
2614
+ 'type': 3
2615
+ }
2616
+ },
2617
+ {
2618
+ 'id': 12,
2619
+ 'required': 0,
2620
+ 'data': {
2621
+ 'type': 5
2622
+ }
2623
+ },
2624
+ {
2625
+ 'id': 13,
2626
+ 'required': 0,
2627
+ 'data': {
2628
+ 'type': 4
2629
+ }
2630
+ },
2631
+ {
2632
+ 'id': 14,
2633
+ 'required': 0,
2634
+ 'data': {
2635
+ 'type': 6
2636
+ }
2637
+ },
2638
+ {
2639
+ 'id': 15,
2640
+ 'required': 0,
2641
+ 'data': {
2642
+ 'type': 7
2643
+ }
2644
+ },
2645
+ {
2646
+ 'id': 16,
2647
+ 'required': 0,
2648
+ 'data': {
2649
+ 'type': 9
2650
+ }
2651
+ },
2652
+ {
2653
+ 'id': 17,
2654
+ 'required': 0,
2655
+ 'data': {
2656
+ 'type': 8
2657
+ }
2658
+ }
2659
+ ]
2601
2660
  }
2602
2661
  const request = spec.buildRequests(bid, DEFAULT_OPTION);
2603
2662
  const nativeImpression = JSON.parse(request[0].data.r).imp[0];
2604
- expect(nativeImpression.native).to.deep.equal({request: '{"assets":[{"required":0,"title":{"len":25},"id":100},{"required":0,"data":{"type":2},"id":402},{"required":0,"data":{"type":10},"id":410},{"required":0,"data":{"type":1},"id":401},{"required":0,"img":{"type":1},"id":201},{"required":0,"img":{"type":3},"id":203},{"required":0,"data":{"type":11},"id":411},{"required":0,"data":{"type":12},"id":412},{"required":0,"data":{"type":3},"id":403},{"required":0,"data":{"type":5},"id":405},{"required":0,"data":{"type":4},"id":404},{"required":0,"data":{"type":6},"id":406},{"required":0,"data":{"type":7},"id":407},{"required":0,"data":{"type":9},"id":409},{"required":0,"data":{"type":8},"id":408}],"ver":"1.2","eventtrackers":[{"event":1,"methods":[1,2]}],"privacy":1}', ver: '1.2'});
2663
+ expect(nativeImpression.native).to.deep.equal({request: '{"ver":"1.2","assets":[{"id":0,"required":0,"title":{"len":140}},{"id":1,"required":0,"data":{"type":2}},{"id":2,"required":0,"data":{"type":10}},{"id":3,"required":0,"data":{"type":1}},{"id":4,"required":0,"img":{"type":1}},{"id":5,"required":0,"img":{"type":3}},{"id":6,"required":0},{"id":7,"required":0,"data":{"type":11}},{"id":8,"required":0},{"id":9,"required":0},{"id":10,"required":0,"data":{"type":12}},{"id":11,"required":0,"data":{"type":3}},{"id":12,"required":0,"data":{"type":5}},{"id":13,"required":0,"data":{"type":4}},{"id":14,"required":0,"data":{"type":6}},{"id":15,"required":0,"data":{"type":7}},{"id":16,"required":0,"data":{"type":9}},{"id":17,"required":0,"data":{"type":8}}],"eventtrackers":[{"event":1,"methods":[1,2]}],"privacy":1}', ver: '1.2'});
2605
2664
  })
2606
2665
  });
2607
2666
 
@@ -2626,15 +2685,6 @@ describe('IndexexchangeAdapter', function () {
2626
2685
  expect(videoImp.video.w).to.equal(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0].params.size[0]);
2627
2686
  expect(videoImp.video.h).to.equal(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0].params.size[1]);
2628
2687
  });
2629
-
2630
- it('should get missing sizes count 0 when params.size not used', function () {
2631
- const bid = utils.deepClone(DEFAULT_MULTIFORMAT_VIDEO_VALID_BID[0]);
2632
- delete bid.params.size;
2633
- const request = spec.buildRequests([bid], {});
2634
- const diagObj = JSON.parse(request[0].data.r).ext.ixdiag;
2635
- expect(diagObj.msd).to.equal(0);
2636
- expect(diagObj.msi).to.equal(0);
2637
- });
2638
2688
  });
2639
2689
 
2640
2690
  describe('both banner and video bidder params set', function () {
@@ -3091,27 +3141,70 @@ describe('IndexexchangeAdapter', function () {
3091
3141
  advertiserDomains: ['www.abc.com']
3092
3142
  },
3093
3143
  native: {
3094
- body: 'Les pièces automobiles dont vous avez besoin, toujours sous la main.',
3095
- clickUrl: 'https://play.google.com/store/apps/details?id=de.autodoc.gmbh',
3096
- icon: {
3097
- height: 250,
3098
- width: 250,
3099
- url: 'https://cdn.liftoff.io/customers/1209/creatives/2501-icon-250x250.png'
3100
- },
3101
- image: {
3102
- height: 627,
3103
- width: 1200,
3104
- url: 'https://cdn.liftoff.io/customers/5a9cab9cc6/image/lambda_png/a0355879b06c09b09232.png'
3105
- },
3106
- impressionTrackers: [
3107
- 'https://click.liftoff.io/v1/campaign_click/blah',
3108
- 'https://impression-europe.liftoff.io/index/impression',
3109
- 'https://a701.casalemedia.com/impression/v1'
3110
- ],
3111
- privacyLink: 'https://privacy.link.com',
3112
- sponsoredBy: 'autodoc.co.uk',
3113
- title: 'Autodoc',
3114
- video: '<VAST>blah</VAST>'
3144
+ ortb: {
3145
+ assets: [
3146
+ {
3147
+ 'id': 0,
3148
+ 'img': {
3149
+ 'h': 250,
3150
+ 'url': 'https://cdn.liftoff.io/customers/1209/creatives/2501-icon-250x250.png',
3151
+ 'w': 250
3152
+ }
3153
+ },
3154
+ {
3155
+ 'id': 1,
3156
+ 'img': {
3157
+ 'h': 627,
3158
+ 'url': 'https://cdn.liftoff.io/customers/5a9cab9cc6/image/lambda_png/a0355879b06c09b09232.png',
3159
+ 'w': 1200
3160
+ }
3161
+ },
3162
+ {
3163
+ 'data': {
3164
+ 'value': 'autodoc.co.uk'
3165
+ },
3166
+ 'id': 2
3167
+ },
3168
+ {
3169
+ 'data': {
3170
+ 'value': 'Les pièces automobiles dont vous avez besoin, toujours sous la main.'
3171
+ },
3172
+ 'id': 3
3173
+ },
3174
+ {
3175
+ 'id': 4,
3176
+ 'title': {
3177
+ 'text': 'Autodoc'
3178
+ }
3179
+ },
3180
+ {
3181
+ 'id': 5,
3182
+ 'video': {
3183
+ 'vasttag': '<VAST>blah</VAST>'
3184
+ }
3185
+ }
3186
+ ],
3187
+ 'eventtrackers': [
3188
+ {
3189
+ 'event': 1,
3190
+ 'method': 1,
3191
+ 'url': 'https://impression-europe.liftoff.io/index/impression'
3192
+ },
3193
+ {
3194
+ 'event': 1,
3195
+ 'method': 1,
3196
+ 'url': 'https://a701.casalemedia.com/impression/v1'
3197
+ }
3198
+ ],
3199
+ 'link': {
3200
+ 'clicktrackers': [
3201
+ 'https://click.liftoff.io/v1/campaign_click/blah'
3202
+ ],
3203
+ 'url': 'https://play.google.com/store/apps/details?id=de.autodoc.gmbh'
3204
+ },
3205
+ 'privacy': 'https://privacy.link.com',
3206
+ 'ver': '1.2'
3207
+ }
3115
3208
  },
3116
3209
  ttl: 3600
3117
3210
  }