修改完成55%

This commit is contained in:
2026-07-15 08:31:21 +08:00
parent 8c98936da5
commit 241a7af54c
98 changed files with 3269 additions and 782 deletions
+20 -1
View File
@@ -42,5 +42,24 @@ if ($captureScript -notmatch 'performance\.timeOrigin') {
if ($captureScript -notmatch 'await waitForFreshDocument\(send, documentTimeOrigin\)') {
throw 'Chrome capture must wait for a fresh document before checking the target selector'
}
if ($captureScript -notmatch "action !== 'fresh-navigation'") {
throw 'Chrome capture must support fresh-navigation for root pages whose tab lifecycle closes a reloaded CDP target'
}
foreach ($g06Action in @('g06-results', 'g06-empty')) {
if ($captureScript -notmatch [regex]::Escape($g06Action)) {
throw "Chrome capture must support the $g06Action visual state"
}
}
if ($captureScript -notmatch 'const prepareG06State = async \(send, action\) =>') {
throw 'Chrome capture must prepare G06 search states through the real input and action controls'
}
if ($captureScript -notmatch 'await prepareG06State\(send, action\)') {
throw 'Chrome capture must wait for the requested G06 state before taking a screenshot'
}
if ($captureScript -notmatch "item\.url\.startsWith\('http://localhost:5173'\)") {
throw 'Chrome capture must select the application page instead of a DevTools page containing localhost in its query'
}
if ($captureScript -match "item\.url\.includes\('localhost:5173'\)") {
throw 'Chrome capture must not use an ambiguous localhost substring when selecting its CDP target'
}
Write-Output 'CAPTURE-CHROME-PAGE-CONTRACT PASS'