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

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

Issue 908363002: PPAPI: Make tests that disable the proxy lock re-enable it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add export Created 5 years, 10 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
« no previous file with comments | « ppapi/shared_impl/tracked_callback_unittest.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "ppapi/shared_impl/proxy_lock.h" 8 #include "ppapi/shared_impl/proxy_lock.h"
9 #include "ppapi/shared_impl/var.h" 9 #include "ppapi/shared_impl/var.h"
10 #include "ppapi/shared_impl/var_tracker.h" 10 #include "ppapi/shared_impl/var_tracker.h"
(...skipping 24 matching lines...) Expand all
35 35
36 } // namespace 36 } // namespace
37 37
38 class VarTrackerTest : public testing::Test { 38 class VarTrackerTest : public testing::Test {
39 public: 39 public:
40 VarTrackerTest() {} 40 VarTrackerTest() {}
41 41
42 // Test implementation. 42 // Test implementation.
43 virtual void SetUp() override { 43 virtual void SetUp() override {
44 ASSERT_EQ(0, mock_var_alive_count); 44 ASSERT_EQ(0, mock_var_alive_count);
45 ProxyLock::EnableLockingOnThreadForTest();
46 } 45 }
47 virtual void TearDown() override {} 46 virtual void TearDown() override {}
48 47
49 VarTracker& var_tracker() { return *globals_.GetVarTracker(); } 48 VarTracker& var_tracker() { return *globals_.GetVarTracker(); }
50 49
51 private: 50 private:
52 TestGlobals globals_; 51 TestGlobals globals_;
53 }; 52 };
54 53
55 // Test that ResetVarID is called when the last PP_Var ref was deleted but the 54 // Test that ResetVarID is called when the last PP_Var ref was deleted but the
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 another_var = NULL; 142 another_var = NULL;
144 EXPECT_TRUE(var_tracker().GetVar(pp_var)); 143 EXPECT_TRUE(var_tracker().GetVar(pp_var));
145 EXPECT_EQ(1, mock_var_alive_count); 144 EXPECT_EQ(1, mock_var_alive_count);
146 145
147 // Releasing plugin reference. 146 // Releasing plugin reference.
148 EXPECT_TRUE(var_tracker().ReleaseVar(pp_var)); 147 EXPECT_TRUE(var_tracker().ReleaseVar(pp_var));
149 EXPECT_EQ(0, mock_var_alive_count); 148 EXPECT_EQ(0, mock_var_alive_count);
150 } 149 }
151 150
152 } // namespace ppapi 151 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/tracked_callback_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698