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

Unified Diff: mojo/edk/system/endpoint_relayer_unittest.cc

Issue 1430593005: EDK: Remove (direct) dependencies of //mojo/edk/system on //base/test. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « mojo/edk/system/channel_endpoint_unittest.cc ('k') | mojo/edk/system/ipc_support_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/endpoint_relayer_unittest.cc
diff --git a/mojo/edk/system/endpoint_relayer_unittest.cc b/mojo/edk/system/endpoint_relayer_unittest.cc
index 1b8b4402961e7339ea19a93f4ba9c38d066dd60d..ca35d7dfc11ac843998a912f1af559ea363b57cc 100644
--- a/mojo/edk/system/endpoint_relayer_unittest.cc
+++ b/mojo/edk/system/endpoint_relayer_unittest.cc
@@ -6,12 +6,13 @@
#include "base/logging.h"
#include "base/synchronization/waitable_event.h"
-#include "base/test/test_timeouts.h"
+#include "base/time/time.h"
#include "mojo/edk/system/channel_endpoint_id.h"
#include "mojo/edk/system/channel_test_base.h"
#include "mojo/edk/system/message_in_transit_queue.h"
#include "mojo/edk/system/message_in_transit_test_utils.h"
#include "mojo/edk/system/ref_ptr.h"
+#include "mojo/edk/system/test/timeouts.h"
#include "mojo/edk/system/test_channel_endpoint_client.h"
#include "mojo/edk/util/make_unique.h"
#include "mojo/public/cpp/system/macros.h"
@@ -96,7 +97,8 @@ TEST_F(EndpointRelayerTest, Basic) {
EXPECT_TRUE(endpoint1a()->EnqueueMessage(test::MakeTestMessage(12345)));
- EXPECT_TRUE(read_event.TimedWait(TestTimeouts::tiny_timeout()));
+ EXPECT_TRUE(read_event.TimedWait(base::TimeDelta::FromMicroseconds(
+ static_cast<int64_t>(test::TinyTimeout()))));
client1b()->SetReadEvent(nullptr);
ASSERT_EQ(1u, client1b()->NumMessages());
@@ -111,7 +113,8 @@ TEST_F(EndpointRelayerTest, Basic) {
EXPECT_TRUE(endpoint1b()->EnqueueMessage(test::MakeTestMessage(67890)));
- EXPECT_TRUE(read_event.TimedWait(TestTimeouts::tiny_timeout()));
+ EXPECT_TRUE(read_event.TimedWait(base::TimeDelta::FromMicroseconds(
+ static_cast<int64_t>(test::TinyTimeout()))));
client1a()->SetReadEvent(nullptr);
ASSERT_EQ(1u, client1a()->NumMessages());
@@ -130,7 +133,8 @@ TEST_F(EndpointRelayerTest, MultipleMessages) {
base::WaitableEvent read_event(true, false);
client1b()->SetReadEvent(&read_event);
for (size_t i = 0; client1b()->NumMessages() < 5 && i < 5; i++) {
- EXPECT_TRUE(read_event.TimedWait(TestTimeouts::tiny_timeout()));
+ EXPECT_TRUE(read_event.TimedWait(base::TimeDelta::FromMicroseconds(
+ static_cast<int64_t>(test::TinyTimeout()))));
read_event.Reset();
}
client1b()->SetReadEvent(nullptr);
@@ -201,7 +205,8 @@ TEST_F(EndpointRelayerTest, Filter) {
base::WaitableEvent read_event(true, false);
client1b()->SetReadEvent(&read_event);
for (size_t i = 0; client1b()->NumMessages() < 5 && i < 5; i++) {
- EXPECT_TRUE(read_event.TimedWait(TestTimeouts::tiny_timeout()));
+ EXPECT_TRUE(read_event.TimedWait(base::TimeDelta::FromMicroseconds(
+ static_cast<int64_t>(test::TinyTimeout()))));
read_event.Reset();
}
client1b()->SetReadEvent(nullptr);
« no previous file with comments | « mojo/edk/system/channel_endpoint_unittest.cc ('k') | mojo/edk/system/ipc_support_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698