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

Unified Diff: test/win/win_child_process_test.cc

Issue 1336823002: win x86: Grab bag of restructuring to get tests working on x86-on-x86 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes2 Created 5 years, 3 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: test/win/win_child_process_test.cc
diff --git a/test/win/win_child_process_test.cc b/test/win/win_child_process_test.cc
index bdf627a8a08d7a6a16a17862ecaa8fe1c5e3bce5..e191dcc9fef9a55263cd0c675aef7988d0ac5007 100644
--- a/test/win/win_child_process_test.cc
+++ b/test/win/win_child_process_test.cc
@@ -14,6 +14,7 @@
#include "test/win/win_child_process.h"
+#include <stdlib.h>
#include <windows.h>
#include "base/basictypes.h"
@@ -49,7 +50,7 @@ class TestWinChildProcess final : public WinChildProcess {
int Run() override {
int value = ReadInt(ReadPipeHandle());
WriteInt(WritePipeHandle(), value);
- return EXIT_SUCCESS;
+ return testing::Test::HasFailure() ? EXIT_FAILURE : EXIT_SUCCESS;
}
DISALLOW_COPY_AND_ASSIGN(TestWinChildProcess);
@@ -58,7 +59,9 @@ class TestWinChildProcess final : public WinChildProcess {
TEST(WinChildProcessTest, WinChildProcess) {
WinChildProcess::EntryPoint<TestWinChildProcess>();
- WinChildProcess::Launch();
+ scoped_ptr<WinChildProcess::Handles> handles = WinChildProcess::Launch();
+ WriteInt(handles->write.get(), 1);
+ ASSERT_EQ(1, ReadInt(handles->read.get()));
}
TEST(WinChildProcessTest, MultipleChildren) {

Powered by Google App Engine
This is Rietveld 408576698