MCPcopy
hub / github.com/ampproject/amphtml / expectBodyToBecomeVisible

Function expectBodyToBecomeVisible

testing/iframe.js:523–539  ·  view source on GitHub ↗
(win, opt_timeout)

Source from the content-addressed store, hash-verified

521 * @return {!Promise}
522 */
523export 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

Callers 6

test-errors.jsFile · 0.90
runTestFunction · 0.90
getVideoPlayerFunction · 0.90
test-css.jsFile · 0.90
test-amp-img.jsFile · 0.90

Calls 1

pollFunction · 0.70

Tested by

no test coverage detected