Fix offline opt-in persistence assertion

This commit is contained in:
Jonathan Sykes
2026-10-10 19:29:31 +08:00
parent ef12468a99
commit 865c60cb85

View File

@@ -21,7 +21,7 @@ symlinkSync(join(repo,'perf/fixtures/shell-'+oldTag),join(scratch,'old/server/pu
symlinkSync(join(scratch,'new/frontend'),join(scratch,'new/server/public'));
const results={revision,oldTag,results:[],failures:[],unsupported:[]};
const sleep=ms=>new Promise(r=>setTimeout(r,ms));
async function poll(fn,timeout=90000){const until=Date.now()+timeout;while(Date.now()<until){if(await fn())return;await sleep(100);}throw Error('Condition timed out');}
async function poll(fn,timeout=90000){const until=Date.now()+timeout;while(Date.now()<until){if(await fn())return true;await sleep(100);}throw Error('Condition timed out');}
const ui={saveBeforePlay:['setSaveBeforePlay',true],autoPreload:['setAutoPreload',true],audioOnly:['setAudioOnly',false],quality:['setQuality','360p'],repeatMode:['setRepeat',true],loopOne:['setLoopOne',true],theme:['setTheme','light'],fontScale:['setFont','large'],density:['setDensity','compact'],perfMode:['setPerf',true],reduceMotion:['setMotion',true],parallelSaves:['setParallelSaves','2'],levelVolume:['setLevelVolume',false],layout:['setLayout','f7-swipe']};
async function run(name){
const cwd=join(scratch,name);mkdirSync(cwd);mkdirSync(join(cwd,'media'));