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

Side by Side Diff: base/sync_socket_unittest.cc

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « base/sync_socket_posix.cc ('k') | base/sync_socket_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/macros.h"
6 #include "base/sync_socket.h" 6 #include "base/sync_socket.h"
7 #include "base/threading/simple_thread.h" 7 #include "base/threading/simple_thread.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace { 11 namespace {
12 12
13 const int kReceiveTimeoutInMilliseconds = 750; 13 const int kReceiveTimeoutInMilliseconds = 750;
14 14
15 class HangingReceiveThread : public base::DelegateSimpleThread::Delegate { 15 class HangingReceiveThread : public base::DelegateSimpleThread::Delegate {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 ASSERT_TRUE(socket_b.Shutdown()); 122 ASSERT_TRUE(socket_b.Shutdown());
123 thread.Stop(); 123 thread.Stop();
124 124
125 // Ensure the receive didn't just timeout. 125 // Ensure the receive didn't just timeout.
126 ASSERT_LT((base::TimeTicks::Now() - start).InMilliseconds(), 126 ASSERT_LT((base::TimeTicks::Now() - start).InMilliseconds(),
127 kReceiveTimeoutInMilliseconds); 127 kReceiveTimeoutInMilliseconds);
128 128
129 ASSERT_TRUE(socket_a.Close()); 129 ASSERT_TRUE(socket_a.Close());
130 ASSERT_TRUE(socket_b.Close()); 130 ASSERT_TRUE(socket_b.Close());
131 } 131 }
OLDNEW
« no previous file with comments | « base/sync_socket_posix.cc ('k') | base/sync_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698