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

Side by Side Diff: ppapi/shared_impl/tracked_callback_unittest.cc

Issue 136683004: Removes MessageLoop::TYPE_XXX where possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolve merge Created 6 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 | « ppapi/proxy/ppb_message_loop_proxy.cc ('k') | remoting/host/daemon_process_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) 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/bind.h" 5 #include "base/bind.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "ppapi/c/pp_completion_callback.h" 8 #include "ppapi/c/pp_completion_callback.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/shared_impl/callback_tracker.h" 10 #include "ppapi/shared_impl/callback_tracker.h"
11 #include "ppapi/shared_impl/proxy_lock.h" 11 #include "ppapi/shared_impl/proxy_lock.h"
12 #include "ppapi/shared_impl/resource.h" 12 #include "ppapi/shared_impl/resource.h"
13 #include "ppapi/shared_impl/resource_tracker.h" 13 #include "ppapi/shared_impl/resource_tracker.h"
14 #include "ppapi/shared_impl/test_globals.h" 14 #include "ppapi/shared_impl/test_globals.h"
15 #include "ppapi/shared_impl/tracked_callback.h" 15 #include "ppapi/shared_impl/tracked_callback.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 namespace ppapi { 18 namespace ppapi {
19 19
20 namespace { 20 namespace {
21 21
22 class TrackedCallbackTest : public testing::Test { 22 class TrackedCallbackTest : public testing::Test {
23 public: 23 public:
24 TrackedCallbackTest() 24 TrackedCallbackTest() : pp_instance_(1234) {}
25 : message_loop_(base::MessageLoop::TYPE_DEFAULT), pp_instance_(1234) {}
26 25
27 PP_Instance pp_instance() const { return pp_instance_; } 26 PP_Instance pp_instance() const { return pp_instance_; }
28 27
29 virtual void SetUp() OVERRIDE { 28 virtual void SetUp() OVERRIDE {
30 ProxyLock::EnableLockingOnThreadForTest(); 29 ProxyLock::EnableLockingOnThreadForTest();
31 ProxyAutoLock lock; 30 ProxyAutoLock lock;
32 globals_.GetResourceTracker()->DidCreateInstance(pp_instance_); 31 globals_.GetResourceTracker()->DidCreateInstance(pp_instance_);
33 } 32 }
34 virtual void TearDown() OVERRIDE { 33 virtual void TearDown() OVERRIDE {
35 ProxyAutoLock lock; 34 ProxyAutoLock lock;
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 resource->CheckFinalState(); 338 resource->CheckFinalState();
340 339
341 // This shouldn't be needed, but make sure there are no stranded tasks. 340 // This shouldn't be needed, but make sure there are no stranded tasks.
342 { 341 {
343 ProxyAutoUnlock unlock; 342 ProxyAutoUnlock unlock;
344 base::MessageLoop::current()->RunUntilIdle(); 343 base::MessageLoop::current()->RunUntilIdle();
345 } 344 }
346 } 345 }
347 346
348 } // namespace ppapi 347 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_message_loop_proxy.cc ('k') | remoting/host/daemon_process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698