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

Side by Side Diff: base/metrics/stats_table_unittest.cc

Issue 6079009: Move some misc thread-related stuff from base to base/thread and into the bas... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/lazy_instance_unittest.cc ('k') | base/non_thread_safe_unittest.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/metrics/stats_counters.h"
6 #include "base/metrics/stats_table.h"
5 #include "base/platform_thread.h" 7 #include "base/platform_thread.h"
6 #include "base/simple_thread.h"
7 #include "base/shared_memory.h" 8 #include "base/shared_memory.h"
8 #include "base/metrics/stats_table.h"
9 #include "base/metrics/stats_counters.h"
10 #include "base/string_piece.h" 9 #include "base/string_piece.h"
11 #include "base/string_util.h" 10 #include "base/string_util.h"
12 #include "base/test/multiprocess_test.h" 11 #include "base/test/multiprocess_test.h"
12 #include "base/threading/simple_thread.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "testing/multiprocess_func_list.h" 15 #include "testing/multiprocess_func_list.h"
16 16
17 namespace base { 17 namespace base {
18 18
19 class StatsTableTest : public MultiProcessTest { 19 class StatsTableTest : public MultiProcessTest {
20 public: 20 public:
21 void DeleteShmem(const std::string& name) { 21 void DeleteShmem(const std::string& name) {
22 SharedMemory mem; 22 SharedMemory mem;
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 PlatformThread::Sleep(kRunMs); 402 PlatformThread::Sleep(kRunMs);
403 } 403 }
404 EXPECT_LE(kRunMs * 2, table.GetCounterValue("t:foo")); 404 EXPECT_LE(kRunMs * 2, table.GetCounterValue("t:foo"));
405 EXPECT_LE(kRunMs * 2, table.GetCounterValue("t:bar")); 405 EXPECT_LE(kRunMs * 2, table.GetCounterValue("t:bar"));
406 EXPECT_EQ(2, table.GetCounterValue("c:bar")); 406 EXPECT_EQ(2, table.GetCounterValue("c:bar"));
407 407
408 DeleteShmem(kTableName); 408 DeleteShmem(kTableName);
409 } 409 }
410 410
411 } // namespace base 411 } // namespace base
OLDNEW
« no previous file with comments | « base/lazy_instance_unittest.cc ('k') | base/non_thread_safe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698