prebid.js 9.3.0 → 9.4.1

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 (221) hide show
  1. package/creative/constants.js +2 -1
  2. package/creative/crossDomain.js +16 -4
  3. package/dist/33acrossAnalyticsAdapter.js +1 -1
  4. package/dist/33acrossBidAdapter.js +1 -1
  5. package/dist/33acrossIdSystem.js +1 -1
  6. package/dist/BTBidAdapter.js +1 -1
  7. package/dist/adagioAnalyticsAdapter.js +1 -1
  8. package/dist/adagioBidAdapter.js +1 -1
  9. package/dist/adagioRtdProvider.js +1 -1
  10. package/dist/adagioUtils.js +1 -1
  11. package/dist/addefendBidAdapter.js +1 -1
  12. package/dist/adfBidAdapter.js +1 -1
  13. package/dist/adgenerationBidAdapter.js +1 -1
  14. package/dist/adlooxRtdProvider.js +1 -1
  15. package/dist/adqueryBidAdapter.js +1 -1
  16. package/dist/adrelevantisBidAdapter.js +1 -1
  17. package/dist/adstirBidAdapter.js +1 -1
  18. package/dist/adtrgtmeBidAdapter.js +1 -1
  19. package/dist/adxcgAnalyticsAdapter.js +1 -1
  20. package/dist/adxcgBidAdapter.js +1 -1
  21. package/dist/adyoulikeBidAdapter.js +1 -1
  22. package/dist/agmaAnalyticsAdapter.js +1 -1
  23. package/dist/ajaBidAdapter.js +1 -1
  24. package/dist/amxBidAdapter.js +1 -1
  25. package/dist/amxIdSystem.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/axonixBidAdapter.js +1 -1
  30. package/dist/bidglassBidAdapter.js +1 -1
  31. package/dist/big-richmediaBidAdapter.js +1 -1
  32. package/dist/bridBidAdapter.js +1 -1
  33. package/dist/bridgewellBidAdapter.js +1 -1
  34. package/dist/brightMountainMediaBidAdapter.js +1 -1
  35. package/dist/carodaBidAdapter.js +1 -1
  36. package/dist/chtnwBidAdapter.js +1 -1
  37. package/dist/chunk-core.js +1 -1
  38. package/dist/codefuelBidAdapter.js +1 -1
  39. package/dist/concertBidAdapter.js +1 -1
  40. package/dist/connectadBidAdapter.js +1 -1
  41. package/dist/consumableBidAdapter.js +1 -1
  42. package/dist/conversantAnalyticsAdapter.js +1 -1
  43. package/dist/conversantBidAdapter.js +1 -1
  44. package/dist/cpmstarBidAdapter.js +1 -1
  45. package/dist/craftBidAdapter.js +1 -1
  46. package/dist/criteoBidAdapter.js +1 -1
  47. package/dist/cwireBidAdapter.js +1 -1
  48. package/dist/dailymotionBidAdapter.js +1 -1
  49. package/dist/deltaprojectsBidAdapter.js +1 -1
  50. package/dist/dependencies.json +33 -9
  51. package/dist/dianomiBidAdapter.js +1 -1
  52. package/dist/dspxBidAdapter.js +1 -1
  53. package/dist/dxkultureBidAdapter.js +1 -1
  54. package/dist/eplanningBidAdapter.js +1 -1
  55. package/dist/euidIdSystem.js +1 -1
  56. package/dist/exadsBidAdapter.js +1 -1
  57. package/dist/feedadBidAdapter.js +1 -1
  58. package/dist/finativeBidAdapter.js +1 -1
  59. package/dist/freewheel-sspBidAdapter.js +1 -1
  60. package/dist/gmosspBidAdapter.js +1 -1
  61. package/dist/goldbachBidAdapter.js +1 -1
  62. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  63. package/dist/greenbidsRtdProvider.js +1 -1
  64. package/dist/gridBidAdapter.js +1 -1
  65. package/dist/gumgumBidAdapter.js +1 -1
  66. package/dist/h12mediaBidAdapter.js +1 -1
  67. package/dist/hypelabBidAdapter.js +1 -1
  68. package/dist/id5AnalyticsAdapter.js +1 -1
  69. package/dist/id5IdSystem.js +1 -1
  70. package/dist/illuminBidAdapter.js +1 -1
  71. package/dist/imdsBidAdapter.js +1 -1
  72. package/dist/improvedigitalBidAdapter.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/kimberliteBidAdapter.js +1 -1
  79. package/dist/konduitAnalyticsAdapter.js +1 -1
  80. package/dist/kueezBidAdapter.js +1 -1
  81. package/dist/kueezRtbBidAdapter.js +1 -1
  82. package/dist/lassoBidAdapter.js +1 -1
  83. package/dist/lifestreetBidAdapter.js +1 -1
  84. package/dist/liveIntentIdSystem.js +1 -1
  85. package/dist/logicadBidAdapter.js +1 -1
  86. package/dist/loglyliftBidAdapter.js +1 -1
  87. package/dist/luceadBidAdapter.js +1 -1
  88. package/dist/luponmediaBidAdapter.js +1 -1
  89. package/dist/mabidderBidAdapter.js +1 -1
  90. package/dist/magniteAnalyticsAdapter.js +1 -1
  91. package/dist/malltvAnalyticsAdapter.js +1 -1
  92. package/dist/marsmediaBidAdapter.js +1 -1
  93. package/dist/mediafuseBidAdapter.js +1 -1
  94. package/dist/medianetAnalyticsAdapter.js +1 -1
  95. package/dist/medianetBidAdapter.js +1 -1
  96. package/dist/mediasquareBidAdapter.js +1 -1
  97. package/dist/mgidBidAdapter.js +1 -1
  98. package/dist/minutemediaBidAdapter.js +1 -1
  99. package/dist/missenaBidAdapter.js +1 -1
  100. package/dist/nexx360BidAdapter.js +1 -1
  101. package/dist/nobidAnalyticsAdapter.js +1 -1
  102. package/dist/nobidBidAdapter.js +1 -1
  103. package/dist/not-for-prod/prebid.js +171 -170
  104. package/dist/oguryBidAdapter.js +1 -1
  105. package/dist/onetagBidAdapter.js +1 -1
  106. package/dist/ooloAnalyticsAdapter.js +1 -1
  107. package/dist/openwebBidAdapter.js +1 -1
  108. package/dist/openxBidAdapter.js +1 -1
  109. package/dist/optidigitalBidAdapter.js +1 -1
  110. package/dist/orbidderBidAdapter.js +1 -1
  111. package/dist/outbrainBidAdapter.js +1 -1
  112. package/dist/ozoneBidAdapter.js +1 -1
  113. package/dist/pixfutureBidAdapter.js +1 -1
  114. package/dist/processResponse.js +1 -0
  115. package/dist/publinkIdSystem.js +1 -1
  116. package/dist/publirBidAdapter.js +1 -1
  117. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  118. package/dist/pubmaticBidAdapter.js +1 -1
  119. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  120. package/dist/pxyzBidAdapter.js +1 -1
  121. package/dist/quantcastBidAdapter.js +1 -1
  122. package/dist/readpeakBidAdapter.js +1 -1
  123. package/dist/relaidoBidAdapter.js +1 -1
  124. package/dist/retailspotBidAdapter.js +1 -1
  125. package/dist/rhythmoneBidAdapter.js +1 -1
  126. package/dist/riseBidAdapter.js +1 -1
  127. package/dist/rubiconBidAdapter.js +1 -1
  128. package/dist/seedingAllianceBidAdapter.js +1 -1
  129. package/dist/seedtagBidAdapter.js +1 -1
  130. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  131. package/dist/sharethroughBidAdapter.js +1 -1
  132. package/dist/shinezBidAdapter.js +1 -1
  133. package/dist/shinezRtbBidAdapter.js +1 -1
  134. package/dist/smaatoBidAdapter.js +1 -1
  135. package/dist/smartadserverBidAdapter.js +1 -1
  136. package/dist/smartxBidAdapter.js +1 -1
  137. package/dist/smilewantedBidAdapter.js +1 -1
  138. package/dist/snigelBidAdapter.js +1 -1
  139. package/dist/sonobiBidAdapter.js +1 -1
  140. package/dist/sovrnBidAdapter.js +1 -1
  141. package/dist/sspBCBidAdapter.js +1 -1
  142. package/dist/stnBidAdapter.js +1 -1
  143. package/dist/stvBidAdapter.js +1 -1
  144. package/dist/sublimeBidAdapter.js +1 -1
  145. package/dist/taboolaBidAdapter.js +1 -1
  146. package/dist/tagorasBidAdapter.js +1 -1
  147. package/dist/tappxBidAdapter.js +1 -1
  148. package/dist/targetVideoBidAdapter.js +1 -1
  149. package/dist/teadsBidAdapter.js +1 -1
  150. package/dist/terceptAnalyticsAdapter.js +1 -1
  151. package/dist/themoneytizerBidAdapter.js +1 -1
  152. package/dist/trionBidAdapter.js +1 -1
  153. package/dist/tripleliftBidAdapter.js +1 -1
  154. package/dist/ttdBidAdapter.js +1 -1
  155. package/dist/twistDigitalBidAdapter.js +1 -1
  156. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  157. package/dist/uid2IdSystem.js +1 -1
  158. package/dist/underdogmediaBidAdapter.js +1 -1
  159. package/dist/undertoneBidAdapter.js +1 -1
  160. package/dist/unrulyBidAdapter.js +1 -1
  161. package/dist/viantOrtbBidAdapter.js +1 -1
  162. package/dist/vidazooBidAdapter.js +1 -1
  163. package/dist/vidazooUtils.js +1 -1
  164. package/dist/videobyteBidAdapter.js +1 -1
  165. package/dist/visxBidAdapter.js +1 -1
  166. package/dist/vuukleBidAdapter.js +1 -1
  167. package/dist/widespaceBidAdapter.js +1 -1
  168. package/dist/winrBidAdapter.js +1 -1
  169. package/dist/yahooAdsBidAdapter.js +1 -1
  170. package/dist/yieldmoBidAdapter.js +1 -1
  171. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  172. package/dist/zeta_global_sspBidAdapter.js +1 -1
  173. package/integrationExamples/gpt/x-domain/creative.html +1 -1
  174. package/libraries/processResponse/index.js +12 -0
  175. package/libraries/vidazooUtils/bidderUtils.js +9 -10
  176. package/modules/adagioRtdProvider.js +9 -7
  177. package/modules/adfBidAdapter.js +1 -10
  178. package/modules/carodaBidAdapter.js +3 -8
  179. package/modules/codefuelBidAdapter.js +1 -10
  180. package/modules/cpmstarBidAdapter.js +52 -36
  181. package/modules/cpmstarBidAdapter.md +1 -4
  182. package/modules/dailymotionBidAdapter.js +1 -1
  183. package/modules/deltaprojectsBidAdapter.js +2 -11
  184. package/modules/dianomiBidAdapter.js +1 -9
  185. package/modules/finativeBidAdapter.js +1 -10
  186. package/modules/gridBidAdapter.js +2 -12
  187. package/modules/illuminBidAdapter.js +9 -304
  188. package/modules/kueezRtbBidAdapter.js +17 -312
  189. package/modules/luponmediaBidAdapter.js +4 -10
  190. package/modules/mgidBidAdapter.js +1 -10
  191. package/modules/outbrainBidAdapter.js +8 -43
  192. package/modules/ozoneBidAdapter.js +9 -7
  193. package/modules/shinezRtbBidAdapter.js +12 -304
  194. package/modules/tagorasBidAdapter.js +13 -316
  195. package/modules/twistDigitalBidAdapter.js +9 -422
  196. package/modules/viantOrtbBidAdapter.js +20 -0
  197. package/modules/vidazooBidAdapter.js +3 -3
  198. package/modules/visxBidAdapter.js +27 -29
  199. package/modules/zeta_global_sspBidAdapter.js +2 -2
  200. package/package.json +1 -1
  201. package/src/adRendering.js +29 -2
  202. package/src/constants.js +2 -0
  203. package/src/prebid.js +2 -1
  204. package/src/utils.js +19 -1
  205. package/test/pages/banner_sync.html +97 -0
  206. package/test/spec/creative/crossDomainCreative_spec.js +38 -2
  207. package/test/spec/e2e/banner/basic_banner_ad.spec.js +20 -14
  208. package/test/spec/libraries/processResponse_spec.js +60 -0
  209. package/test/spec/modules/adagioRtdProvider_spec.js +12 -0
  210. package/test/spec/modules/cpmstarBidAdapter_spec.js +1 -1
  211. package/test/spec/modules/dailymotionBidAdapter_spec.js +18 -14
  212. package/test/spec/modules/illuminBidAdapter_spec.js +26 -13
  213. package/test/spec/modules/kueezRtbBidAdapter_spec.js +26 -15
  214. package/test/spec/modules/outbrainBidAdapter_spec.js +32 -1
  215. package/test/spec/modules/shinezRtbBidAdapter_spec.js +26 -14
  216. package/test/spec/modules/tagorasBidAdapter_spec.js +26 -15
  217. package/test/spec/modules/twistDigitalBidAdapter_spec.js +15 -20
  218. package/test/spec/modules/viantOrtbBidAdapter_spec.js +87 -6
  219. package/test/spec/modules/visxBidAdapter_spec.js +180 -0
  220. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +11 -0
  221. package/test/spec/unit/pbjs_api_spec.js +6 -1
package/src/prebid.js CHANGED
@@ -39,7 +39,7 @@ import {newMetrics, useMetrics} from './utils/perfMetrics.js';
39
39
  import {defer, GreedyPromise} from './utils/promise.js';
40
40
  import {enrichFPD} from './fpd/enrichment.js';
41
41
  import {allConsent} from './consentHandler.js';
42
- import {renderAdDirect} from './adRendering.js';
42
+ import {insertLocatorFrame, renderAdDirect} from './adRendering.js';
43
43
  import {getHighestCpm} from './utils/reducers.js';
44
44
  import {fillVideoDefaults} from './video.js';
45
45
 
@@ -976,6 +976,7 @@ function processQueue(queue) {
976
976
  * @alias module:pbjs.processQueue
977
977
  */
978
978
  pbjsInstance.processQueue = function () {
979
+ insertLocatorFrame();
979
980
  hook.ready();
980
981
  processQueue(pbjsInstance.que);
981
982
  processQueue(pbjsInstance.cmd);
package/src/utils.js CHANGED
@@ -4,8 +4,9 @@ import {includes} from './polyfill.js';
4
4
  import { EVENTS, S2S } from './constants.js';
5
5
  import {GreedyPromise} from './utils/promise.js';
6
6
  import {getGlobal} from './prebidGlobal.js';
7
+ import { default as deepAccess } from 'dlv/index.js';
7
8
 
8
- export { default as deepAccess } from 'dlv/index.js';
9
+ export { deepAccess };
9
10
  export { dset as deepSetValue } from 'dset';
10
11
 
11
12
  var tStr = 'String';
@@ -1231,3 +1232,20 @@ export function hasNonSerializableProperty(obj, checkedObjects = new Set()) {
1231
1232
  }
1232
1233
  return false;
1233
1234
  }
1235
+
1236
+ /**
1237
+ * Returns the value of a nested property in an array of objects.
1238
+ *
1239
+ * @param {Array} collection - Array of objects.
1240
+ * @param {String} key - Key of nested property.
1241
+ * @returns {any, undefined} - Value of nested property.
1242
+ */
1243
+ export function setOnAny(collection, key) {
1244
+ for (let i = 0, result; i < collection.length; i++) {
1245
+ result = deepAccess(collection[i], key);
1246
+ if (result) {
1247
+ return result;
1248
+ }
1249
+ }
1250
+ return undefined;
1251
+ }
@@ -0,0 +1,97 @@
1
+ <!-- This is a Test Page for a Banner End-to-End test -->
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+ <meta charset="UTF-8">
7
+ <title>Prebid.js Banner Example</title>
8
+
9
+ <!-- Prebid.js -->
10
+ <script src="http://localhost:4444/bundle?modules=appnexusBidAdapter"></script>
11
+
12
+ <!-- Google Publisher Tag -->
13
+ <script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
14
+
15
+ <script>
16
+ var pbjs = pbjs || {};
17
+ pbjs.que = pbjs.que || [];
18
+
19
+ // Prebid Banner Ad Unit
20
+ const adUnits = [{
21
+ code: 'div-gpt-ad-1460505748561-0',
22
+ mediaTypes: {
23
+ banner: {
24
+ sizes: [[300, 250], [300, 600]],
25
+ }
26
+ },
27
+ bids: [{
28
+ bidder: 'appnexus',
29
+ params: {
30
+ placementId: 13144370
31
+ }
32
+ }]
33
+ }
34
+ ,{
35
+ code: 'div-gpt-ad-1460505748561-1',
36
+ mediaTypes: {
37
+ banner: {
38
+ sizes: [[300, 250], [300, 600]],
39
+ }
40
+ },
41
+ bids: [{
42
+ bidder: "appnexus",
43
+ params: {
44
+ placementId: 13144370
45
+ }
46
+ }]
47
+ }
48
+ ];
49
+ </script>
50
+
51
+ <script>
52
+ var googletag = googletag || {};
53
+ googletag.cmd = googletag.cmd || [];
54
+
55
+ googletag.cmd.push(function() {
56
+ googletag.pubads().disableInitialLoad();
57
+ });
58
+
59
+ pbjs.que.push(function () {
60
+ pbjs.setConfig({enableTIDs: true});
61
+ pbjs.addAdUnits(adUnits);
62
+ pbjs.requestBids({ bidsBackHandler: sendAdServerRequest });
63
+ });
64
+
65
+ function sendAdServerRequest() {
66
+ googletag.cmd.push(function () {
67
+ pbjs.que.push(function () {
68
+ pbjs.setTargetingForGPTAsync('div-gpt-ad-1460505748561-0');
69
+ googletag.pubads().refresh();
70
+ });
71
+ });
72
+ }
73
+ </script>
74
+
75
+ <script>
76
+ googletag.cmd.push(function () {
77
+ googletag
78
+ .defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0')
79
+ .addService(googletag.pubads());
80
+
81
+ googletag.pubads().enableSingleRequest();
82
+ googletag.enableServices();
83
+ });
84
+ </script>
85
+ </head>
86
+
87
+ <body>
88
+ <h2>Prebid.js Banner Ad Unit Test</h2>
89
+ <div id='div-gpt-ad-1460505748561-0'>
90
+ <script>
91
+ googletag.cmd.push(function () { googletag.display('div-gpt-ad-1460505748561-0'); });
92
+ </script>
93
+ </div>
94
+ <div id="targeting-keys"></div>
95
+ </body>
96
+
97
+ </html>
@@ -9,12 +9,18 @@ import {
9
9
 
10
10
  describe('cross-domain creative', () => {
11
11
  const ORIGIN = 'https://example.com';
12
- let win, renderAd, messages, mkIframe;
12
+ let win, top, renderAd, messages, mkIframe;
13
13
 
14
14
  beforeEach(() => {
15
15
  messages = [];
16
16
  mkIframe = sinon.stub();
17
+ top = {
18
+ frames: {}
19
+ };
20
+ top.top = top;
17
21
  win = {
22
+ top,
23
+ frames: {},
18
24
  document: {
19
25
  body: {
20
26
  appendChild: sinon.stub(),
@@ -30,12 +36,14 @@ describe('cross-domain creative', () => {
30
36
  })
31
37
  },
32
38
  parent: {
39
+ parent: top,
40
+ frames: {'__pb_locator__': {}},
33
41
  postMessage: sinon.stub().callsFake((payload, targetOrigin, transfer) => {
34
42
  messages.push({payload: JSON.parse(payload), targetOrigin, transfer});
35
43
  })
36
44
  }
37
45
  };
38
- renderAd = renderer(win);
46
+ renderAd = (...args) => renderer(win)(...args);
39
47
  })
40
48
 
41
49
  function waitFor(predicate, timeout = 1000) {
@@ -64,6 +72,34 @@ describe('cross-domain creative', () => {
64
72
  expect(messages[0].targetOrigin).to.eql('https://domain.com:123')
65
73
  });
66
74
 
75
+ it('posts to first parent if no __pb_locator__ can be found', () => {
76
+ delete win.parent.frames['__pb_locator__'];
77
+ renderAd({pubUrl: 'https://www.example.com'});
78
+ expect(messages.length).to.eql(1);
79
+ })
80
+
81
+ describe('when there are multiple ancestors', () => {
82
+ let target;
83
+ beforeEach(() => {
84
+ target = win.parent;
85
+ win.parent = {
86
+ top,
87
+ frames: {},
88
+ parent: {
89
+ ...target,
90
+ parent: {
91
+ frames: {'__pb_locator__': {}},
92
+ top
93
+ }
94
+ }
95
+ }
96
+ })
97
+ it('posts message to the first ancestor with __pb_locator__ child', () => {
98
+ renderAd({pubUrl: 'https://www.example.com'});
99
+ expect(messages.length).to.eql(1);
100
+ });
101
+ })
102
+
67
103
  it('generates request message with adId and clickUrl', () => {
68
104
  renderAd({adId: '123', clickUrl: 'https://click-url.com', pubUrl: ORIGIN});
69
105
  expect(messages[0].payload).to.eql({
@@ -2,6 +2,7 @@ const expect = require('chai').expect;
2
2
  const {setupTest, testPageURL} = require('../../../helpers/testing-utils');
3
3
 
4
4
  const TEST_PAGE_URL = testPageURL('banner.html?pbjs_debug=true');
5
+ const SYNC_PAGE_URL = testPageURL('banner_sync.html?pbjs_debug=true');
5
6
  const CREATIVE_IFRAME_ID = 'google_ads_iframe_/19968336/header-bid-tag-0_0';
6
7
  const CREATIVE_IFRAME_CSS_SELECTOR = 'iframe[id="' + CREATIVE_IFRAME_ID + '"]';
7
8
 
@@ -14,20 +15,25 @@ const EXPECTED_TARGETING_KEYS = {
14
15
  'hb_bidder_appnexus': 'appnexus'
15
16
  };
16
17
 
17
- setupTest({
18
- url: TEST_PAGE_URL,
19
- waitFor: CREATIVE_IFRAME_CSS_SELECTOR,
20
- expectGAMCreative: true
21
- }, 'Prebid.js Banner Ad Unit Test', function () {
22
- it('should load the targeting keys with correct values', async function () {
23
- const result = await browser.execute(function () {
24
- return window.pbjs.getAdserverTargeting('div-gpt-ad-1460505748561-1');
25
- });
26
- const targetingKeys = result['div-gpt-ad-1460505748561-1'];
18
+ Object.entries({
19
+ 'synchronously': SYNC_PAGE_URL,
20
+ 'asynchronously': TEST_PAGE_URL,
21
+ }).forEach(([t, testPage]) => {
22
+ setupTest({
23
+ url: testPage,
24
+ waitFor: CREATIVE_IFRAME_CSS_SELECTOR,
25
+ expectGAMCreative: true
26
+ }, `Prebid.js Banner Ad Unit Test (loading ${t})`, function () {
27
+ it('should load the targeting keys with correct values', async function () {
28
+ const result = await browser.execute(function () {
29
+ return window.pbjs.getAdserverTargeting('div-gpt-ad-1460505748561-1');
30
+ });
31
+ const targetingKeys = result['div-gpt-ad-1460505748561-1'];
27
32
 
28
- expect(targetingKeys).to.include(EXPECTED_TARGETING_KEYS);
29
- expect(targetingKeys.hb_adid).to.be.a('string');
30
- expect(targetingKeys.hb_adid_appnexus).to.be.a('string');
31
- expect(targetingKeys.hb_size).to.satisfy((size) => size === '300x250' || '300x600');
33
+ expect(targetingKeys).to.include(EXPECTED_TARGETING_KEYS);
34
+ expect(targetingKeys.hb_adid).to.be.a('string');
35
+ expect(targetingKeys.hb_adid_appnexus).to.be.a('string');
36
+ expect(targetingKeys.hb_size).to.satisfy((size) => size === '300x250' || '300x600');
37
+ });
32
38
  });
33
39
  });
@@ -0,0 +1,60 @@
1
+ import { getBidFromResponse } from '../../../libraries/processResponse/index.js';
2
+ import {expect} from 'chai/index.js';
3
+
4
+ describe('processResponse', function () {
5
+ const respItem = {
6
+ 'bid': [
7
+ {
8
+ 'price': 0.504,
9
+ 'ext': {
10
+ 'visx': {
11
+ 'events': {
12
+ 'runtime': '//t.visx.net/track/status/RFTFjZflStSUyuXuyT2IKOZMVPUIiPkzebpPWYwKvNkE_IybYfFxk2P5feBnt9LhiR7291KTG11JjrnyHyhVKfolH_VRCmGppbnHXHfHJ9AgNqjhFB_yTg3m18wGO9k4LOddGAg3mk8qc5zYEIzNsPFnZzos1EkHh5WNs0EjrBpwCgTERUqM3PJD_Zy60nMDA-LCuq-Z4JNBGC_GHx4LwvwXipQsjdGHS-HkqHHf9sES45OlRrW4wMf69dsmey1gvwqFAhJwii2lzo9wfOohLCMRa3Vxd-zvzx-uw71maWOyKnJXWiP6c5xkyrfV4gukNYaDUgrHc0mA0yhqyiHxe8KzEl32rxQXJRCg4FoJcJ1g9jmpZQBnIh2QrKm5iC159elwzwf31_v3Uw97Zpek8j0CCLa8FjxSjvXm1Mq8x4jcwlt0ngfWU6WwyyKwX_GMbKWuAL_nrfxSvs1hZCb4eunEFyXb2lN2olWo8ezMEzZ8YRxF_mx0hDB3NXyV0Tb4b6KXQq7tvxV-1rKPRt7DySRTbLPht0hO3mjTHxutfihnuL6ROEr372gSAiDodnbdCq_lPsCsUSEpG7DmN-4In10uSp2MemjfbqI6tllOCO-j6Pm9mhdl_rT4anHmRG2DG_dLsfD7pLaAsgf2zl2bpawhxxLVjTxikoWjNKAvr_GNh4adHGj5EHbqaBaHovB573Yk-koHkyBNrebeiy-1-Knc28MWOpFi9XKjNsXx756jAXLx2H098ptaXF3mFiuT2Iv6sTVjqOI/{STATUS_CODE}'
13
+ }
14
+ },
15
+ 'prebid': {
16
+ 'events': {
17
+ 'pending': '//t.visx.net/track/pending/RFTFjZflStSUyuXuyT2IKOZMVPUIiPkzebpPWYwKvNkE_IybYfFxk2P5feBnt9LhiR7291KTG11JjrnyHyhVKfolH_VRCmGppbnHXHfHJ9AgNqjhFB_yTg3m18wGO9k4LOddGAg3mk8qc5zYEIzNsPFnZzos1EkHh5WNs0EjrBpwCgTERUqM3PJD_Zy60nMDA-LCuq-Z4JNBGC_GHx4LwvwXipQsjdGHS-HkqHHf9sES45OlRrW4wMf69dsmey1gvwqFAhJwii2lzo9wfOohLCMRa3Vxd-zvzx-uw71maWOyKnJXWiP6c5xkyrfV4gukNYaDUgrHc0mA0yhqyiHxe8KzEl32rxQXJRCg4FoJcJ1g9jmpZQBnIh2QrKm5iC159elwzwf31_v3Uw97Zpek8j0CCLa8FjxSjvXm1Mq8x4jcwlt0ngfWU6WwyyKwX_GMbKWuAL_nrfxSvs1hZCb4eunEFyXb2lN2olWo8ezMEzZ8YRxF_mx0hDB3NXyV0Tb4b6KXQq7tvxV-1rKPRt7DySRTbLPht0hO3mjTHxutfihnuL6ROEr372gSAiDodnbdCq_lPsCsUSEpG7DmN-4In10uSp2MemjfbqI6tllOCO-j6Pm9mhdl_rT4anHmRG2DG_dLsfD7pLaAsgf2zl2bpawhxxLVjTxikoWjNKAvr_GNh4adHGj5EHbqaBaHovB573Yk-koHkyBNrebeiy-1-Knc28MWOpFi9XKjNsXx756jAXLx2H098ptaXF3mFiuT2Iv6sTVjqOI/',
18
+ 'win': '//t.visx.net/track/win/RFTFjZflStSUyuXuyT2IKOZMVPUIiPkzebpPWYwKvNkE_IybYfFxk2P5feBnt9LhiR7291KTG11JjrnyHyhVKfolH_VRCmGppbnHXHfHJ9AgNqjhFB_yTg3m18wGO9k4LOddGAg3mk8qc5zYEIzNsPFnZzos1EkHh5WNs0EjrBpwCgTERUqM3PJD_Zy60nMDA-LCuq-Z4JNBGC_GHx4LwvwXipQsjdGHS-HkqHHf9sES45OlRrW4wMf69dsmey1gvwqFAhJwii2lzo9wfOohLCMRa3Vxd-zvzx-uw71maWOyKnJXWiP6c5xkyrfV4gukNYaDUgrHc0mA0yhqyiHxe8KzEl32rxQXJRCg4FoJcJ1g9jmpZQBnIh2QrKm5iC159elwzwf31_v3Uw97Zpek8j0CCLa8FjxSjvXm1Mq8x4jcwlt0ngfWU6WwyyKwX_GMbKWuAL_nrfxSvs1hZCb4eunEFyXb2lN2olWo8ezMEzZ8YRxF_mx0hDB3NXyV0Tb4b6KXQq7tvxV-1rKPRt7DySRTbLPht0hO3mjTHxutfihnuL6ROEr372gSAiDodnbdCq_lPsCsUSEpG7DmN-4In10uSp2MemjfbqI6tllOCO-j6Pm9mhdl_rT4anHmRG2DG_dLsfD7pLaAsgf2zl2bpawhxxLVjTxikoWjNKAvr_GNh4adHGj5EHbqaBaHovB573Yk-koHkyBNrebeiy-1-Knc28MWOpFi9XKjNsXx756jAXLx2H098ptaXF3mFiuT2Iv6sTVjqOI/',
19
+ 'bid_timeout': '//t.visx.net/track/bid_timeout/RFTFjZflStSUyuXuyT2IKOZMVPUIiPkzebpPWYwKvNkE_IybYfFxk2P5feBnt9LhiR7291KTG11JjrnyHyhVKfolH_VRCmGppbnHXHfHJ9AgNqjhFB_yTg3m18wGO9k4LOddGAg3mk8qc5zYEIzNsPFnZzos1EkHh5WNs0EjrBpwCgTERUqM3PJD_Zy60nMDA-LCuq-Z4JNBGC_GHx4LwvwXipQsjdGHS-HkqHHf9sES45OlRrW4wMf69dsmey1gvwqFAhJwii2lzo9wfOohLCMRa3Vxd-zvzx-uw71maWOyKnJXWiP6c5xkyrfV4gukNYaDUgrHc0mA0yhqyiHxe8KzEl32rxQXJRCg4FoJcJ1g9jmpZQBnIh2QrKm5iC159elwzwf31_v3Uw97Zpek8j0CCLa8FjxSjvXm1Mq8x4jcwlt0ngfWU6WwyyKwX_GMbKWuAL_nrfxSvs1hZCb4eunEFyXb2lN2olWo8ezMEzZ8YRxF_mx0hDB3NXyV0Tb4b6KXQq7tvxV-1rKPRt7DySRTbLPht0hO3mjTHxutfihnuL6ROEr372gSAiDodnbdCq_lPsCsUSEpG7DmN-4In10uSp2MemjfbqI6tllOCO-j6Pm9mhdl_rT4anHmRG2DG_dLsfD7pLaAsgf2zl2bpawhxxLVjTxikoWjNKAvr_GNh4adHGj5EHbqaBaHovB573Yk-koHkyBNrebeiy-1-Knc28MWOpFi9XKjNsXx756jAXLx2H098ptaXF3mFiuT2Iv6sTVjqOI/',
20
+ 'runtime': '//t.visx.net/track/status/RFTFjZflStSUyuXuyT2IKOZMVPUIiPkzebpPWYwKvNkE_IybYfFxk2P5feBnt9LhiR7291KTG11JjrnyHyhVKfolH_VRCmGppbnHXHfHJ9AgNqjhFB_yTg3m18wGO9k4LOddGAg3mk8qc5zYEIzNsPFnZzos1EkHh5WNs0EjrBpwCgTERUqM3PJD_Zy60nMDA-LCuq-Z4JNBGC_GHx4LwvwXipQsjdGHS-HkqHHf9sES45OlRrW4wMf69dsmey1gvwqFAhJwii2lzo9wfOohLCMRa3Vxd-zvzx-uw71maWOyKnJXWiP6c5xkyrfV4gukNYaDUgrHc0mA0yhqyiHxe8KzEl32rxQXJRCg4FoJcJ1g9jmpZQBnIh2QrKm5iC159elwzwf31_v3Uw97Zpek8j0CCLa8FjxSjvXm1Mq8x4jcwlt0ngfWU6WwyyKwX_GMbKWuAL_nrfxSvs1hZCb4eunEFyXb2lN2olWo8ezMEzZ8YRxF_mx0hDB3NXyV0Tb4b6KXQq7tvxV-1rKPRt7DySRTbLPht0hO3mjTHxutfihnuL6ROEr372gSAiDodnbdCq_lPsCsUSEpG7DmN-4In10uSp2MemjfbqI6tllOCO-j6Pm9mhdl_rT4anHmRG2DG_dLsfD7pLaAsgf2zl2bpawhxxLVjTxikoWjNKAvr_GNh4adHGj5EHbqaBaHovB573Yk-koHkyBNrebeiy-1-Knc28MWOpFi9XKjNsXx756jAXLx2H098ptaXF3mFiuT2Iv6sTVjqOI/{STATUS_CODE}'
21
+ },
22
+ 'meta': {
23
+ 'mediaType': 'banner'
24
+ }
25
+ }
26
+ },
27
+ 'impid': '2b642c27bdcf8f',
28
+ 'auid': 929004,
29
+ 'h': 250,
30
+ 'cur': 'EUR',
31
+ 'adomain': [
32
+ ''
33
+ ],
34
+ 'w': 300,
35
+ 'id': '9b6c7e04-0a09-4add-8ba9-0c8b98304de3'
36
+ }
37
+ ],
38
+ 'seat': '1429601'
39
+ };
40
+ const LOG_ERROR_MESS = {
41
+ 'noAuid': 'Bid from response has no auid parameter - ',
42
+ 'noAdm': 'Bid from response has no adm parameter - ',
43
+ 'noBid': 'Array of bid objects is empty',
44
+ 'noImpId': 'Bid from response has no impid parameter - ',
45
+ 'noPlacementCode': 'Can\'t find in requested bids the bid with auid - ',
46
+ 'emptyUids': 'Uids should not be empty',
47
+ 'emptySeatbid': 'Seatbid array from response has an empty item',
48
+ 'emptyResponse': 'Response is empty',
49
+ 'hasEmptySeatbidArray': 'Response has empty seatbid array',
50
+ 'hasNoArrayOfBids': 'Seatbid from response has no array of bid objects - ',
51
+ 'notAllowedCurrency': 'Currency is not supported - ',
52
+ 'currencyMismatch': 'Currency from the request is not match currency from the response - ',
53
+ 'onlyVideoInstream': 'Only video instream supported',
54
+ 'videoMissing': 'Bid request videoType property is missing - '
55
+ };
56
+ it('returns bid when respItem and LOG_ERROR_MESS is passed', function () {
57
+ let response = getBidFromResponse(respItem, LOG_ERROR_MESS);
58
+ expect(response).not.include.any.keys('emptyResponse', 'hasNoArrayOfBids', 'emptySeatbid');
59
+ });
60
+ });
@@ -436,6 +436,18 @@ describe('Adagio Rtd Provider', function () {
436
436
  expect(bidRequest.adUnits[0]).to.have.property('ortb2Imp');
437
437
  expect(bidRequest.adUnits[0].ortb2Imp.ext.data.placement).to.not.exist;
438
438
  });
439
+
440
+ it('ensure we create the `ortb2Imp` object if it does not exist', function() {
441
+ const configCopy = utils.deepClone(config);
442
+ configCopy.params.placementSource = PLACEMENT_SOURCES.ADUNITCODE;
443
+
444
+ const bidRequest = utils.deepClone(bidReqConfig);
445
+ delete bidRequest.adUnits[0].ortb2Imp;
446
+
447
+ adagioRtdSubmodule.getBidRequestData(bidRequest, cb, configCopy);
448
+ expect(bidRequest.adUnits[0]).to.have.property('ortb2Imp');
449
+ expect(bidRequest.adUnits[0].ortb2Imp.ext.data.placement).to.equal('div-gpt-ad-1460505748561-0');
450
+ });
439
451
  });
440
452
  });
441
453
 
@@ -149,7 +149,7 @@ describe('Cpmstar Bid Adapter', function () {
149
149
  };
150
150
  var requests = spec.buildRequests(reqs, bidderRequest);
151
151
  expect(requests[0]).to.have.property('url');
152
- expect(requests[0].url).to.include('&schain=1.0,1!exchange1.com,1234,1,,,!exchange2.com,abcd,1,,,');
152
+ expect(requests[0].url).to.include('&schain=1.0%2C1%21exchange1.com%2C1234%2C1%2C%2C%2C%21exchange2.com%2Cabcd%2C1%2C%2C%2C');
153
153
  });
154
154
 
155
155
  describe('interpretResponse', function () {
@@ -647,7 +647,7 @@ describe('dailymotionBidAdapterTests', () => {
647
647
 
648
648
  // No permissions
649
649
  {
650
- const responses = [{ user_syncs: [{ url: 'https://usersyncurl.com', type: 'image' }] }];
650
+ const responses = [{ body: { userSyncs: [{ url: 'https://usersyncurl.com', type: 'image' }] } }];
651
651
  const syncOptions = { iframeEnabled: false, pixelEnabled: false };
652
652
 
653
653
  expect(config.runWithBidder(
@@ -656,7 +656,7 @@ describe('dailymotionBidAdapterTests', () => {
656
656
  )).to.eql([]);
657
657
  }
658
658
 
659
- // Has permissions but no user_syncs urls
659
+ // Has permissions but no userSyncs urls
660
660
  {
661
661
  const responses = [{}];
662
662
  const syncOptions = { iframeEnabled: false, pixelEnabled: true };
@@ -667,14 +667,16 @@ describe('dailymotionBidAdapterTests', () => {
667
667
  )).to.eql([]);
668
668
  }
669
669
 
670
- // Return user_syncs urls for pixels
670
+ // Return userSyncs urls for pixels
671
671
  {
672
672
  const responses = [{
673
- user_syncs: [
674
- { url: 'https://usersyncurl.com', type: 'image' },
675
- { url: 'https://usersyncurl2.com', type: 'image' },
676
- { url: 'https://usersyncurl3.com', type: 'iframe' }
677
- ],
673
+ body: {
674
+ userSyncs: [
675
+ { url: 'https://usersyncurl.com', type: 'image' },
676
+ { url: 'https://usersyncurl2.com', type: 'image' },
677
+ { url: 'https://usersyncurl3.com', type: 'iframe' }
678
+ ],
679
+ }
678
680
  }];
679
681
 
680
682
  const syncOptions = { iframeEnabled: false, pixelEnabled: true };
@@ -688,14 +690,16 @@ describe('dailymotionBidAdapterTests', () => {
688
690
  ]);
689
691
  }
690
692
 
691
- // Return user_syncs urls for iframes
693
+ // Return userSyncs urls for iframes
692
694
  {
693
695
  const responses = [{
694
- user_syncs: [
695
- { url: 'https://usersyncurl.com', type: 'image' },
696
- { url: 'https://usersyncurl2.com', type: 'image' },
697
- { url: 'https://usersyncurl3.com', type: 'iframe' }
698
- ],
696
+ body: {
697
+ userSyncs: [
698
+ { url: 'https://usersyncurl.com', type: 'image' },
699
+ { url: 'https://usersyncurl2.com', type: 'image' },
700
+ { url: 'https://usersyncurl3.com', type: 'iframe' }
701
+ ],
702
+ }
699
703
  }];
700
704
 
701
705
  const syncOptions = { iframeEnabled: true, pixelEnabled: true };
@@ -2,6 +2,14 @@ import {expect} from 'chai';
2
2
  import {
3
3
  spec as adapter,
4
4
  createDomain,
5
+ storage
6
+ } from 'modules/illuminBidAdapter.js';
7
+ import * as utils from 'src/utils.js';
8
+ import {version} from 'package.json';
9
+ import {useFakeTimers} from 'sinon';
10
+ import {BANNER, VIDEO} from '../../../src/mediaTypes';
11
+ import {config} from '../../../src/config';
12
+ import {
5
13
  hashCode,
6
14
  extractPID,
7
15
  extractCID,
@@ -10,12 +18,7 @@ import {
10
18
  setStorageItem,
11
19
  tryParseJSON,
12
20
  getUniqueDealId,
13
- } from 'modules/illuminBidAdapter.js';
14
- import * as utils from 'src/utils.js';
15
- import {version} from 'package.json';
16
- import {useFakeTimers} from 'sinon';
17
- import {BANNER, VIDEO} from '../../../src/mediaTypes';
18
- import {config} from '../../../src/config';
21
+ } from '../../../libraries/vidazooUtils/bidderUtils.js';
19
22
 
20
23
  export const TEST_ID_SYSTEMS = ['criteoId', 'id5id', 'idl_env', 'lipb', 'netId', 'pubcid', 'tdid', 'pubProvidedId'];
21
24
 
@@ -325,7 +328,12 @@ describe('IlluminBidAdapter', function () {
325
328
  startdelay: 0
326
329
  }
327
330
  },
328
- gpid: '0123456789'
331
+ gpid: '0123456789',
332
+ cat: [],
333
+ contentData: [],
334
+ isStorageAllowed: true,
335
+ pagecat: [],
336
+ userData: []
329
337
  }
330
338
  });
331
339
  });
@@ -387,6 +395,11 @@ describe('IlluminBidAdapter', function () {
387
395
  uqs: getTopWindowQueryParams(),
388
396
  'ext.param1': 'loremipsum',
389
397
  'ext.param2': 'dolorsitamet',
398
+ cat: [],
399
+ contentData: [],
400
+ isStorageAllowed: true,
401
+ pagecat: [],
402
+ userData: []
390
403
  }
391
404
  });
392
405
  });
@@ -562,13 +575,13 @@ describe('IlluminBidAdapter', function () {
562
575
  const key = 'myKey';
563
576
  let uniqueDealId;
564
577
  beforeEach(() => {
565
- uniqueDealId = getUniqueDealId(key, 0);
578
+ uniqueDealId = getUniqueDealId(storage, key, 0);
566
579
  })
567
580
 
568
581
  it('should get current unique deal id', function (done) {
569
582
  // waiting some time so `now` will become past
570
583
  setTimeout(() => {
571
- const current = getUniqueDealId(key);
584
+ const current = getUniqueDealId(storage, key);
572
585
  expect(current).to.be.equal(uniqueDealId);
573
586
  done();
574
587
  }, 200);
@@ -576,7 +589,7 @@ describe('IlluminBidAdapter', function () {
576
589
 
577
590
  it('should get new unique deal id on expiration', function (done) {
578
591
  setTimeout(() => {
579
- const current = getUniqueDealId(key, 100);
592
+ const current = getUniqueDealId(storage, key, 100);
580
593
  expect(current).to.not.be.equal(uniqueDealId);
581
594
  done();
582
595
  }, 200)
@@ -600,8 +613,8 @@ describe('IlluminBidAdapter', function () {
600
613
  shouldAdvanceTime: true,
601
614
  now
602
615
  });
603
- setStorageItem('myKey', 2020);
604
- const {value, created} = getStorageItem('myKey');
616
+ setStorageItem(storage, 'myKey', 2020);
617
+ const {value, created} = getStorageItem(storage, 'myKey');
605
618
  expect(created).to.be.equal(now);
606
619
  expect(value).to.be.equal(2020);
607
620
  expect(typeof value).to.be.equal('number');
@@ -612,7 +625,7 @@ describe('IlluminBidAdapter', function () {
612
625
  it('should get external stored value', function () {
613
626
  const value = 'superman'
614
627
  window.localStorage.setItem('myExternalKey', value);
615
- const item = getStorageItem('myExternalKey');
628
+ const item = getStorageItem(storage, 'myExternalKey');
616
629
  expect(item).to.be.equal(value);
617
630
  });
618
631
 
@@ -2,6 +2,14 @@ import {expect} from 'chai';
2
2
  import {
3
3
  spec as adapter,
4
4
  createDomain,
5
+ storage
6
+ } from 'modules/kueezRtbBidAdapter.js';
7
+ import * as utils from 'src/utils.js';
8
+ import {version} from 'package.json';
9
+ import {useFakeTimers} from 'sinon';
10
+ import {BANNER, VIDEO} from '../../../src/mediaTypes';
11
+ import {config} from '../../../src/config';
12
+ import {
5
13
  hashCode,
6
14
  extractPID,
7
15
  extractCID,
@@ -10,12 +18,7 @@ import {
10
18
  setStorageItem,
11
19
  tryParseJSON,
12
20
  getUniqueDealId,
13
- } from 'modules/kueezRtbBidAdapter.js';
14
- import * as utils from 'src/utils.js';
15
- import {version} from 'package.json';
16
- import {useFakeTimers} from 'sinon';
17
- import {BANNER, VIDEO} from '../../../src/mediaTypes';
18
- import {config} from '../../../src/config';
21
+ } from '../../../libraries/vidazooUtils/bidderUtils.js';
19
22
 
20
23
  export const TEST_ID_SYSTEMS = ['britepoolid', 'criteoId', 'id5id', 'idl_env', 'lipb', 'netId', 'parrableId', 'pubcid', 'tdid', 'pubProvidedId'];
21
24
 
@@ -322,7 +325,12 @@ describe('KueezRtbBidAdapter', function () {
322
325
  startdelay: 0
323
326
  }
324
327
  },
325
- gpid: ''
328
+ gpid: '',
329
+ cat: [],
330
+ contentData: [],
331
+ isStorageAllowed: true,
332
+ pagecat: [],
333
+ userData: []
326
334
  }
327
335
  });
328
336
  });
@@ -384,6 +392,11 @@ describe('KueezRtbBidAdapter', function () {
384
392
  uqs: getTopWindowQueryParams(),
385
393
  'ext.param1': 'loremipsum',
386
394
  'ext.param2': 'dolorsitamet',
395
+ cat: [],
396
+ contentData: [],
397
+ isStorageAllowed: true,
398
+ pagecat: [],
399
+ userData: []
387
400
  }
388
401
  });
389
402
  });
@@ -526,8 +539,6 @@ describe('KueezRtbBidAdapter', function () {
526
539
  switch (idSystemProvider) {
527
540
  case 'lipb':
528
541
  return {lipbid: id};
529
- case 'parrableId':
530
- return {eid: id};
531
542
  case 'id5id':
532
543
  return {uid: id};
533
544
  default:
@@ -580,13 +591,13 @@ describe('KueezRtbBidAdapter', function () {
580
591
  const key = 'myKey';
581
592
  let uniqueDealId;
582
593
  beforeEach(() => {
583
- uniqueDealId = getUniqueDealId(key, 0);
594
+ uniqueDealId = getUniqueDealId(storage, key, 0);
584
595
  })
585
596
 
586
597
  it('should get current unique deal id', function (done) {
587
598
  // waiting some time so `now` will become past
588
599
  setTimeout(() => {
589
- const current = getUniqueDealId(key);
600
+ const current = getUniqueDealId(storage, key);
590
601
  expect(current).to.be.equal(uniqueDealId);
591
602
  done();
592
603
  }, 200);
@@ -594,7 +605,7 @@ describe('KueezRtbBidAdapter', function () {
594
605
 
595
606
  it('should get new unique deal id on expiration', function (done) {
596
607
  setTimeout(() => {
597
- const current = getUniqueDealId(key, 100);
608
+ const current = getUniqueDealId(storage, key, 100);
598
609
  expect(current).to.not.be.equal(uniqueDealId);
599
610
  done();
600
611
  }, 200)
@@ -618,8 +629,8 @@ describe('KueezRtbBidAdapter', function () {
618
629
  shouldAdvanceTime: true,
619
630
  now
620
631
  });
621
- setStorageItem('myKey', 2020);
622
- const {value, created} = getStorageItem('myKey');
632
+ setStorageItem(storage, 'myKey', 2020);
633
+ const {value, created} = getStorageItem(storage, 'myKey');
623
634
  expect(created).to.be.equal(now);
624
635
  expect(value).to.be.equal(2020);
625
636
  expect(typeof value).to.be.equal('number');
@@ -630,7 +641,7 @@ describe('KueezRtbBidAdapter', function () {
630
641
  it('should get external stored value', function () {
631
642
  const value = 'superman'
632
643
  window.localStorage.setItem('myExternalKey', value);
633
- const item = getStorageItem('myExternalKey');
644
+ const item = getStorageItem(storage, 'myExternalKey');
634
645
  expect(item).to.be.equal(value);
635
646
  });
636
647