@@ -107,18 +107,51 @@ public async Task ShouldWorkWhenUsingCustomGlobalObjectNameInMultipleBrowsers()
107107 await browser2 . WaitForInitialLoadAsync ( ) ;
108108 await browser3 . WaitForInitialLoadAsync ( ) ;
109109
110- var result1 = await browser1 . EvaluateScriptAsync ( "typeof window.bindingApiObject1 === 'undefined'" ) ;
111- var result2 = await browser2 . EvaluateScriptAsync ( "typeof window.bindingApiObject2 === 'undefined'" ) ;
112- var result3 = await browser3 . EvaluateScriptAsync ( "typeof window.cefSharp === 'undefined'" ) ;
110+ // Assert browser1
111+ {
112+ var result1 = await browser1 . EvaluateScriptAsync ( "typeof window.bindingApiObject1 === 'undefined'" ) ;
113+ var result2 = await browser1 . EvaluateScriptAsync ( "typeof window.bindingApiObject2 === 'undefined'" ) ;
114+ var result3 = await browser1 . EvaluateScriptAsync ( "typeof window.cefSharp === 'undefined'" ) ;
115+
116+ Assert . True ( result1 . Success , result1 . Message ) ;
117+ Assert . False ( ( bool ) result1 . Result ) ;
118+
119+ Assert . True ( result2 . Success , result2 . Message ) ;
120+ Assert . True ( ( bool ) result2 . Result ) ;
121+
122+ Assert . True ( result3 . Success , result3 . Message ) ;
123+ Assert . True ( ( bool ) result3 . Result ) ;
124+ }
125+ // Assert browser2
126+ {
127+ var result1 = await browser2 . EvaluateScriptAsync ( "typeof window.bindingApiObject1 === 'undefined'" ) ;
128+ var result2 = await browser2 . EvaluateScriptAsync ( "typeof window.bindingApiObject2 === 'undefined'" ) ;
129+ var result3 = await browser2 . EvaluateScriptAsync ( "typeof window.cefSharp === 'undefined'" ) ;
113130
114- Assert . True ( result1 . Success , result1 . Message ) ;
115- Assert . False ( ( bool ) result1 . Result ) ;
131+ Assert . True ( result1 . Success , result1 . Message ) ;
132+ Assert . True ( ( bool ) result1 . Result ) ;
116133
117- Assert . True ( result2 . Success , result2 . Message ) ;
118- Assert . False ( ( bool ) result2 . Result ) ;
134+ Assert . True ( result2 . Success , result2 . Message ) ;
135+ Assert . False ( ( bool ) result2 . Result ) ;
119136
120- Assert . True ( result3 . Success , result3 . Message ) ;
121- Assert . False ( ( bool ) result3 . Result ) ;
137+ Assert . True ( result3 . Success , result3 . Message ) ;
138+ Assert . True ( ( bool ) result3 . Result ) ;
139+ }
140+ // Assert browser3
141+ {
142+ var result1 = await browser3 . EvaluateScriptAsync ( "typeof window.bindingApiObject1 === 'undefined'" ) ;
143+ var result2 = await browser3 . EvaluateScriptAsync ( "typeof window.bindingApiObject2 === 'undefined'" ) ;
144+ var result3 = await browser3 . EvaluateScriptAsync ( "typeof window.cefSharp === 'undefined'" ) ;
145+
146+ Assert . True ( result1 . Success , result1 . Message ) ;
147+ Assert . True ( ( bool ) result1 . Result ) ;
148+
149+ Assert . True ( result2 . Success , result2 . Message ) ;
150+ Assert . True ( ( bool ) result2 . Result ) ;
151+
152+ Assert . True ( result3 . Success , result3 . Message ) ;
153+ Assert . False ( ( bool ) result3 . Result ) ;
154+ }
122155 }
123156
124157 [ Theory ]
0 commit comments