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

Side by Side Diff: base/observer_list_unittest.cc

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/observer_list.h" 6 #include "base/observer_list.h"
7 #include "base/observer_list_threadsafe.h" 7 #include "base/observer_list_threadsafe.h"
8 #include "base/platform_thread.h" 8 #include "base/platform_thread.h"
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 using base::Time;
13
12 namespace { 14 namespace {
13 15
14 class ObserverListTest : public testing::Test { 16 class ObserverListTest : public testing::Test {
15 }; 17 };
16 18
17 class Foo { 19 class Foo {
18 public: 20 public:
19 virtual void Observe(int x) = 0; 21 virtual void Observe(int x) = 0;
20 virtual ~Foo() {} 22 virtual ~Foo() {}
21 }; 23 };
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // Use 7 observer threads. Notifications only come from 255 // Use 7 observer threads. Notifications only come from
254 // the main thread. 256 // the main thread.
255 ThreadSafeObserverHarness(7, false); 257 ThreadSafeObserverHarness(7, false);
256 } 258 }
257 259
258 TEST(ObserverListThreadSafeTest, CrossThreadNotifications) { 260 TEST(ObserverListThreadSafeTest, CrossThreadNotifications) {
259 // Use 3 observer threads. Notifications will fire from 261 // Use 3 observer threads. Notifications will fire from
260 // the main thread and all 3 observer threads. 262 // the main thread and all 3 observer threads.
261 ThreadSafeObserverHarness(3, true); 263 ThreadSafeObserverHarness(3, true);
262 } 264 }
OLDNEW
« no previous file with comments | « base/message_pump_win.cc ('k') | base/perftimer.h » ('j') | base/time_format.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698