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

Side by Side Diff: base/synchronization/condition_variable_unittest.cc

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Multi-threaded tests of ConditionVariable class. 5 // Multi-threaded tests of ConditionVariable class.
6 6
7 #include <time.h> 7 #include <time.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // We can't use EXPECT_GE here as the TimeDelta class does not support the 236 // We can't use EXPECT_GE here as the TimeDelta class does not support the
237 // required stream conversion. 237 // required stream conversion.
238 EXPECT_TRUE(duration >= kWaitTime); 238 EXPECT_TRUE(duration >= kWaitTime);
239 EXPECT_TRUE(duration <= TimeDelta::FromSeconds(kDiscontinuitySeconds)); 239 EXPECT_TRUE(duration <= TimeDelta::FromSeconds(kDiscontinuitySeconds));
240 240
241 lock.Release(); 241 lock.Release();
242 } 242 }
243 #endif 243 #endif
244 244
245 245
246 // Suddenly got flaky on Win, see http://crbug.com/10607 (starting at
247 // comment #15).
248 #if defined(OS_WIN)
249 #define MAYBE_MultiThreadConsumerTest DISABLED_MultiThreadConsumerTest
250 #else
251 #define MAYBE_MultiThreadConsumerTest MultiThreadConsumerTest 246 #define MAYBE_MultiThreadConsumerTest MultiThreadConsumerTest
252 #endif
253 // Test serial task servicing, as well as two parallel task servicing methods. 247 // Test serial task servicing, as well as two parallel task servicing methods.
254 TEST_F(ConditionVariableTest, MAYBE_MultiThreadConsumerTest) { 248 TEST_F(ConditionVariableTest, MAYBE_MultiThreadConsumerTest) {
255 const int kThreadCount = 10; 249 const int kThreadCount = 10;
256 WorkQueue queue(kThreadCount); // Start the threads. 250 WorkQueue queue(kThreadCount); // Start the threads.
257 251
258 const int kTaskCount = 10; // Number of tasks in each mini-test here. 252 const int kTaskCount = 10; // Number of tasks in each mini-test here.
259 253
260 Time start_time; // Used to time task processing. 254 Time start_time; // Used to time task processing.
261 255
262 { 256 {
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 base::AutoLock auto_lock(lock_); 750 base::AutoLock auto_lock(lock_);
757 // Send notification that we completed our "work." 751 // Send notification that we completed our "work."
758 WorkIsCompleted(thread_id); 752 WorkIsCompleted(thread_id);
759 } 753 }
760 } 754 }
761 } 755 }
762 756
763 } // namespace 757 } // namespace
764 758
765 } // namespace base 759 } // namespace base
OLDNEW
« no previous file with comments | « base/synchronization/condition_variable.h ('k') | base/synchronization/condition_variable_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698