Skip to content

Commit 9043509

Browse files
authored
Merge branch 'main' into marcpopMSFT-improvecopilotformating
2 parents 1271f2e + 3cd5dcb commit 9043509

File tree

7 files changed

+37
-9
lines changed

7 files changed

+37
-9
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Coding Style and Changes:
77
- Do not allow unused `using` directives to be committed.
88
- Commit your changes, and then format them.
99
- Add the format commit SHA to the .git-blame-ignore-revs file so that the commit doesn't dirty git blame in the future
10+
- Use `#if NET` blocks for .NET Core specific code, and `#if NETFRAMEWORK` for .NET Framework specific code.
1011

1112
Testing:
1213
- Large changes should always include test changes.

NuGet.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<packageSources>
44
<clear />
55
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
6+
<!-- Begin: Package sources from microsoft-testfx -->
7+
<!-- End: Package sources from microsoft-testfx -->
68
<!-- Begin: Package sources from dotnet-aspire -->
79
<!-- End: Package sources from dotnet-aspire -->
810
<!-- Begin: Package sources from dotnet-runtime -->

eng/Version.Details.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ This file should be imported by eng/Versions.props
140140
<!-- dotnet/core-setup dependencies -->
141141
<NETStandardLibraryRefPackageVersion>2.1.0</NETStandardLibraryRefPackageVersion>
142142
<!-- microsoft/testfx dependencies -->
143-
<MicrosoftTestingPlatformPackageVersion>1.9.0-preview.25479.5</MicrosoftTestingPlatformPackageVersion>
144-
<MSTestPackageVersion>3.11.0-preview.25479.5</MSTestPackageVersion>
143+
<MicrosoftTestingPlatformPackageVersion>2.0.0-preview.25506.5</MicrosoftTestingPlatformPackageVersion>
144+
<MSTestPackageVersion>4.0.0-preview.25506.5</MSTestPackageVersion>
145145
</PropertyGroup>
146146
<!--Property group for alternate package version names-->
147147
<PropertyGroup>

eng/Version.Details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,13 +553,13 @@
553553
<Uri>https://github.com/dotnet/dotnet</Uri>
554554
<Sha>6befeceeaece5c9cb9730878aeaf4667f7c29b70</Sha>
555555
</Dependency>
556-
<Dependency Name="Microsoft.Testing.Platform" Version="1.9.0-preview.25479.5">
556+
<Dependency Name="Microsoft.Testing.Platform" Version="2.0.0-preview.25506.5">
557557
<Uri>https://github.com/microsoft/testfx</Uri>
558-
<Sha>fb48f61b25dd221f0b7568863080ab5339df8def</Sha>
558+
<Sha>f6f7b6dfab12e4a24ad74184d7ff884cf90cd972</Sha>
559559
</Dependency>
560-
<Dependency Name="MSTest" Version="3.11.0-preview.25479.5">
560+
<Dependency Name="MSTest" Version="4.0.0-preview.25506.5">
561561
<Uri>https://github.com/microsoft/testfx</Uri>
562-
<Sha>fb48f61b25dd221f0b7568863080ab5339df8def</Sha>
562+
<Sha>f6f7b6dfab12e4a24ad74184d7ff884cf90cd972</Sha>
563563
</Dependency>
564564
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="10.0.0-rc.1.25479.108">
565565
<Uri>https://github.com/dotnet/dotnet</Uri>

src/BuiltInTools/BrowserRefresh/BrowserRefreshMiddleware.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ internal static bool IsBrowserDocumentRequest(HttpContext context)
170170
if (request.Headers.TryGetValue("Sec-Fetch-Dest", out var values) &&
171171
!StringValues.IsNullOrEmpty(values) &&
172172
!string.Equals(values[0], "document", StringComparison.OrdinalIgnoreCase) &&
173+
!string.Equals(values[0], "frame", StringComparison.OrdinalIgnoreCase) &&
174+
!string.Equals(values[0], "iframe", StringComparison.OrdinalIgnoreCase) &&
173175
!IsProgressivelyEnhancedNavigation(context.Request))
174176
{
175177
// See https://github.com/dotnet/aspnetcore/issues/37326.

test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserRefreshMiddlewareTest.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,30 @@ public void IsBrowserDocumentRequest_ReturnsTrue_IfRequestFetchMetadataRequestHe
183183
[Theory]
184184
[InlineData("frame")]
185185
[InlineData("iframe")]
186+
public void IsBrowserDocumentRequest_ReturnsTrue_IfRequestFetchMetadataRequestHeaderIsFrame(string headerValue)
187+
{
188+
// Arrange
189+
var context = new DefaultHttpContext
190+
{
191+
Request =
192+
{
193+
Method = "Post",
194+
Headers =
195+
{
196+
["Accept"] = "text/html",
197+
["Sec-Fetch-Dest"] = headerValue,
198+
},
199+
},
200+
};
201+
202+
// Act
203+
var result = BrowserRefreshMiddleware.IsBrowserDocumentRequest(context);
204+
205+
// Assert
206+
Assert.True(result);
207+
}
208+
209+
[Theory]
186210
[InlineData("serviceworker")]
187211
public void IsBrowserDocumentRequest_ReturnsFalse_IfRequestFetchMetadataRequestHeaderIsNotDocument(string headerValue)
188212
{
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
<Project Sdk="MSTest.Sdk/3.9.3">
1+
<Project Sdk="MSTest.Sdk/4.0.0-preview.25506.5">
22
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
33

44
<PropertyGroup>
55
<TargetFramework>$(CurrentTargetFramework)</TargetFramework>
66
<GenerateTestingPlatformEntryPoint>False</GenerateTestingPlatformEntryPoint>
7-
<MicrosoftTestingExtensionsCodeCoverageVersion>17.12.6</MicrosoftTestingExtensionsCodeCoverageVersion>
87

98
</PropertyGroup>
109

1110
<!-- references to the code to test -->
1211

13-
</Project>
12+
</Project>

0 commit comments

Comments
 (0)