(page: Page, name: string)
| 51 | `; |
| 52 | |
| 53 | async function getScriptInfo(page: Page, name: string): Promise<{ uuid: string; config: any } | null> { |
| 54 | return page.evaluate((n: string) => { |
| 55 | return new Promise((resolve) => { |
| 56 | chrome.storage.local.get(null, (all) => { |
| 57 | for (const k of Object.keys(all)) { |
| 58 | if (k.startsWith("script:") && all[k]?.name === n) { |
| 59 | resolve({ uuid: all[k].uuid, config: all[k].config }); |
| 60 | return; |
| 61 | } |
| 62 | } |
| 63 | resolve(null); |
| 64 | }); |
| 65 | }); |
| 66 | }, name); |
| 67 | } |
| 68 | |
| 69 | test.describe("UserConfig YAML prototype pollution (#1494)", () => { |
| 70 | test("合法 @userConfig 正常安装、解析结构正确、配置面板可打开", async ({ context, extensionId }) => { |
no test coverage detected