Skip to content

Commit 2406310

Browse files
authored
Chrome 138 (#2912)
* Chrome 136 * bump to 137 * Fix service worker test * fix coverage * Fix coverage code * skip on firefox * We need to pin firefox * fix test that has changed * more fixes * nightly is not the default any more * bump version * Use OneTime... * Revert "Use OneTime..." This reverts commit 093f4d7. * update nunit * Make abstract class * Revert "Make abstract class" This reverts commit dcac2b1. * Revert "update nunit" This reverts commit 12eab4e. * try using dotnet retest * verbosity * add one ignore * 138 * Ignore a test * 138.0.7204.92
1 parent e663313 commit 2406310

File tree

195 files changed

+983
-1010
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+983
-1010
lines changed

.github/workflows/dotnet.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,15 @@ jobs:
9999
Xvfb :1 -screen 5 1024x768x8 &
100100
export DISPLAY=:1.5
101101
cd lib/PuppeteerSharp.Tests
102-
dotnet test -s test.runsettings -c Debug --logger "trx;LogFileName=TestResults.xml" --blame-hang-timeout 300000
102+
dotnet tool update -g dotnet-retest
103+
dotnet retest --verbosity normal -- -s test.runsettings -c Debug --logger "trx;LogFileName=TestResults.xml" --blame-hang-timeout 300000
103104
- name: Test (Windows)
104105
if: matrix.os == 'windows-latest'
105106
env:
106107
BROWSER: ${{ matrix.browser }}
107108
HEADLESS_MODE: ${{ matrix.mode }}
108109
run: |
109110
cd .\lib\PuppeteerSharp.Tests
110-
dotnet test -s test.runsettings --blame-hang-timeout 300000
111+
dotnet tool update -g dotnet-retest
112+
dotnet retest --verbosity normal -- -s test.runsettings --blame-hang-timeout 300000
111113

lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.upstream.json

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@
930930
"comment": "Querying by a11y attributes is not standard behavior"
931931
},
932932
{
933-
"testIdPattern": "[bfcache.spec] BFCache can navigate to a BFCached page containing an OOPIF and a worker",
933+
"testIdPattern": "[bfcache.spec] *",
934934
"platforms": ["darwin", "linux", "win32"],
935935
"parameters": ["cdp", "firefox"],
936936
"expectations": ["SKIP"],
@@ -1622,32 +1622,18 @@
16221622
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
16231623
},
16241624
{
1625-
"testIdPattern": "[extensions.spec] extensions background_page target type should be available",
1626-
"platforms": ["darwin", "linux", "win32"],
1627-
"parameters": ["cdp", "firefox"],
1628-
"expectations": ["SKIP"],
1629-
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
1630-
},
1631-
{
1632-
"testIdPattern": "[extensions.spec] extensions service_worker target type should be available",
1633-
"platforms": ["darwin", "linux", "win32"],
1634-
"parameters": ["cdp", "firefox"],
1635-
"expectations": ["SKIP"],
1636-
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
1637-
},
1638-
{
1639-
"testIdPattern": "[extensions.spec] extensions target.page() should return a background_page",
1625+
"testIdPattern": "[extensions.spec] extensions *",
16401626
"platforms": ["darwin", "linux", "win32"],
16411627
"parameters": ["cdp", "firefox"],
16421628
"expectations": ["SKIP"],
1643-
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
1629+
"comment": "Chrome-specific test"
16441630
},
16451631
{
1646-
"testIdPattern": "[extensions.spec] extensions target.page() should return a background_page",
1647-
"platforms": ["darwin", "linux", "win32"],
1632+
"testIdPattern": "[extensions.spec] extensions can evaluate in the service worker",
1633+
"platforms": ["win32"],
16481634
"parameters": ["cdp", "chrome"],
1649-
"expectations": ["FAIL", "PASS"],
1650-
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
1635+
"expectations": ["SKIP"],
1636+
"comment": "Flaky or failing on Windows. See https://github.com/puppeteer/puppeteer/issues/13417"
16511637
},
16521638
{
16531639
"testIdPattern": "[fixtures.spec] Fixtures should close the browser when the node process closes",
@@ -3732,25 +3718,18 @@
37323718
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
37333719
},
37343720
{
3735-
"testIdPattern": "[extensions.spec] extensions background_page target type should be available",
3736-
"platforms": ["darwin", "linux", "win32"],
3737-
"parameters": ["cdp", "chrome", "chrome-headless-shell"],
3738-
"expectations": ["SKIP"],
3739-
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
3740-
},
3741-
{
3742-
"testIdPattern": "[extensions.spec] extensions service_worker target type should be available",
3743-
"platforms": ["darwin", "linux", "win32"],
3721+
"testIdPattern": "[mouse.spec] Mouse should select the text with mouse",
3722+
"platforms": ["win32"],
37443723
"parameters": ["cdp", "chrome", "chrome-headless-shell"],
3745-
"expectations": ["SKIP"],
3746-
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
3724+
"expectations": ["FAIL"],
3725+
"comment": "TODO: started to fail with Chrome headless shell 135 on Windows"
37473726
},
37483727
{
3749-
"testIdPattern": "[extensions.spec] extensions target.page() should return a background_page",
3728+
"testIdPattern": "[extensions.spec] extensions *",
37503729
"platforms": ["darwin", "linux", "win32"],
37513730
"parameters": ["cdp", "chrome", "chrome-headless-shell"],
37523731
"expectations": ["SKIP"],
3753-
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
3732+
"comment": "No extensions in chrome-headless-shell"
37543733
},
37553734
{
37563735
"testIdPattern": "[network.spec] network Network Events Page.Events.Request",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<script>
2-
function unused(){}console.log('used!');</script>
2+
function unused(){}console.log('used!');if(true===false)console.log('unused!');</script>

lib/PuppeteerSharp.Tests/AccessibilityTests/AccessibilityTests.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace PuppeteerSharp.Tests.AccessibilityTests
77
{
88
public class AccessibilityTests : PuppeteerPageBaseTest
99
{
10-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "should work")]
10+
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "should work")]
1111
public async Task ShouldWork()
1212
{
1313
await Page.SetContentAsync(@"
@@ -107,7 +107,7 @@ await Page.SetContentAsync(@"
107107
Assert.That(snapshot, Is.EqualTo(nodeToCheck));
108108
}
109109

110-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "should report uninteresting nodes")]
110+
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "should report uninteresting nodes")]
111111
public async Task ShouldReportUninterestingNodes()
112112
{
113113
await Page.SetContentAsync("<textarea autofocus>hi</textarea>");
@@ -151,7 +151,7 @@ public async Task ShouldReportUninterestingNodes()
151151
}));
152152
}
153153

154-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "get snapshots while the tree is re-calculated")]
154+
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "get snapshots while the tree is re-calculated")]
155155
public async Task GetSnapshotsWhileTheTreeIsReCalculated()
156156
{
157157
await Page.SetContentAsync(@"
@@ -201,7 +201,7 @@ private async Task<string> GetAccessibleNameAsync(IPage page, IElementHandle ele
201201
})).Name;
202202
}
203203

204-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "roledescription")]
204+
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "roledescription")]
205205
public async Task RoleDescription()
206206
{
207207
await Page.SetContentAsync("<div tabIndex=-1 aria-roledescription='foo'>Hi</div>");
@@ -210,39 +210,39 @@ public async Task RoleDescription()
210210
Assert.That(snapshot.Children[0].RoleDescription, Is.Null);
211211
}
212212

213-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "orientation")]
213+
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "orientation")]
214214
public async Task Orientation()
215215
{
216216
await Page.SetContentAsync("<a href='' role='slider' aria-orientation='vertical'>11</a>");
217217
var snapshot = await Page.Accessibility.SnapshotAsync();
218218
Assert.That(snapshot.Children[0].Orientation, Is.EqualTo("vertical"));
219219
}
220220

221-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "autocomplete")]
221+
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "autocomplete")]
222222
public async Task AutoComplete()
223223
{
224224
await Page.SetContentAsync("<input type='number' aria-autocomplete='list' />");
225225
var snapshot = await Page.Accessibility.SnapshotAsync();
226226
Assert.That(snapshot.Children[0].AutoComplete, Is.EqualTo("list"));
227227
}
228228

229-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "multiselectable")]
229+
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "multiselectable")]
230230
public async Task MultiSelectable()
231231
{
232232
await Page.SetContentAsync("<div role='grid' tabIndex=-1 aria-multiselectable=true>hey</div>");
233233
var snapshot = await Page.Accessibility.SnapshotAsync();
234234
Assert.That(snapshot.Children[0].Multiselectable, Is.True);
235235
}
236236

237-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "keyshortcuts")]
237+
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "keyshortcuts")]
238238
public async Task KeyShortcuts()
239239
{
240240
await Page.SetContentAsync("<div role='grid' tabIndex=-1 aria-keyshortcuts='foo'>hey</div>");
241241
var snapshot = await Page.Accessibility.SnapshotAsync();
242242
Assert.That(snapshot.Children[0].KeyShortcuts, Is.EqualTo("foo"));
243243
}
244244

245-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "should not report text nodes inside controls")]
245+
[Test, PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "should not report text nodes inside controls")]
246246
public async Task ShouldNotReportTextNodesInsideControls()
247247
{
248248
await Page.SetContentAsync(@"
@@ -271,7 +271,7 @@ await Page.Accessibility.SnapshotAsync(),
271271
}));
272272
}
273273

274-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "rich text editable fields should have children")]
274+
[Test, PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "rich text editable fields should have children")]
275275
public async Task RichTextEditableFieldsShouldHaveChildren()
276276
{
277277
await Page.SetContentAsync(@"
@@ -299,7 +299,7 @@ await Page.SetContentAsync(@"
299299
}));
300300
}
301301

302-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "rich text editable fields with role should have children")]
302+
[Test, PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "rich text editable fields with role should have children")]
303303
public async Task RichTextEditableFieldsWithRoleShouldHaveChildren()
304304
{
305305
await Page.SetContentAsync(@"
@@ -324,7 +324,7 @@ await Page.SetContentAsync(@"
324324
}));
325325
}
326326

327-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "plaintext contenteditable", "plain text field with role should not have children")]
327+
[Test, PuppeteerTest("accessibility.spec", "plaintext contenteditable", "plain text field with role should not have children")]
328328
public async Task PlainTextFieldWithRoleShouldNotHaveChildren()
329329
{
330330
await Page.SetContentAsync("<div contenteditable='plaintext-only' role='textbox'>Edit this image:<img src='fakeimage.png' alt='my fake image'></div>");
@@ -339,7 +339,7 @@ public async Task PlainTextFieldWithRoleShouldNotHaveChildren()
339339
}));
340340
}
341341

342-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "plaintext contenteditable", "plain text field with tabindex and without role should not have content")]
342+
[Test, PuppeteerTest("accessibility.spec", "plaintext contenteditable", "plain text field with tabindex and without role should not have content")]
343343
public async Task PlainTextFieldWithoutRoleShouldNotHaveContent()
344344
{
345345
await Page.SetContentAsync(
@@ -349,7 +349,7 @@ await Page.SetContentAsync(
349349
Assert.That(snapshot.Children[0].Name, Is.EqualTo(string.Empty));
350350
}
351351

352-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "non editable textbox with role and tabIndex and label should not have children")]
352+
[Test, PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "non editable textbox with role and tabIndex and label should not have children")]
353353
public async Task NonEditableTextboxWithRoleAndTabIndexAndLabelShouldNotHaveChildren()
354354
{
355355
await Page.SetContentAsync(@"
@@ -367,7 +367,7 @@ this is the inner content
367367
}));
368368
}
369369

370-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "checkbox with and tabIndex and label should not have children")]
370+
[Test, PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "checkbox with and tabIndex and label should not have children")]
371371
public async Task CheckboxWithAndTabIndexAndLabelShouldNotHaveChildren()
372372
{
373373
await Page.SetContentAsync(@"
@@ -385,7 +385,7 @@ this is the inner content
385385
}));
386386
}
387387

388-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "checkbox without label should not have children")]
388+
[Test, PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "checkbox without label should not have children")]
389389
public async Task CheckboxWithoutLabelShouldNotHaveChildren()
390390
{
391391
await Page.SetContentAsync(@"

lib/PuppeteerSharp.Tests/AccessibilityTests/RootOptionTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace PuppeteerSharp.Tests.AccessibilityTests
77
{
88
public class RootOptionTests : PuppeteerPageBaseTest
99
{
10-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "root option", "should work a button")]
10+
[Test, PuppeteerTest("accessibility.spec", "root option", "should work a button")]
1111
public async Task ShouldWorkAButton()
1212
{
1313
await Page.SetContentAsync("<button>My Button</button>");
@@ -22,7 +22,7 @@ await Page.Accessibility.SnapshotAsync(new AccessibilitySnapshotOptions { Root =
2222
}));
2323
}
2424

25-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "root option", "should work an input")]
25+
[Test, PuppeteerTest("accessibility.spec", "root option", "should work an input")]
2626
public async Task ShouldWorkAnInput()
2727
{
2828
await Page.SetContentAsync("<input title='My Input' value='My Value'>");
@@ -38,7 +38,7 @@ await Page.Accessibility.SnapshotAsync(new AccessibilitySnapshotOptions { Root =
3838
}));
3939
}
4040

41-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "root option", "should work a menu")]
41+
[Test, PuppeteerTest("accessibility.spec", "root option", "should work a menu")]
4242
public async Task ShouldWorkAMenu()
4343
{
4444
await Page.SetContentAsync(@"
@@ -79,7 +79,7 @@ await Page.SetContentAsync(@"
7979
Assert.That(snapshot, Is.EqualTo(nodeToCheck));
8080
}
8181

82-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "root option", "should return null when the element is no longer in DOM")]
82+
[Test, PuppeteerTest("accessibility.spec", "root option", "should return null when the element is no longer in DOM")]
8383
public async Task ShouldReturnNullWhenTheElementIsNoLongerInDOM()
8484
{
8585
await Page.SetContentAsync("<button>My Button</button>");
@@ -88,7 +88,7 @@ public async Task ShouldReturnNullWhenTheElementIsNoLongerInDOM()
8888
Assert.That(await Page.Accessibility.SnapshotAsync(new AccessibilitySnapshotOptions { Root = button }), Is.Null);
8989
}
9090

91-
[Test, Retry(2), PuppeteerTest("accessibility.spec", "root option", "should support the interestingOnly option")]
91+
[Test, PuppeteerTest("accessibility.spec", "root option", "should support the interestingOnly option")]
9292
public async Task ShouldSupportTheInterestingOnlyOption()
9393
{
9494
await Page.SetContentAsync("<div><button>My Button</button></div>");

lib/PuppeteerSharp.Tests/AriaQueryHandlerTests/ParseAriaSelectorTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace PuppeteerSharp.Tests.AriaQueryHandlerTests
66
{
77
public class ParseAriaSelectorTests : PuppeteerPageBaseTest
88
{
9-
[Test, Retry(2), PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should handle non-breaking spaces")]
9+
[Test, PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should handle non-breaking spaces")]
1010
public async Task ShouldHandleNonBreakingSpaces()
1111
{
1212
await Page.SetContentAsync(
@@ -19,7 +19,7 @@ await Page.SetContentAsync(
1919
Assert.That(button, Is.Null);
2020
}
2121

22-
[Test, Retry(2), PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should handle non-breaking spaces")]
22+
[Test, PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should handle non-breaking spaces")]
2323
public async Task ShouldHandleNonBreakingSpaces2()
2424
{
2525
await Page.SetContentAsync(
@@ -32,7 +32,7 @@ await Page.SetContentAsync(
3232
await ExpectFound(button);
3333
}
3434

35-
[Test, Retry(2), PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should handle zero width spaces")]
35+
[Test, PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should handle zero width spaces")]
3636
public async Task ShouldHandleZeroWidthSpaces()
3737
{
3838
await Page.SetContentAsync(
@@ -45,7 +45,7 @@ await Page.SetContentAsync(
4545
Assert.That(button, Is.Null);
4646
}
4747

48-
[Test, Retry(2), PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should find button")]
48+
[Test, PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should find button")]
4949
public async Task ShouldFindButton()
5050
{
5151
await Page.SetContentAsync(@"

lib/PuppeteerSharp.Tests/AriaQueryHandlerTests/QueryAllArrayTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public QueryAllArrayTests() : base()
1010
{
1111
}
1212

13-
[Test, Retry(2), PuppeteerTest("ariaqueryhandler.spec", "queryAllArray", "$$eval should handle many elements")]
13+
[Test, PuppeteerTest("ariaqueryhandler.spec", "queryAllArray", "$$eval should handle many elements")]
1414
public async Task EvalShouldHandleManyElements()
1515
{
1616
await Page.SetContentAsync("");

lib/PuppeteerSharp.Tests/AriaQueryHandlerTests/QueryAllTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace PuppeteerSharp.Tests.AriaQueryHandlerTests
88
{
99
public class QueryAllTests : PuppeteerPageBaseTest
1010
{
11-
[Test, Retry(2), PuppeteerTest("ariaqueryhandler.spec", "queryAll", "should find menu by name")]
11+
[Test, PuppeteerTest("ariaqueryhandler.spec", "queryAll", "should find menu by name")]
1212
public async Task ShouldFindMenuByName()
1313
{
1414
await Page.SetContentAsync(@"

0 commit comments

Comments
 (0)