Release Vulpes OS Preview 26 with Gecko 161.0 and Tundra 0.2.0

This commit is contained in:
OverSu 2026-12-01 22:22:00 +01:00
commit e241a42d2f

View file

@ -11,15 +11,23 @@ spec=importlib.util.spec_from_file_location('probe',Path(__file__).with_name('pr
probe=importlib.util.module_from_spec(spec);spec.loader.exec_module(probe)
with Client(2857) as c:
probe.register(c)
probe.evaluate(c,'system',"ScreenManager.turnScreenOn(true);if(Service.query('locked'))await Service.request('unlock',{forcibly:true});return true;")
hit_area=c.execute("const d=Services.wm.getMostRecentWindow('vulpes:host').document,b=d.getElementById('home'),r=b.getBoundingClientRect(),y=r.y+r.height/2;return [d.elementFromPoint(r.x+r.width/2,y)===b,d.elementFromPoint(2,y)===b,r.width];")
assert hit_area == [True,False,44],hit_area
def state():
return c.execute("const w=Services.wm.getMostRecentWindow('vulpes:host'),d=w.document,b=d.getElementById('home');return {home:d.documentElement.hasAttribute('home-active'),bottom:d.documentElement.hasAttribute('home-at-bottom'),height:w.innerHeight,screen:d.getElementById('screen').clientHeight,bar:b.clientHeight,background:w.getComputedStyle(b).backgroundImage,color:w.getComputedStyle(b).backgroundColor};")
def wait(home):
return c.execute("const w=Services.wm.getMostRecentWindow('vulpes:host'),d=w.document,b=d.getElementById('home-bar');return {app:d.documentElement.dataset.navApp,home:d.documentElement.hasAttribute('home-active'),bottom:d.documentElement.hasAttribute('home-at-bottom'),height:w.innerHeight,screen:d.getElementById('screen').clientHeight,bar:b.clientHeight,background:w.getComputedStyle(b).backgroundImage,color:w.getComputedStyle(b).backgroundColor,ring:w.getComputedStyle(d.getElementById('home'),'::before').color};")
def wait(home, app=None):
for _ in range(100):
s=state()
if s['home']==home and s['screen']==s['height']-(0 if home else s['bar']):return s
if s['home']==home and (app is None or s['app']==app) and s['screen']==s['height']-(0 if home else s['bar']):return s
time.sleep(.15)
raise AssertionError(s)
c.execute("Services.wm.getMostRecentWindow('vulpes:host').document.getElementById('home').click();")
wait(True)
probe.evaluate(c,'homescreen',"document.querySelector('#apps-panel > .scrollable').scrollTop=0;return true;")
for _ in range(50):
if not state()['bottom']:break
time.sleep(.05)
home=wait(True);assert 'linear-gradient' in home['background'],home
c.execute("const b=Services.wm.getMostRecentWindow('vulpes:host').document.getElementById('home');InspectorUtils.addPseudoClassLock(b,':active');")
pressed=state();assert pressed['background']==home['background'] and pressed['color']==home['color'],pressed
@ -30,14 +38,66 @@ with Client(2857) as c:
if bottom['bottom']:break
time.sleep(.1)
assert bottom['background']=='none' and bottom['color']=='rgba(0, 0, 0, 0)',bottom
for open_overlay,close_overlay in [
("dispatchEvent(new CustomEvent('holdsleep'))", "document.querySelector('#sleep-menu button').click()"),
("UtilityTray.show(true)", "UtilityTray.hide(true)"),
]:
probe.evaluate(c,'system',open_overlay+';return true;')
if open_overlay.startswith('UtilityTray'):
for _ in range(50):
if c.execute("return Services.wm.getMostRecentWindow('vulpes:host').document.documentElement.hasAttribute('tray-over-home');"):break
time.sleep(.05)
tray=state()
assert tray['home'] and tray['screen']==home['screen'] and tray['bar']==0,tray
else:
power = wait(False)
footer = probe.evaluate(c,'system',"const b=document.querySelector('#sleep-menu button'),r=b.getBoundingClientRect();return [getComputedStyle(b.closest('gaia-buttons')).backgroundColor,r.bottom,document.elementFromPoint(r.x+r.width/2,r.y+r.height/2)===b];")['value']
assert power['color']==footer[0] and power['ring']=='rgb(255, 255, 255)',power
assert footer[1]<=power['screen'] and footer[2],footer
probe.evaluate(c,'system',close_overlay+';return true;')
wait(True)
if open_overlay.startswith('UtilityTray'):
for _ in range(50):
restored=state()
if restored['bar']:break
time.sleep(.05)
assert restored['bar']==home['bar'] and restored['screen']==home['screen'],restored
result=probe.evaluate(c,'system','await VulpesCompat.call("apps.launch",{manifestURL:"http://settings.localhost:8765/manifest.webapp"});return true;')
assert result.get('value'),result
app=wait(False);assert app['background']=='none' and app['color']=='rgb(18, 35, 50)',app
app=wait(False,'settings');assert app['background']=='none' and app['color']=='rgba(0, 0, 0, 0)',app
assert app['ring']=='rgb(101, 112, 115)',app
x,y=c.execute("const r=Services.wm.getMostRecentWindow('vulpes:host').document.getElementById('home').getBoundingClientRect();return [Math.floor(r.x+r.width/2),Math.floor(r.y+r.height/2)];")
c.call("WebDriver:PerformActions",{"actions":[{"type":"pointer","id":"home-mouse",
"parameters":{"pointerType":"mouse"},"actions":[{"type":"pointerMove","x":x,"y":y},
{"type":"pointerDown","button":0},{"type":"pause","duration":950},{"type":"pointerUp","button":0}]}]})
for _ in range(100):
if c.execute("return Services.wm.getMostRecentWindow('vulpes:host').document.documentElement.hasAttribute('recents');"):
break
time.sleep(.1)
else:
raise AssertionError('Recent apps did not open')
recent=state()
assert recent['screen']==recent['height'] and recent['background']=='none' and recent['color']=='rgba(0, 0, 0, 0)',recent
denied=probe.evaluate(c,'settings','try {await VulpesCompat.call("desktop.navigation",{home:true});return false;} catch(e) {return true;}')
assert denied.get('value'),denied
deniedScroll=probe.evaluate(c,'settings','try {await VulpesCompat.call("desktop.homeScroll",{bottom:true});return false;} catch(e) {return true;}')
assert deniedScroll.get('value'),deniedScroll
c.execute("Services.wm.getMostRecentWindow('vulpes:host').document.getElementById('home').click();")
frames = c.call("WebDriver:ExecuteAsyncScript", {"script": """
const done=arguments[arguments.length-1],w=Services.wm.getMostRecentWindow('vulpes:host');
const d=w.document,root=d.documentElement,bar=d.getElementById('home-bar'),screen=d.getElementById('screen');
let frames=0,settled=0;
function paint(){
const style=w.getComputedStyle(bar);
if(screen.clientHeight!==w.innerHeight || style.backgroundColor!=='rgba(0, 0, 0, 0)')
return done({error:'Exposed navigation strip',height:screen.clientHeight,background:style.backgroundColor});
if(root.hasAttribute('home-active') && !root.hasAttribute('recents')) settled++;
if(++frames>400 || settled>=3) return done({frames,settled});
w.requestAnimationFrame(paint);
}
w.requestAnimationFrame(paint);
d.getElementById('home').click();
""","args":[],"sandbox":"system","newSandbox":True,"scriptTimeout":12000})['value']
assert frames.get('settled',0)>=3,frames
wait(True)
probe.evaluate(c,'homescreen',"document.querySelector('#apps-panel > .scrollable').scrollTop=0;return true;")
for _ in range(100):
@ -63,6 +123,6 @@ try {
} finally {box.remove();}
''')
assert iconRecovery.get('value',{}).get('initial')==0 and iconRecovery['value'].get('naturalWidth',0)>0,iconRecovery
report={'passed':True,'home':home,'pressed':pressed,'bottom':bottom,'application':app,'returnHome':top,'nonSystemCallerDenied':True,'nonHomeScrollCallerDenied':True,'zeroWidthIconRecovery':iconRecovery['value']}
report={'passed':True,'home':home,'pressed':pressed,'bottom':bottom,'application':app,'recents':recent,'returnFrames':frames,'returnHome':top,'nonSystemCallerDenied':True,'nonHomeScrollCallerDenied':True,'zeroWidthIconRecovery':iconRecovery['value']}
(ROOT/'logs/home-surface-test.json').write_text(json.dumps(report,indent=2)+'\n')
print(json.dumps(report,indent=2))