File tree Expand file tree Collapse file tree 2 files changed +24
-15
lines changed 
PuppeteerSharp.Tests/PageTests Expand file tree Collapse file tree 2 files changed +24
-15
lines changed Original file line number Diff line number Diff line change 1+ using  System ; 
2+ using  System . Linq ; 
13using  System . Threading . Tasks ; 
24using  PuppeteerSharp . Tests . Attributes ; 
35using  PuppeteerSharp . Xunit ; 
@@ -113,5 +115,17 @@ public async Task ShouldIsolatePermissionsBetweenBrowserContexts()
113115
114116            await  otherContext . CloseAsync ( ) ; 
115117        } 
118+ 
119+         [ SkipBrowserFact ( skipFirefox :  true ) ] 
120+         public  async  Task  AllEnumsdAreValid ( ) 
121+         { 
122+             await  Page . GoToAsync ( TestConstants . EmptyPage ) ; 
123+             await  Context . OverridePermissionsAsync ( 
124+                 TestConstants . EmptyPage , 
125+                 Enum . GetValues ( typeof ( OverridePermission ) ) . Cast < OverridePermission > ( ) . ToArray ( ) ) ; 
126+             Assert . Equal ( "granted" ,  await  GetPermissionAsync ( Page ,  "geolocation" ) ) ; 
127+             await  Context . ClearPermissionOverridesAsync ( ) ; 
128+             Assert . Equal ( "prompt" ,  await  GetPermissionAsync ( Page ,  "geolocation" ) ) ; 
129+         } 
116130    } 
117131} 
Original file line number Diff line number Diff line change 1+ using  System ; 
12using  System . Runtime . Serialization ; 
23using  Newtonsoft . Json ; 
34using  Newtonsoft . Json . Converters ; 
@@ -29,12 +30,6 @@ public enum OverridePermission
2930        [ EnumMember ( Value  =  "notifications" ) ] 
3031        Notifications , 
3132
32-         /// <summary> 
33-         /// Push. 
34-         /// </summary> 
35-         [ EnumMember ( Value  =  "push" ) ] 
36-         Push , 
37- 
3833        /// <summary> 
3934        /// Camera. 
4035        /// </summary> 
@@ -66,16 +61,10 @@ public enum OverridePermission
6661        AccessibilityEvents , 
6762
6863        /// <summary> 
69-         /// Clipboard read. 
64+         /// Clipboard read/write . 
7065        /// </summary> 
71-         [ EnumMember ( Value  =  "clipboardRead" ) ] 
72-         ClipboardRead , 
73- 
74-         /// <summary> 
75-         /// Clipboard write. 
76-         /// </summary> 
77-         [ EnumMember ( Value  =  "clipboardWrite" ) ] 
78-         ClipboardWrite , 
66+         [ EnumMember ( Value  =  "clipboardReadWrite" ) ] 
67+         ClipboardReadWrite , 
7968
8069        /// <summary> 
8170        /// Payment handler. 
@@ -94,5 +83,11 @@ public enum OverridePermission
9483        /// </summary> 
9584        [ EnumMember ( Value  =  "idleDetection" ) ] 
9685        IdleDetection , 
86+ 
87+         /// <summary> 
88+         /// Persistent Storage. 
89+         /// </summary> 
90+         [ EnumMember ( Value  =  "durableStorage" ) ] 
91+         PersistentStorage , 
9792    } 
9893} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments