Share native current-line speech with Remote
This commit is contained in:
1 parent
103fbfd81a
commit
ee3d91af23
11 files changed
+289
-16
No files matched your search
@@ -572,6 +572,16 @@ func TestRemoteConnectionCommandPrivateRelay(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
for _, private := range []bool{false, true} {
|
||||
result := native_current_line_result()
|
||||
if private {
|
||||
result.DocumentCaretText = "private native text"
|
||||
result.DocumentCaretContext[1].Role = "password text"
|
||||
}
|
||||
if err := worker.EnqueueAndWait(t.Context(), current_line_observation_request(t, result)); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
for _, kind := range []string{"object", "line"} {
|
||||
for _, privacy := range []string{"ordinary", "snapshot-ancestor", "stale"} {
|
||||
request := review_observation_request(t, kind, review_observation_result(t, kind, privacy))
|
||||
@@ -620,7 +630,7 @@ func TestRemoteConnectionCommandPrivateRelay(t *testing.T) {
|
||||
t.Fatal("reader output did not reach the relay in order")
|
||||
}
|
||||
}
|
||||
if received.String() != "color "+remoteText+"First color.Second color.Current color.Review color.staticFlat color. Review color.Review color.static" || frames < 10 || ends != 9 {
|
||||
if received.String() != "color "+remoteText+"First color.Second color.Current color.Native color.Review color.staticFlat color. Review color.Review color.static" || frames < 11 || ends != 10 {
|
||||
t.Fatalf("observation leaked private text or lost resolved output/boundaries: frames=%d ends=%d suffix=%q", frames, ends, received.String()[max(0, received.Len()-160):])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user