1
1
import { getAdServerTargeting } from 'test/fixtures/fixtures' ;
2
+ import { expect } from 'chai' ;
2
3
3
4
var assert = require ( 'assert' ) ;
4
5
var utils = require ( 'src/utils' ) ;
@@ -720,10 +721,11 @@ describe('Utils', function () {
720
721
expect ( topWindowLocation . href ) . to . equal ( 'https://www.google.com/a/umich.edu/acs' ) ;
721
722
expect ( topWindowLocation . protocol ) . to . equal ( 'https' ) ;
722
723
expect ( topWindowLocation . hostname ) . to . equal ( 'www.google.com' ) ;
723
- expect ( topWindowLocation . port ) . to . equal ( 0 ) ;
724
724
expect ( topWindowLocation . hash ) . to . equal ( '' ) ;
725
725
expect ( topWindowLocation . search ) . to . equal ( '' ) ;
726
- expect ( topWindowLocation . host ) . to . equal ( 'www.google.com' ) ;
726
+ // note IE11 returns the default secure port, so we look for this alternate value as well in these tests
727
+ expect ( topWindowLocation . port ) . to . be . oneOf ( [ 0 , 443 ] ) ;
728
+ expect ( topWindowLocation . host ) . to . be . oneOf ( [ 'www.google.com' , 'www.google.com:443' ] ) ;
727
729
} ) ;
728
730
729
731
it ( 'returns parsed referrer string if in iFrame but no ancestorOrigins' , ( ) => {
@@ -740,11 +742,12 @@ describe('Utils', function () {
740
742
expect ( topWindowLocation . href ) . to . equal ( 'https://www.example.com/' ) ;
741
743
expect ( topWindowLocation . protocol ) . to . equal ( 'https' ) ;
742
744
expect ( topWindowLocation . hostname ) . to . equal ( 'www.example.com' ) ;
743
- expect ( topWindowLocation . port ) . to . equal ( 0 ) ;
744
745
expect ( topWindowLocation . pathname ) . to . equal ( '/' ) ;
745
746
expect ( topWindowLocation . hash ) . to . equal ( '' ) ;
746
747
expect ( topWindowLocation . search ) . to . equal ( '' ) ;
747
- expect ( topWindowLocation . host ) . to . equal ( 'www.example.com' ) ;
748
+ // note IE11 returns the default secure port, so we look for this alternate value as well in these tests
749
+ expect ( topWindowLocation . port ) . to . be . oneOf ( [ 0 , 443 ] ) ;
750
+ expect ( topWindowLocation . host ) . to . be . oneOf ( [ 'www.example.com' , 'www.example.com:443' ] ) ;
748
751
} ) ;
749
752
} ) ;
750
753
} ) ;
0 commit comments