@@ -56,6 +56,7 @@ export enum BrowserUserAgent {
5656 ChromeAndroidSupported = "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/42 Mobile Safari/535.19" ,
5757 ChromeWindowsSupported = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2228.0 Safari/537.36" ,
5858 ChromeMacSupported = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.1636.0 Safari/537.36" ,
59+ ChromeMacSupported69 = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36" ,
5960 ChromeLinuxSupported = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.1636.0 Safari/537.36" ,
6061 ChromeTabletSupported = "Mozilla/5.0 (Linux; Android 4.3; Nexus 10 Build/JWR66Y) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.1547.72 Safari/537.36" ,
6162 ChromeAndroidUnsupported = "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/41 Mobile Safari/535.19" ,
@@ -166,10 +167,13 @@ export class TestEnvironment {
166167 if ( ! config )
167168 config = { } ;
168169 let url : string | undefined = undefined ;
170+ let isSecureContext : boolean | undefined = undefined ;
169171 if ( config . httpOrHttps == HttpHttpsEnvironment . Http ) {
170172 url = 'http://localhost:3000/webpush/sandbox?http=1' ;
173+ isSecureContext = false ;
171174 } else {
172175 url = 'https://localhost:3001/webpush/sandbox?https=1' ;
176+ isSecureContext = true ;
173177 }
174178 if ( config . url ) {
175179 url = config . url . toString ( ) ;
@@ -212,6 +216,7 @@ export class TestEnvironment {
212216 const { TextEncoder, TextDecoder } = require ( 'text-encoding' ) ;
213217 ( windowDef as any ) . TextEncoder = TextEncoder ;
214218 ( windowDef as any ) . TextDecoder = TextDecoder ;
219+ ( windowDef as any ) . isSecureContext = isSecureContext ;
215220 TestEnvironment . addCustomEventPolyfill ( windowDef ) ;
216221
217222 let topWindow = config . initializeAsIframe ? {
0 commit comments