Add browser download confirmation and parameterized client startup
This commit is contained in:
1 parent
028fec64be
commit
3cf197a98c
25 files changed
+568
-46
No files matched your search
@@ -171,6 +171,17 @@ int main() {
|
||||
add.Close();
|
||||
|
||||
SetWindowTextW(window.edit,L"中文输入内容");
|
||||
int dismissed=0; add.on_close=[&] { ++dismissed; };
|
||||
add.SetDownloadUrl(L"http://127.0.0.1/browser-file.zip",true);
|
||||
Check(add.Create(window.GetHWND(),AddTaskForm::kClassName.c_str(),L"Browser add task",640,240),"open browser confirmation dialog");
|
||||
Check(ttui::Window::EditText(GetDlgItem(add.GetHWND(),100))==L"http://127.0.0.1/browser-file.zip"
|
||||
&& (GetWindowLongPtrW(GetDlgItem(add.GetHWND(),100),GWL_STYLE)&ES_READONLY),"browser address is prefilled and bound to the captured request");
|
||||
Check(submissions==2,"opening browser dialog must not submit a task");
|
||||
add.Close(); Check(dismissed==1,"browser cancellation callback");
|
||||
add.SetDownloadUrl(L"http://127.0.0.1/next-file.zip",true);
|
||||
Check(add.Create(window.GetHWND(),AddTaskForm::kClassName.c_str(),L"Browser add task again",640,240),"reopen browser confirmation dialog");
|
||||
Check(ttui::Window::EditText(GetDlgItem(add.GetHWND(),100))==L"http://127.0.0.1/next-file.zip","reopened dialog displays new browser address");
|
||||
add.Close();
|
||||
Check(ttui::Window::EditText(window.edit)==L"中文输入内容","native edit roundtrip");
|
||||
Check(window.commands==0,"editing must not submit command");
|
||||
SendMessageW(window.GetHWND(),WM_PAINT,0,0);
|
||||
|
||||
Reference in new issue
Block a user