diff --git a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json index 7e66bc599..087914e3b 100644 --- a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json +++ b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json @@ -800,21 +800,6 @@ "FAIL" ] }, - { - "comment": "This is part of organizing the webdriver bidi implementation, We will remove it one by one", - "testIdPattern": "[oopif.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": "[page.spec] *addStyleTag*", @@ -1206,5 +1191,37 @@ "expectations": [ "SKIP" ] + }, + { + "comment": "FrameElementAsync times out for OOPIF frames in Firefox BiDi due to script evaluation issues", + "testIdPattern": "[oopif.spec] OOPIF should load oopif iframes with subresources and request interception", + "platforms": [ + "darwin", + "linux", + "win32" + ], + "parameters": [ + "firefox", + "webDriverBiDi" + ], + "expectations": [ + "FAIL" + ] + }, + { + "comment": "Firefox BiDi doesn't fire navigation/historyUpdated events for same-document (hash) navigations in OOPIFs", + "testIdPattern": "[oopif.spec] OOPIF should support frames within OOP iframes", + "platforms": [ + "darwin", + "linux", + "win32" + ], + "parameters": [ + "firefox", + "webDriverBiDi" + ], + "expectations": [ + "FAIL" + ] } ] diff --git a/lib/PuppeteerSharp.Tests/OOPIFTests/OOPIFTests.cs b/lib/PuppeteerSharp.Tests/OOPIFTests/OOPIFTests.cs index 45a4db473..e04c13ab8 100644 --- a/lib/PuppeteerSharp.Tests/OOPIFTests/OOPIFTests.cs +++ b/lib/PuppeteerSharp.Tests/OOPIFTests/OOPIFTests.cs @@ -16,12 +16,25 @@ public class OOPIFTests : PuppeteerPageBaseTest public OOPIFTests() { DefaultOptions = TestConstants.DefaultBrowserOptions(); - DefaultOptions.Args = - [ - "--site-per-process", - $"--remote-debugging-port={++_port}", - "--host-rules=\"MAP * 127.0.0.1\"" - ]; + + if (TestConstants.IsChrome) + { + // Chrome-specific args for OOPIF testing + DefaultOptions.Args = + [ + "--site-per-process", + $"--remote-debugging-port={++_port}", + "--host-rules=\"MAP * 127.0.0.1\"" + ]; + } + else + { + // Firefox: use network.dns.localDomains pref to resolve test domains + DefaultOptions.ExtraPrefsFirefox = new() + { + ["network.dns.localDomains"] = "mainframe,inner-frame1.test,inner-frame2.test,oopifdomain" + }; + } } [Test, PuppeteerTest("oopif.spec", "OOPIF", "should treat OOP iframes and normal iframes the same")] @@ -251,7 +264,7 @@ await Page.EvaluateFunctionAsync(@"() => { public async Task ShouldReportOopifFrames() { var frameTask = Page.WaitForFrameAsync((frame) => frame.Url.EndsWith("oopif.html")); - await Page.GoToAsync($"http://mainframe:{TestConstants.Port}/dynamic-oopif.html"); + await Page.GoToAsync(TestConstants.ServerUrl + "/dynamic-oopif.html"); var frame = await frameTask.WithTimeout(); Assert.That((await GetIframesAsync()), Has.Length.EqualTo(1)); Assert.That(Page.Frames, Has.Length.EqualTo(2)); @@ -391,7 +404,7 @@ public async Task ShouldResolveImmediatelyIfTheFrameAlreadyExists() } - [Test, PuppeteerTest("oopif.spec", "waitForFrame", "OOPIF: should expose events within OOPIFs")] + [Test, PuppeteerTest("oopif.spec", "OOPIF", "should expose events within OOPIFs")] public async Task OOPIFShouldExposeEventsWithinOOPIFs() { // Setup our session listeners to observe OOPIF activity. diff --git a/lib/PuppeteerSharp/Bidi/BidiElementHandle.cs b/lib/PuppeteerSharp/Bidi/BidiElementHandle.cs index 775137ef6..0aa42188e 100644 --- a/lib/PuppeteerSharp/Bidi/BidiElementHandle.cs +++ b/lib/PuppeteerSharp/Bidi/BidiElementHandle.cs @@ -62,16 +62,17 @@ public override async Task