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

Side by Side Diff: base/threading/platform_thread_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
« no previous file with comments | « base/threading/platform_thread.h ('k') | base/threading/platform_thread_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 (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 #include "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "base/threading/platform_thread.h" 8 #include "base/threading/platform_thread.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 #if defined(OS_WIN)
12 #include <windows.h>
13 #endif
14
15 namespace base { 11 namespace base {
16 12
17 // Trivial tests that thread runs and doesn't crash on create and join --------- 13 // Trivial tests that thread runs and doesn't crash on create and join ---------
18 14
19 class TrivialThread : public PlatformThread::Delegate { 15 class TrivialThread : public PlatformThread::Delegate {
20 public: 16 public:
21 TrivialThread() : did_run_(false) {} 17 TrivialThread() : did_run_(false) {}
22 18
23 void ThreadMain() override { did_run_ = true; } 19 void ThreadMain() override { did_run_ = true; }
24 20
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 262 }
267 263
268 // Restore current thread priority for follow-up tests. 264 // Restore current thread priority for follow-up tests.
269 PlatformThread::SetThreadPriority(current_handle, ThreadPriority::NORMAL); 265 PlatformThread::SetThreadPriority(current_handle, ThreadPriority::NORMAL);
270 266
271 thread.MarkForTermination(); 267 thread.MarkForTermination();
272 PlatformThread::Join(handle); 268 PlatformThread::Join(handle);
273 } 269 }
274 270
275 } // namespace base 271 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/platform_thread.h ('k') | base/threading/platform_thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698