@@ -40,7 +40,8 @@ const sampleBidderRequest = {
40
40
auctionId : utils . getUniqueIdentifierStr ( ) ,
41
41
uspConsent : '1YYY' ,
42
42
refererInfo : {
43
- referer : 'https://www.prebid.org' ,
43
+ location : 'https://www.prebid.org' ,
44
+ topmostLocation : 'https://www.prebid.org' ,
44
45
canonicalUrl : 'https://www.prebid.org/the/link/to/the/page'
45
46
} ,
46
47
ortb2 : sampleFPD
@@ -227,35 +228,22 @@ describe('AmxBidAdapter', () => {
227
228
const { data } = spec . buildRequests ( [ sampleBidRequestBase ] , {
228
229
...sampleBidderRequest ,
229
230
refererInfo : {
230
- numIframes : 1 ,
231
- referer : 'http://search-traffic-source.com' ,
232
- stack : [ ]
231
+ location : null ,
232
+ topmostLocation : null ,
233
+ ref : 'http://search-traffic-source.com' ,
233
234
}
234
235
} ) ;
235
236
expect ( data . do ) . to . equal ( 'localhost' )
236
237
expect ( data . re ) . to . equal ( 'http://search-traffic-source.com' ) ;
237
238
} ) ;
238
239
239
- it ( 'if we are in AMP, make sure we use the canonical URL or the referrer (which is sourceUrl)' , ( ) => {
240
- const { data } = spec . buildRequests ( [ sampleBidRequestBase ] , {
241
- ...sampleBidderRequest ,
242
- refererInfo : {
243
- isAmp : true ,
244
- referer : 'http://real-publisher-site.com/content' ,
245
- stack : [ ]
246
- }
247
- } ) ;
248
- expect ( data . do ) . to . equal ( 'real-publisher-site.com' )
249
- expect ( data . re ) . to . equal ( 'http://real-publisher-site.com/content' ) ;
250
- } )
251
-
252
240
it ( 'if prebid is in an iframe, will use the topmost url as domain' , ( ) => {
253
241
const { data } = spec . buildRequests ( [ sampleBidRequestBase ] , {
254
242
...sampleBidderRequest ,
255
243
refererInfo : {
256
- numIframes : 1 ,
257
- referer : 'http://search-traffic-source .com' ,
258
- stack : [ 'http://top-site .com' , 'http://iframe.com' ]
244
+ location : null ,
245
+ topmostLocation : 'http://top-site .com' ,
246
+ ref : 'http://search-traffic-source .com' ,
259
247
}
260
248
} ) ;
261
249
expect ( data . do ) . to . equal ( 'top-site.com' ) ;
0 commit comments