Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ public abstract partial class BlockedWebSocketCompressionTests(
: ServerTestBase<BasicTestAppServerSiteFixture<RazorComponentEndpointsStartup<App>>>(browserFixture, serverFixture, output)
{
[Fact]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/64305")]
public void EmbeddingServerAppInsideIframe_WithCompressionEnabled_Fails()
{
Navigate("/subdir/iframe");
Expand All @@ -106,11 +105,17 @@ public void EmbeddingServerAppInsideIframe_WithCompressionEnabled_Fails()

Assert.True(logs.Count > 0);

Assert.Matches(ParseErrorMessageRegex, logs[0].Message);
Assert.True(
ParseErrorMessageRegexOld.IsMatch(logs[0].Message) ||
ParseErrorMessageRegexNew.IsMatch(logs[0].Message),
$"Expected log message to match one of the CSP error patterns: {ParseErrorMessageRegexOld} or {ParseErrorMessageRegexNew}. Actual: {logs[0].Message}");
}

[GeneratedRegex(@"security - Refused to frame 'http://\d+\.\d+\.\d+\.\d+:\d+/' because an ancestor violates the following Content Security Policy directive: ""frame-ancestors 'none'"".")]
private static partial Regex ParseErrorMessageRegex { get; }
private static partial Regex ParseErrorMessageRegexOld { get; }

[GeneratedRegex(@"security - Framing 'http://\d+\.\d+\.\d+\.\d+:\d+/' violates the following Content Security Policy directive: ""frame-ancestors 'none'"".")]
private static partial Regex ParseErrorMessageRegexNew { get; }
}

public partial class DefaultConfigurationWebSocketCompressionTests : AllowedWebSocketCompressionTests
Expand Down
Loading