summaryrefslogtreecommitdiffstats
path: root/onlineupdate/workben
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-21 09:32:02 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-21 09:37:13 +0200
commit12b3725aeff5d016d11853c9c8d5077f7e8f7b71 (patch)
tree8c00dedc9445f5860f9787c5783a5bec895d175e /onlineupdate/workben
parenttrivial WaE when pdfium is disabled (diff)
downloadcore-12b3725aeff5d016d11853c9c8d5077f7e8f7b71.tar.gz
core-12b3725aeff5d016d11853c9c8d5077f7e8f7b71.zip
updater: add a way to test the dialog code of the updater
Change-Id: I7436edc85f87d1f68b50d39bf29564ff498c9ab9
Diffstat (limited to 'onlineupdate/workben')
-rw-r--r--onlineupdate/workben/test_dialog.cxx34
1 files changed, 34 insertions, 0 deletions
diff --git a/onlineupdate/workben/test_dialog.cxx b/onlineupdate/workben/test_dialog.cxx
new file mode 100644
index 000000000000..113ec07eebbd
--- /dev/null
+++ b/onlineupdate/workben/test_dialog.cxx
@@ -0,0 +1,34 @@
+#include "progressui.h"
+#include "progressui_win.cxx"
+
+#include <thread>
+#include <chrono>
+#include <iostream>
+
+void func()
+{
+ for (int i = 0; i <= 100; ++i)
+ {
+ std::this_thread::sleep_for(std::chrono::milliseconds(200));
+ UpdateProgressUI(i);
+ }
+ QuitProgressUI();
+}
+
+int wmain(int argc, wchar_t** argv)
+{
+ InitProgressUI(&argc, &argv);
+ std::thread a(func);
+ /*
+ volatile bool b = false;
+ do
+ {
+ std::this_thread::sleep_for(std::chrono::seconds(1));
+ }
+ while (!b);
+ */
+ int result = ShowProgressUI();
+ std::cout << result << std::endl;
+ a.join();
+ return 0;
+}