# Picture in picture, then back, then the page must still take real input (S056: the user's page stopped taking
# input after PiP -> return -> a click on the site's logo -> time in another window). Hidden only (real compositor
# input). Offline. For the time away: tools/hidden.sh tests/smoke/pip-return.txt <out> -- <driver> with a driver that
# focuses another window between `away-start` and `away-end`.
wait 3
open @PAGES@/pip-return.html
waitload
waitfor 10 document.getElementById('v').currentTime > 0.5
cmd pip
wait 2
cmd exitpip
wait 2
locate #l
wait 1
click @
wait 1
assert window.navs === 1 && location.hash === '#home'
log away-start
wait 20
log away-end
pick 200 100
locate #t
wait 1
click @
pagetype hello
wait 1
assert document.getElementById('t').value === 'hello' && document.activeElement === document.getElementById('t') && window.clicks === 2
pagescroll 300 200 300
wait 1
assert scrollY > 0
shot back
status done
quit
