More fixes discovered based on Deedra's work.
This commit is contained in:
1 parent
de31e5b513
commit
17052c5147
22 files changed
+561
-76
No files matched your search
@@ -5,6 +5,9 @@
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../list_view.h"
|
||||
#include "../native_query.h"
|
||||
#include "../edit_hook.h"
|
||||
#if __has_include("../review_capture.h")
|
||||
#include "../review_capture.h"
|
||||
#define HAS_CAPTURE 1
|
||||
@@ -173,6 +176,34 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
if (mode != 4) ok &= check(SendMessageW(window, WM_APP + 11, 0, 0), "capture leaves caret and focus unchanged");
|
||||
}
|
||||
SendMessageW(window, WM_APP + 10, 34, 0);
|
||||
auto started = GetTickCount64();
|
||||
auto delayed_row = read_list_view(GetDlgItem(window, 107));
|
||||
ok &= check(!delayed_row.available, "timed-out row is not cached as a successful read");
|
||||
ok &= check(GetTickCount64() - started < 400, "ordinary native read times out promptly");
|
||||
{
|
||||
native_control::RemoteBuffer another(GetDlgItem(window,107), 128);
|
||||
ok &= check(!another, "late native request prevents repeated remote allocations");
|
||||
}
|
||||
Sleep(750);
|
||||
ok &= check(SendMessageW(window,WM_APP + 15,0,0), "ordinary native read retains its remote buffer after timeout");
|
||||
MSG completion{};
|
||||
PeekMessageW(&completion,nullptr,0,0,PM_NOREMOVE);
|
||||
{
|
||||
native_control::RemoteBuffer recovered(GetDlgItem(window,107),128);
|
||||
ok &= check(static_cast<bool>(recovered), "completed native request releases allocation backpressure");
|
||||
}
|
||||
auto recovered_row = read_list_view(GetDlgItem(window,107));
|
||||
ok &= check(recovered_row.available && recovered_row.text.find("ready") != std::string::npos,
|
||||
"ordinary native text recovers after a late reply");
|
||||
SendMessageW(window, WM_APP + 10, 35, 0);
|
||||
ok &= check(GetPropW(GetDlgItem(window,115),EDIT_REVIEW_PROPERTY) == nullptr,
|
||||
"large output starts without a focus-installed subclass");
|
||||
auto large_capture = capture();
|
||||
ok &= check(large_capture.status == "ok" && joined(large_capture).find("aaaa") != std::string::npos,
|
||||
"600000-unit ANSI Edit reviews safely through a real hook on a 1 MiB stack");
|
||||
ok &= check(GetPropW(GetDlgItem(window,115),EDIT_REVIEW_PROPERTY) != nullptr,
|
||||
"large review exercised the native Edit query");
|
||||
// A local provider avoids cross-process WM_GETTEXT marshalling, which
|
||||
// itself truncates at the first NUL. Its BSTR retains malformed padding.
|
||||
WNDCLASSW local{};local.hInstance=GetModuleHandleW(nullptr);
|
||||
|
||||
Reference in new issue
Block a user