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

Side by Side Diff: base/tools_sanity_unittest.cc

Issue 19224003: Use a direct include of the message_loop header in base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « base/timer/timer_unittest.cc ('k') | base/win/metro.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 // This file contains intentional memory errors, some of which may lead to 5 // This file contains intentional memory errors, some of which may lead to
6 // crashes if the test is ran without special memory testing tools. We use these 6 // crashes if the test is ran without special memory testing tools. We use these
7 // errors to verify the sanity of the tools. 7 // errors to verify the sanity of the tools.
8 8
9 #include "base/atomicops.h" 9 #include "base/atomicops.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 11 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace base { 15 namespace base {
16 16
17 namespace { 17 namespace {
18 18
19 const base::subtle::Atomic32 kMagicValue = 42; 19 const base::subtle::Atomic32 kMagicValue = 42;
20 20
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 TEST(ToolsSanityTest, AtomicsAreIgnored) { 265 TEST(ToolsSanityTest, AtomicsAreIgnored) {
266 base::subtle::Atomic32 shared = 0; 266 base::subtle::Atomic32 shared = 0;
267 ReleaseStoreThread thread1(&shared); 267 ReleaseStoreThread thread1(&shared);
268 AcquireLoadThread thread2(&shared); 268 AcquireLoadThread thread2(&shared);
269 RunInParallel(&thread1, &thread2); 269 RunInParallel(&thread1, &thread2);
270 EXPECT_EQ(kMagicValue, shared); 270 EXPECT_EQ(kMagicValue, shared);
271 } 271 }
272 272
273 } // namespace base 273 } // namespace base
OLDNEW
« no previous file with comments | « base/timer/timer_unittest.cc ('k') | base/win/metro.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698