File tree Expand file tree Collapse file tree
WebExtensions.Net.Generator
WebExtensions.Net/Generated
test/WebExtensions.Net.BrowserExtensionIntegrationTest/Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 163163 "ReplacePropertyTypes" : {
164164 "InjectionTarget.frameIds" : { "Type" : " Array" , "ArrayItems" : { "Type" : " Integer" } },
165165 "InjectionTarget.tabId" : { "Type" : " Integer" },
166+ "ChangeInfo.status" : { "Ref" : " Tabs.TabStatus" },
167+ "Tab.status" : { "Ref" : " Tabs.TabStatus" },
166168 "Port.onMessage" : { "Ref" : " Runtime.OnMessageEvent" }
167169 }
168170 }
Original file line number Diff line number Diff line change @@ -71,8 +71,7 @@ public partial class ChangeInfo : BaseObject
7171 /// <summary>The status of the tab. Can be either <em>loading</em> or <em>complete</em>.</summary>
7272 [ JsAccessPath ( "status" ) ]
7373 [ JsonPropertyName ( "status" ) ]
74- [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
75- public string Status { get ; set ; }
74+ public TabStatus Status { get ; set ; }
7675
7776 /// <summary>The title of the tab if it has changed. This property is only present if the extension's manifest includes the <c>"tabs"</c> permission.</summary>
7877 [ JsAccessPath ( "title" ) ]
Original file line number Diff line number Diff line change @@ -138,8 +138,7 @@ public partial class Tab : BaseObject
138138 /// <summary>Either <em>loading</em> or <em>complete</em>.</summary>
139139 [ JsAccessPath ( "status" ) ]
140140 [ JsonPropertyName ( "status" ) ]
141- [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
142- public string Status { get ; set ; }
141+ public TabStatus Status { get ; set ; }
143142
144143 /// <summary>The ID of this tab's successor, if any; $(ref:tabs.TAB_ID_NONE) otherwise.</summary>
145144 [ JsAccessPath ( "successorTabId" ) ]
Original file line number Diff line number Diff line change 1- This file is auto generated at 2025-08-04T18:05:16
1+ This file is auto generated at 2025-08-13T19:58:56
Original file line number Diff line number Diff line change 11using WebExtensions . Net . BrowserExtensionIntegrationTest . Infrastructure ;
2+ using WebExtensions . Net . Tabs ;
23
34namespace WebExtensions . Net . BrowserExtensionIntegrationTest . Tests
45{
@@ -98,7 +99,7 @@ public async Task Get()
9899 // Act
99100 var tab = await webExtensionsApi . Tabs . Get ( testTabId . Value ) ;
100101 var attemptCount = 0 ;
101- while ( tab . Status != "complete" && attemptCount < 10 )
102+ while ( tab . Status != TabStatus . Complete && attemptCount < 10 )
102103 {
103104 attemptCount ++ ;
104105 await Task . Delay ( 500 ) ;
@@ -109,7 +110,7 @@ public async Task Get()
109110 tab . ShouldNotBeNull ( ) ;
110111 tab . Id . ShouldBe ( testTabId . Value ) ;
111112 tab . Url . ShouldBe ( testTabUrl ) ;
112- tab . Status . ShouldBe ( "complete" ) ;
113+ tab . Status . ShouldBe ( TabStatus . Complete ) ;
113114 }
114115
115116 [ Fact ( Order = 2 ) ]
@@ -141,7 +142,7 @@ public async Task Update()
141142
142143 // Assert
143144 tab . ShouldNotBeNull ( ) ;
144- tab . Status . ShouldBe ( "loading" ) ;
145+ tab . Status . ShouldBe ( TabStatus . Loading ) ;
145146 }
146147
147148 [ Fact ( Order = 4 ) ]
You can’t perform that action at this time.
0 commit comments