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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 7968: Get url_request_unittest.cc to build on Linux. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | « net/url_request/url_request_unittest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.cc
===================================================================
--- net/url_request/url_request_unittest.cc (revision 4466)
+++ net/url_request/url_request_unittest.cc (working copy)
@@ -331,6 +331,7 @@
MessageLoop::current()->Run();
+#if defined(OS_WIN)
HANDLE file = CreateFile(path.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
ASSERT_NE(INVALID_HANDLE_VALUE, file);
@@ -352,6 +353,9 @@
ASSERT_EQ(size, d.bytes_received());
EXPECT_EQ(0, memcmp(d.data_received().c_str(), buf.get(), size));
+#else
+ NOTIMPLEMENTED();
+#endif
}
#ifndef NDEBUG
DCHECK_EQ(url_request_metrics.object_count,0);
@@ -696,7 +700,7 @@
// Make sure that the response time of a future response will be in the
// future!
- Sleep(10);
+ PlatformThread::Sleep(10);
// expect a cache hit
{
@@ -748,7 +752,7 @@
// Let some time pass so we can ensure that a future response will have a
// response time value in the future.
- Sleep(10 /* milliseconds */);
+ PlatformThread::Sleep(10 /* milliseconds */);
// repeat request with end-to-end validation. since auth-basic results in a
// cachable page, we expect this test to result in a 304. in which case, the
« no previous file with comments | « net/url_request/url_request_unittest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698