test: update tests for aborted requests (#10476)

This commit is contained in:
Alex Rudenko 2023-06-30 11:56:16 +02:00 committed by GitHub
parent 74f588f1c1
commit 02634d80da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 7 deletions

View File

@ -953,6 +953,12 @@
"parameters": ["webDriverBiDi"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[navigation.spec] navigation Frame.goto should reject when frame detaches",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[navigation.spec] navigation Page.goto should fail when navigating to bad SSL",
"platforms": ["darwin", "linux", "win32"],
@ -2453,12 +2459,6 @@
"parameters": ["chrome", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[navigation.spec] navigation Frame.goto should reject when frame detaches",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["cdp", "chrome"],
"expectations": ["FAIL", "PASS"]
},
{
"testIdPattern": "[navigation.spec] navigation Frame.goto should reject when frame detaches",
"platforms": ["darwin", "linux", "win32"],

View File

@ -803,7 +803,11 @@ describe('navigation', function () {
return frame.remove();
});
const error = await navigationPromise;
expect(error.message).toBe('Navigating frame was detached');
expect(error.message).atLeastOneToContain([
'Navigating frame was detached',
'Error: NS_BINDING_ABORTED',
'net::ERR_ABORTED',
]);
});
it('should return matching responses', async () => {
const {page, server} = await getTestState();