@@ -222,6 +222,18 @@ await Page.EvaluateFunctionAsync(@"() => {
222222 [ PuppeteerTest ( "oopif.spec.ts" , "OOPIF" , "should report oopif frames" ) ]
223223 [ Ignore ( "See why this is so brittle" ) ]
224224 public async Task ShouldReportOopifFrames ( )
225+ {
226+ var frameTask = Page . WaitForFrameAsync ( ( frame ) => frame . Url . EndsWith ( "oopif.html" ) ) ;
227+ await Page . GoToAsync ( $ "http://mainframe:{ TestConstants . Port } /dunamic-oopif.html") ;
228+ var frame = await frameTask . WithTimeout ( ) ;
229+ Assert . AreEqual ( 2 , Oopifs . Count ( ) ) ;
230+ Assert . AreEqual ( 2 , Page . Frames . Count ( frame => frame . IsOopFrame ) ) ;
231+ Assert . AreEqual ( 1 , await frame . EvaluateFunctionAsync < int > ( "() => document.querySelectorAll('button').length" ) ) ;
232+ }
233+
234+ [ PuppeteerTest ( "oopif.spec.ts" , "OOPIF" , "should wait for inner OOPIFs" ) ]
235+ [ Ignore ( "See why this is so brittle" ) ]
236+ public async Task ShouldWaitForInnerOopifs ( )
225237 {
226238 var frameTask = Page . WaitForFrameAsync ( ( frame ) => frame . Url . EndsWith ( "inner-frame2.html" ) ) ;
227239 await Page . GoToAsync ( $ "http://mainframe:{ TestConstants . Port } /main-frame.html") ;
@@ -245,7 +257,7 @@ public async Task ShouldLoadOopifIframesWithSubresourcesAndRequestInterception()
245257 }
246258
247259 [ PuppeteerTest ( "oopif.spec.ts" , "OOPIF" , "should support frames within OOP iframes" ) ]
248- [ Skip ( SkipAttribute . Targets . Firefox ) ]
260+ [ Ignore ( "See why this is so brittle" ) ]
249261 public async Task ShouldSupportFramesWithinOopIframes ( )
250262 {
251263 var oopifFrameTask = Page . WaitForFrameAsync ( ( frame ) => frame . Url . EndsWith ( "/oopif.html" ) ) ;
@@ -255,7 +267,7 @@ await FrameUtils.AttachFrameAsync(
255267 oopIframe ,
256268 "frame1" ,
257269 TestConstants . CrossProcessHttpPrefix + "/empty.html"
258- ) . WithTimeout ( ) ;
270+ ) . WithTimeout ( 2_000 ) ;
259271 var frame1 = oopIframe . ChildFrames . First ( ) ;
260272 StringAssert . Contains ( "empty.html" , frame1 . Url ) ;
261273 await FrameUtils . NavigateFrameAsync (
@@ -349,6 +361,15 @@ public async Task ShouldSupportLazyOopframes()
349361 Assert . That ( Page . Frames . Where ( frame => ! ( ( Frame ) frame ) . HasStartedLoading ) , Has . Exactly ( 1 ) . Items ) ;
350362 }
351363
364+ [ PuppeteerTest ( "oopif.spec.ts" , "waitForFrame" , "should resolve immediately if the frame already exists" ) ]
365+ [ Skip ( SkipAttribute . Targets . Firefox ) ]
366+ public async Task ShouldResolveImmediatelyIfTheFrameAlreadyExists ( )
367+ {
368+ await Page . GoToAsync ( TestConstants . EmptyPage ) ;
369+ await FrameUtils . AttachFrameAsync ( Page , "frame2" , TestConstants . CrossProcessHttpPrefix + "/empty.html" ) ;
370+ await Page . WaitForFrameAsync ( frame => frame . Url . EndsWith ( "/empty.html" ) ) ;
371+ }
372+
352373 private IEnumerable < ITarget > Oopifs => Context . Targets ( ) . Where ( target => ( ( Target ) target ) . TargetInfo . Type == TargetType . IFrame ) ;
353374 }
354375}
0 commit comments