(opt_ranJs = 1, opt_timeout = 300)
| 91 | } |
| 92 | |
| 93 | function waitForJsInIframe(opt_ranJs = 1, opt_timeout = 300) { |
| 94 | return poll( |
| 95 | 'waiting for JS to run', |
| 96 | () => { |
| 97 | return ranJs >= opt_ranJs; |
| 98 | }, |
| 99 | undefined, |
| 100 | opt_timeout |
| 101 | ); |
| 102 | } |
| 103 | |
| 104 | function waitForAmpIframeLayoutPromise(doc, ampIframe) { |
| 105 | const viewport = Services.viewportForDoc(doc); |
no test coverage detected