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

Unified Diff: test/win/win_multiprocess_test.cc

Issue 1151953002: win: Add WinMultiprocess for multiprocess Windows tests (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 5 years, 7 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
« test/win/win_multiprocess.cc ('K') | « test/win/win_multiprocess.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/win/win_multiprocess_test.cc
diff --git a/util/win/time_test.cc b/test/win/win_multiprocess_test.cc
similarity index 59%
copy from util/win/time_test.cc
copy to test/win/win_multiprocess_test.cc
index ad0771e38b7889ab92154490845a0c3aafe13782..18b6ca427cc326ee5b10cd8fbb9f8d8556695351 100644
--- a/util/win/time_test.cc
+++ b/test/win/win_multiprocess_test.cc
@@ -12,21 +12,33 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "util/win/time.h"
+#include "test/win/win_multiprocess.h"
+#include "base/basictypes.h"
#include "gtest/gtest.h"
namespace crashpad {
namespace test {
namespace {
-TEST(Time, Reasonable) {
- timeval t;
- GetTimeOfDay(&t);
- // Assume that time's time_t return is seconds from 1970.
- time_t approx_now = time(nullptr);
- EXPECT_GE(approx_now, t.tv_sec);
- EXPECT_LT(approx_now - 100, t.tv_sec);
+class TestWinMultiprocess final : public WinMultiprocess {
+ public:
+ TestWinMultiprocess() : WinMultiprocess() {}
+
+ ~TestWinMultiprocess() {}
+
+ private:
+ // WinMultiprocess will have already exercised the pipes.
+ void WinMultiprocessParent() override {}
+
+ void WinMultiprocessChild() override {}
+
+ DISALLOW_COPY_AND_ASSIGN(TestWinMultiprocess);
+};
+
+TEST(WinMultiprocess, WinMultiprocess) {
+ TestWinMultiprocess win_multiprocess;
+ win_multiprocess.Run();
}
} // namespace
« test/win/win_multiprocess.cc ('K') | « test/win/win_multiprocess.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698