(win, opt_timeout)
| 521 | * @return {!Promise} |
| 522 | */ |
| 523 | export function expectBodyToBecomeVisible(win, opt_timeout) { |
| 524 | return poll( |
| 525 | 'expect body to become visible', |
| 526 | () => { |
| 527 | return ( |
| 528 | win && |
| 529 | win.document && |
| 530 | win.document.body && |
| 531 | ((win.document.body.style.visibility == 'visible' && |
| 532 | win.document.body.style.opacity != '0') || |
| 533 | win.document.body.style.opacity == '1') |
| 534 | ); |
| 535 | }, |
| 536 | undefined, |
| 537 | opt_timeout || 5000 |
| 538 | ); |
| 539 | } |
| 540 | |
| 541 | /** |
| 542 | * For the given iframe, makes the creation of iframes and images |
no test coverage detected