# Memory saver (S062): hidden tabs are marked frozen, then unloaded; the strip dims them and the settings use sliders.
# Offline. Run: NACRE_REST_UNIT_SECS=2 tools/smoke.sh tests/smoke/rest.txt <outdir> (a rest "minute" counts 2 s, checked every second).
wait 3
set /theme/mode "dark"
set /perf/lite "off"
set /perf/freeze_min 1
set /perf/discard_min 4
open @PAGES@/hello.html
waitload 30
newtab @PAGES@/color.html
waitload 30
newtab @PAGES@/favicon-red.html
waitload 30
cmd select 0
wait 4
status frozen
expect /tabs/1/frozen true
expect /tabs/2/frozen true
expect /tabs/0/frozen false
expect /tabs/1/has_web true
shot strip-frozen-dark
wait 10
status unloaded
expect /tabs/0/has_web true
expect /tabs/1/has_web false
expect /tabs/2/has_web false
shot strip-unloaded-dark
set /theme/mode "light"
wait 1
shot strip-unloaded-light
# Showing one loads it again and clears the marks.
cmd select 1
wait 4
status restored
expect /tabs/1/has_web true
expect /tabs/1/frozen false
page nacre://settings/performance
wait 1
shot sliders-light
set /theme/mode "dark"
wait 1
shot sliders-dark
status done
quit
