Skip to content
Merged
Show file tree
Hide file tree
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 @@ -665,21 +665,6 @@
"FAIL"
]
},
{
"comment": "This is part of organizing the webdriver bidi implementation, We will remove it one by one",
"testIdPattern": "[acceptInsecureCerts.spec] *",
"platforms": [
"darwin",
"linux",
"win32"
],
"parameters": [
"webDriverBiDi"
],
"expectations": [
"FAIL"
]
},
{
"comment": "This is part of organizing the webdriver bidi implementation, We will remove it one by one",
"testIdPattern": "[injected.spec] *",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public async Task ShouldWorkWithMixedContent()
});
await Page.GoToAsync(TestConstants.HttpsPrefix + "/mixedcontent.html", new NavigationOptions
{
WaitUntil = new[] { WaitUntilNavigation.Load }
WaitUntil = [WaitUntilNavigation.Load]
});
Assert.That(Page.Frames, Has.Length.EqualTo(2));
// Make sure blocked iframe has functional execution context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,29 @@ public ResponseSecurityDetailsTests() : base()
DefaultOptions.AcceptInsecureCerts = true;
}

[Test, PuppeteerTest("acceptInsecureCerts.spec", "Response.securityDetails", "Should Work")]
[Test, PuppeteerTest("acceptInsecureCerts.spec", "acceptInsecureCerts Response.securityDetails", "should work")]
public async Task ShouldWork()
{
// Checking for the TLS socket is it is in upstreams proves to be flaky in .net framework.
// Checking for the TLS socket is it is in upstreams proves to be flaky in .NET Framework.
// We don't need to test that here.

var response = await Page.GoToAsync(TestConstants.HttpsPrefix + "/empty.html");
Assert.That(response.Status, Is.EqualTo(HttpStatusCode.OK));
Assert.That(response.SecurityDetails, Is.Not.Null);
Assert.Multiple(() =>
{
Assert.That(response.Status, Is.EqualTo(HttpStatusCode.OK));
Assert.That(response.SecurityDetails, Is.Not.Null);
});
Assert.That(response.SecurityDetails.Protocol, Does.Contain("TLS"));
}

[Test, PuppeteerTest("acceptInsecureCerts.spec", "Response.securityDetails", "should be |null| for non-secure requests")]
[Test, PuppeteerTest("acceptInsecureCerts.spec", "acceptInsecureCerts Response.securityDetails", "should be |null| for non-secure requests")]
public async Task ShouldBeNullForNonSecureRequests()
{
var response = await Page.GoToAsync(TestConstants.EmptyPage);
Assert.That(response.SecurityDetails, Is.Null);
}

[Test, PuppeteerTest("acceptInsecureCerts.spec", "Response.securityDetails", "Network redirects should report SecurityDetails")]
[Test, PuppeteerTest("acceptInsecureCerts.spec", "acceptInsecureCerts Response.securityDetails", "Network redirects should report SecurityDetails")]
[Ignore("This is super flaky")]
public async Task NetworkRedirectsShouldReportSecurityDetails()
{
Expand All @@ -55,10 +58,13 @@ await Task.WhenAll(

var response = responseTask.Result;

Assert.That(responses, Has.Count.EqualTo(2));
Assert.That(responses[0].Status, Is.EqualTo(HttpStatusCode.Found));
Assert.That(TestUtils.CurateProtocol(response.SecurityDetails.Protocol),
Is.EqualTo(TestUtils.CurateProtocol(requestTask.Result.ToString())));
Assert.Multiple(() =>
{
Assert.That(responses, Has.Count.EqualTo(2));
Assert.That(responses[0].Status, Is.EqualTo(HttpStatusCode.Found));
Assert.That(TestUtils.CurateProtocol(response.SecurityDetails.Protocol),
Is.EqualTo(TestUtils.CurateProtocol(requestTask.Result.ToString())));
});
}
}
}
Loading