Served with isolation headers; start-screen capability notices; tests on the real GPU (t88 phase 1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 19:11:42 -04:00
co-authored by Claude Opus 5.5
parent 9781aa3ee1
commit b2c9ad9533
22 changed files with 376 additions and 91 deletions
+4 -6
View File
@@ -6,8 +6,8 @@ import math
import copy
from urllib.request import urlopen
from perf import ROOT, GPU_ARGS, quantiles, measurements, report
from server import isolated_server
from perf import ROOT, quantiles, measurements, report
from browser import launch, consume_gpu_option
from use_venv import ensure_playwright
@@ -28,14 +28,12 @@ def main():
assert '/factory/sim/total_ms: +20.0% REGRESSION' in out.getvalue()
assert 'n/a (baseline zero)' in out.getvalue()
ensure_playwright()
from playwright.sync_api import sync_playwright
with isolated_server() as url, sync_playwright() as p:
consume_gpu_option()
with launch() as (browser, pg, url):
with urlopen(url) as response:
assert response.headers['Cross-Origin-Opener-Policy'] == 'same-origin'
assert response.headers['Cross-Origin-Embedder-Policy'] == 'require-corp'
response.read()
browser = p.chromium.launch(args=GPU_ARGS)
pg = browser.new_page(viewport={'width': 1280, 'height': 760})
errors = []
pg.on('pageerror', lambda e: errors.append(str(e)))
pg.add_init_script('window.requestAnimationFrame = () => 0;')