Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: sandbox/win/tests/integration_tests/integration_tests.cc

Issue 2944493002: [Windows Sandbox Tests] Process Mitigations. (Closed)
Patch Set: Code review fixes, part 2. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sandbox/win/tests/integration_tests/integration_tests.cc
diff --git a/sandbox/win/tests/integration_tests/integration_tests.cc b/sandbox/win/tests/integration_tests/integration_tests.cc
index 3920da198b7d15b6b9ffa93ee6ba96a33708a3c3..5c32c609c842f6e6ae30754d25173ec3b1d5a502 100644
--- a/sandbox/win/tests/integration_tests/integration_tests.cc
+++ b/sandbox/win/tests/integration_tests/integration_tests.cc
@@ -5,8 +5,20 @@
#include "base/bind.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
-#include "testing/gtest/include/gtest/gtest.h"
+#include "base/test/test_timeouts.h"
#include "sandbox/win/tests/common/controller.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace sandbox {
+// Common function used for timeout with Win APIs like ::WaitForSingleObject().
+DWORD SboxTestEventTimeout() {
+ if (::IsDebuggerPresent())
+ return INFINITE;
+
+ return static_cast<DWORD>(
+ (TestTimeouts::action_timeout()).InMillisecondsRoundedUp());
+}
+}
int wmain(int argc, wchar_t **argv) {
if (argc >= 2) {

Powered by Google App Engine
This is Rietveld 408576698