Skip to content

Commit 13c04da

Browse files
authored
Introduce Target Managers (#2051)
* Some progress * Some more progress * Some passing tests * code factor * Some improvements * Fix IsInitialized * more fixes * some updates * Fix some tests * Fix accessibility tests * Update chromium version * code cleanup * Implement firefox target manager * Add docs
1 parent c3350bc commit 13c04da

24 files changed

+1086
-359
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
<link rel='stylesheet' href='./style.css'>
22
<script src='./script.js' type='text/javascript'></script>
3+
<style>
4+
div {
5+
line-height: 18px;
6+
}
7+
</style>
38
<div>Hi, I'm frame</div>

lib/PuppeteerSharp.Tests/AccessibilityTests/AccessibilityTests.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ await Page.SetContentAsync(@"
252252
new SerializedAXNode
253253
{
254254
Role = "StaticText",
255-
Name = "Edit this image:"
255+
Name = "Edit this image: "
256256
},
257257
new SerializedAXNode
258258
{
@@ -284,13 +284,8 @@ await Page.SetContentAsync(@"
284284
new SerializedAXNode
285285
{
286286
Role = "StaticText",
287-
Name = "Edit this image:"
287+
Name = "Edit this image: "
288288
},
289-
new SerializedAXNode
290-
{
291-
Role = "img",
292-
Name = "my fake image"
293-
}
294289
}
295290
},
296291
(await Page.Accessibility.SnapshotAsync()).Children[0]);

lib/PuppeteerSharp.Tests/Issues/Issue0343.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public Issue0343(ITestOutputHelper output) : base(output)
1313
{
1414
}
1515

16-
[SkipBrowserFact(skipFirefox: true)]
16+
[Fact(Skip = "It seems something's changed in chromium and this is no longer valid")]
1717
public async Task ShouldSupportLongExpiresValueInCookies()
1818
{
1919
await Page.GoToAsync(TestConstants.EmptyPage);

lib/PuppeteerSharp.Tests/TargetTests/TargetTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,11 @@ public async Task ShouldCreateAWorkerFromAServiceWorker()
140140
public async Task ShouldCreateAWorkerFromASharedWorker()
141141
{
142142
await Page.GoToAsync(TestConstants.EmptyPage);
143-
var targetTask = Context.WaitForTargetAsync(t => t.Type == TargetType.SharedWorker);
144143
await Page.EvaluateFunctionAsync(@"() =>
145144
{
146145
new SharedWorker('data:text/javascript,console.log(""hi"")');
147146
}");
148-
var target = await targetTask;
147+
var target = await Context.WaitForTargetAsync(t => t.Type == TargetType.SharedWorker);
149148
var worker = await target.WorkerAsync();
150149
Assert.Equal("[object SharedWorkerGlobalScope]", await worker.EvaluateFunctionAsync("() => self.toString()"));
151150
}

0 commit comments

Comments
 (0)