Checkpoint web parity through Chromium input tasks
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-08-19 10:39:03 -04:00
parent 5a11045ca5
commit 380cbed4ff
634 changed files with 41862 additions and 212 deletions

View File

@@ -0,0 +1,18 @@
import { expect, test } from "@playwright/test";
test("M13-02A enforces bounded script manifest text, module, path, dependency and permission limits", async ({ page }) => {
await page.goto("/");
const result = await page.evaluate(() => new Promise<Record<string, unknown>>((resolve, reject) => {
const worker = new Worker("/src/workers/scripting-manifest-budget-test.worker.ts", { type: "module" });
worker.onmessage = (event: MessageEvent<Record<string, unknown>>) => { worker.terminate(); resolve(event.data); };
worker.onerror = (event) => { worker.terminate(); reject(new Error(event.message)); };
worker.postMessage({});
}));
expect(result.valid).toEqual([2, "scripts/base.py", "deps/base.py", 256]);
expect(result.count).toContain("SCRIPT_BUDGET_EXCEEDED");
expect(result.totalBytes).toContain("SCRIPT_BUDGET_EXCEEDED");
expect(result.module).toContain("SCRIPT_POLICY_DENIED");
expect(result.path).toContain("SCRIPT_MANIFEST_INVALID");
expect(result.dependency).toContain("SCRIPT_MANIFEST_INVALID");
expect(result.permission).toContain("SCRIPT_POLICY_DENIED");
});