Release Vulpes OS Preview 26 with Gecko 161.0 and Tundra 0.2.0
This commit is contained in:
parent
3a1fba4efe
commit
e241a42d2f
1 changed files with 1305 additions and 331 deletions
|
|
@ -129,18 +129,19 @@ if(!bc){done({missing:true});return;}bc.currentWindowGlobal.getActor('VulpesProb
|
|||
)
|
||||
time.sleep(0.5)
|
||||
|
||||
def state():
|
||||
return client.execute(
|
||||
"return Services.wm.getMostRecentWindow('vulpes:host').document.getElementById('ContentSelectDropdown')?.menupopup?.state;"
|
||||
)
|
||||
|
||||
def open_menu():
|
||||
tap("settings", "document.querySelector('select[name=\"language.current\"]')")
|
||||
for _ in range(30):
|
||||
if state() == "open":
|
||||
return
|
||||
time.sleep(0.1)
|
||||
raise AssertionError("Native select did not open")
|
||||
wait("settings", "return document.querySelector('#vulpes-value-selector')?.checkVisibility();")
|
||||
|
||||
def menu_tap(selector):
|
||||
tap("settings", "document.querySelector(" + json.dumps("#vulpes-value-selector " + selector) + ")")
|
||||
|
||||
def choose(language):
|
||||
selector = '[role="option"][data-value="' + language + '"]'
|
||||
ev("settings", "document.querySelector(" + json.dumps("#vulpes-value-selector " + selector) +
|
||||
").scrollIntoView({block:'center'});return true;")
|
||||
menu_tap(selector)
|
||||
menu_tap('[data-action="confirm"]')
|
||||
|
||||
if args.restart_check:
|
||||
check(
|
||||
|
|
@ -156,14 +157,9 @@ if(!bc){done({missing:true});return;}bc.currentWindowGlobal.getActor('VulpesProb
|
|||
"return document.querySelector('select[name=\"language.current\"]').value;",
|
||||
)
|
||||
open_menu()
|
||||
check(
|
||||
"native-language-menu-styled",
|
||||
client.execute(
|
||||
"const w=Services.wm.getMostRecentWindow('vulpes:host');const item=w.document.querySelector('#ContentSelectDropdownPopup menuitem');return w.getComputedStyle(item.querySelector('.menu-highlightable-text')).display==='none' && w.getComputedStyle(item.querySelector('.menu-text')).display!=='none';"
|
||||
),
|
||||
)
|
||||
shot("languages-native-menu")
|
||||
subprocess.run(["xdotool", "key", "Escape"], check=True)
|
||||
check("gaia-language-menu", ev("settings", "return !!document.querySelector('#vulpes-value-selector [role=option][aria-selected=true]');"))
|
||||
shot("languages-gaia-menu")
|
||||
menu_tap('[data-action="cancel"]')
|
||||
check(
|
||||
"language-cancel-preserves-value",
|
||||
ev(
|
||||
|
|
@ -174,8 +170,7 @@ if(!bc){done({missing:true});return;}bc.currentWindowGlobal.getActor('VulpesProb
|
|||
),
|
||||
)
|
||||
open_menu()
|
||||
# Native menu keyboard selection exercises Gecko's input/change route.
|
||||
subprocess.run(["xdotool", "key", "Home", *(["Down"] * 8), "Return"], check=True)
|
||||
choose("en-US")
|
||||
check(
|
||||
"language-english-applied",
|
||||
wait(
|
||||
|
|
@ -188,21 +183,7 @@ if(!bc){done({missing:true});return;}bc.currentWindowGlobal.getActor('VulpesProb
|
|||
wait("homescreen", "return document.documentElement.lang==='en-US';"),
|
||||
)
|
||||
open_menu()
|
||||
# Select French with a real pointer click on the native menu item.
|
||||
position = client.execute(
|
||||
"const w=Services.wm.getMostRecentWindow('vulpes:host');const e=[...w.document.querySelectorAll('#ContentSelectDropdownPopup menuitem')].find(e=>e.getAttribute('label').includes('Français'));e.scrollIntoView();const b=e.getBoundingClientRect();return {x:w.mozInnerScreenX+b.x+b.width/2,y:w.mozInnerScreenY+b.y+b.height/2};"
|
||||
)
|
||||
subprocess.run(
|
||||
[
|
||||
"xdotool",
|
||||
"mousemove",
|
||||
str(round(position["x"])),
|
||||
str(round(position["y"])),
|
||||
"click",
|
||||
"1",
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
choose("fr")
|
||||
check(
|
||||
"language-french-applied",
|
||||
wait(
|
||||
|
|
|
|||
Loading…
Reference in a new issue