OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ppapi/shared_impl/var_value_conversions.h" | 5 #include "ppapi/shared_impl/var_value_conversions.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <cstring> | 8 #include <cstring> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 class VarValueConversionsTest : public testing::Test { | 136 class VarValueConversionsTest : public testing::Test { |
137 public: | 137 public: |
138 VarValueConversionsTest() { | 138 VarValueConversionsTest() { |
139 } | 139 } |
140 virtual ~VarValueConversionsTest() { | 140 virtual ~VarValueConversionsTest() { |
141 } | 141 } |
142 | 142 |
143 // testing::Test implementation. | 143 // testing::Test implementation. |
144 virtual void SetUp() { | 144 virtual void SetUp() { |
| 145 ProxyLock::EnableLockingOnThreadForTest(); |
145 ProxyLock::Acquire(); | 146 ProxyLock::Acquire(); |
146 } | 147 } |
147 virtual void TearDown() { | 148 virtual void TearDown() { |
148 ASSERT_TRUE(PpapiGlobals::Get()->GetVarTracker()->GetLiveVars().empty()); | 149 ASSERT_TRUE(PpapiGlobals::Get()->GetVarTracker()->GetLiveVars().empty()); |
149 ProxyLock::Release(); | 150 ProxyLock::Release(); |
150 } | 151 } |
151 | 152 |
152 private: | 153 private: |
153 TestGlobals globals_; | 154 TestGlobals globals_; |
154 }; | 155 }; |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 const base::Value* value = NULL; | 387 const base::Value* value = NULL; |
387 ASSERT_TRUE(list_value.Get(i, &value)); | 388 ASSERT_TRUE(list_value.Get(i, &value)); |
388 ASSERT_TRUE(Equals(*value, vars[i])); | 389 ASSERT_TRUE(Equals(*value, vars[i])); |
389 | 390 |
390 PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(vars[i]); | 391 PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(vars[i]); |
391 } | 392 } |
392 } | 393 } |
393 } | 394 } |
394 | 395 |
395 } // namespace ppapi | 396 } // namespace ppapi |
OLD | NEW |