@@ -26,43 +26,51 @@ class EmulationTest : BiDiTestFixture
2626    [ Test ] 
2727    public  void  CanSetTimezoneOverride ( ) 
2828    { 
29-         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetTimezoneOverrideAsync ( "UTC" ,  new   ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
30-         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetTimezoneOverrideAsync ( null ,  new   ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
29+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetTimezoneOverrideAsync ( "UTC" ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
30+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetTimezoneOverrideAsync ( null ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
3131    } 
3232
3333    [ Test ] 
3434    public  void  CanSetUserAgentOverride ( ) 
3535    { 
36-         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetUserAgentOverrideAsync ( "MyUserAgent/1.0" ,  new   ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
37-         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetUserAgentOverrideAsync ( null ,  new   ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
36+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetUserAgentOverrideAsync ( "MyUserAgent/1.0" ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
37+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetUserAgentOverrideAsync ( null ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
3838    } 
3939
4040    [ Test ] 
4141    public  void  CanSetLocaleOverride ( ) 
4242    { 
43-         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetLocaleOverrideAsync ( "en-US" ,  new   ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
44-         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetLocaleOverrideAsync ( null ,  new   ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
43+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetLocaleOverrideAsync ( "en-US" ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
44+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetLocaleOverrideAsync ( null ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
4545    } 
4646
4747    [ Test ] 
4848    public  void  CanSetForcedColorsModeThemeOverride ( ) 
4949    { 
50-         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetForcedColorsModeThemeOverrideAsync ( ForcedColorsModeTheme . Light ,  new   ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
51-         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetForcedColorsModeThemeOverrideAsync ( null ,  new   ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
50+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetForcedColorsModeThemeOverrideAsync ( ForcedColorsModeTheme . Light ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
51+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetForcedColorsModeThemeOverrideAsync ( null ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
5252    } 
5353
5454    [ Test ] 
5555    public  void  CanSetScriptingEnabled ( ) 
5656    { 
57-         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetScriptingEnabledAsync ( false ,  new   ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
58-         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetScriptingEnabledAsync ( null ,  new   ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
57+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetScriptingEnabledAsync ( false ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
58+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetScriptingEnabledAsync ( null ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
5959    } 
6060
6161    [ Test ] 
6262    public  void  CanSetScreenOrientationOverride ( ) 
6363    { 
6464        var  orientation  =  new  ScreenOrientation ( ScreenOrientationNatural . Portrait ,  ScreenOrientationType . PortraitPrimary ) ; 
65-         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetScreenOrientationOverrideAsync ( orientation ,  new  ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
66-         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetScreenOrientationOverrideAsync ( null ,  new  ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
65+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetScreenOrientationOverrideAsync ( orientation ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
66+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetScreenOrientationOverrideAsync ( null ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
67+     } 
68+ 
69+     [ Test ] 
70+     public  void  CanSetGeolocationOverride ( ) 
71+     { 
72+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetGeolocationCoordinatesOverrideAsync ( 0 ,  0 ,  new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
73+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetGeolocationCoordinatesOverrideAsync ( new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
74+         Assert . That ( async  ( )  =>  await  bidi . Emulation . SetGeolocationPositionErrorOverrideAsync ( new ( )  {  Contexts  =  [ context ]  } ) ,  Throws . Nothing ) ; 
6775    } 
6876} 
0 commit comments