Sessione salvata: copia alla chiusura della finestra e alla fine della guida, «Serve «Ho finito»», scelta per la copia incompleta e stato in Collegamento (#36, S4b)
Risposte 1, 5, 6, 9 e 10 di Alberto a S4. I valori __spin_r, __spin_b e __spin_t si copiano dalla pagina come gli altri (su Instagram da SiteData, ipotesi H23, operazioni ancora non configurate; nel sito di prova dal modulo GiroProva). La sessione si copia anche quando si chiude la finestra del browser su Windows e quando il permesso di guida finisce, sempre prima che la pagina torni al motore e con le garanzie di «Ho finito». Con «richieste» «Collegato» vuole una sessione salvata leggibile, altrimenti lo stato è «Serve «Ho finito»» e il motore aspetta. Nuova impostazione sessione.copia-incompleta (sostituisci, predefinita, o tieni-completa) e riquadro della sessione salvata nella pagina Collegamento, con soli conteggi e nomi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9958745e53
commit
883ea4683c
41 files changed
+1349
-101
No files matched your search
@@ -196,6 +196,33 @@ internal sealed class FakeBrowser : IFebeBrowser
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Like Alberto closing the real window «Browser di Febe» (WebView2Host.Done, issue #36, S4b): out of view at once,
|
||||
/// the copy of the session before the page goes back to the engine (a hold keeps it his meanwhile), then the lease ends.
|
||||
/// </summary>
|
||||
public async Task CloseWindowAsync(CancellationToken ct)
|
||||
{
|
||||
Hidden++;
|
||||
if (_lease is null || _context.CopyOnWindowClosed is not { } copy)
|
||||
{
|
||||
_lease?.Dispose();
|
||||
_lease = null;
|
||||
return;
|
||||
}
|
||||
|
||||
var hold = UserDriving.Begin();
|
||||
_lease.Dispose();
|
||||
_lease = null;
|
||||
try
|
||||
{
|
||||
await copy(ct);
|
||||
}
|
||||
finally
|
||||
{
|
||||
hold.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The next «Scollega» finds a file held by another process (Windows) and cannot delete the profile.</summary>
|
||||
public bool ProfileLocked { get; set; }
|
||||
|
||||
@@ -244,6 +271,9 @@ internal sealed class FakeCdp : ICdpSession
|
||||
/// </summary>
|
||||
public JsonObject? PageCapture { get; set; } = DefaultPageCapture();
|
||||
|
||||
/// <summary>Called when the copy's evaluation is asked, before it answers (what the test wants to look at then).</summary>
|
||||
public Action? OnCapture { get; set; }
|
||||
|
||||
/// <summary>How many times the copy's evaluation (the one that reads <c>navigator.userAgent</c>) was asked.</summary>
|
||||
public int CaptureReads => Volatile.Read(ref _captureReads);
|
||||
|
||||
@@ -267,6 +297,9 @@ internal sealed class FakeCdp : ICdpSession
|
||||
["comet_req"] = Febe.SitoDiProva.TestSite.CometReq,
|
||||
["ccg"] = Febe.SitoDiProva.TestSite.ConnectionClass,
|
||||
["entry_nonce"] = Febe.SitoDiProva.TestSite.EntryNonce,
|
||||
["spin_r"] = Febe.SitoDiProva.TestSite.SpinRevision,
|
||||
["spin_b"] = Febe.SitoDiProva.TestSite.SpinBranch,
|
||||
["spin_t"] = Febe.SitoDiProva.TestSite.SpinTime,
|
||||
},
|
||||
["docIds"] = new JsonObject { [Febe.SitoDiProva.TestSite.ProfileQuery] = Febe.SitoDiProva.TestSite.DocIds[Febe.SitoDiProva.TestSite.ProfileQuery] },
|
||||
};
|
||||
@@ -366,6 +399,7 @@ internal sealed class FakeCdp : ICdpSession
|
||||
private JsonObject Capture()
|
||||
{
|
||||
Interlocked.Increment(ref _captureReads);
|
||||
OnCapture?.Invoke();
|
||||
return PageCapture is { } page
|
||||
? new JsonObject { ["result"] = new JsonObject { ["type"] = "object", ["value"] = JsonNode.Parse(page.ToJsonString()) } }
|
||||
: new JsonObject();
|
||||
|
||||
Reference in new issue
Block a user