OLD | NEW |
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 "content/renderer/pepper/v8_var_converter.h" | 5 #include "content/renderer/pepper/v8_var_converter.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 } | 131 } |
132 | 132 |
133 class V8VarConverterTest : public testing::Test { | 133 class V8VarConverterTest : public testing::Test { |
134 public: | 134 public: |
135 V8VarConverterTest() | 135 V8VarConverterTest() |
136 : isolate_(v8::Isolate::GetCurrent()) {} | 136 : isolate_(v8::Isolate::GetCurrent()) {} |
137 virtual ~V8VarConverterTest() {} | 137 virtual ~V8VarConverterTest() {} |
138 | 138 |
139 // testing::Test implementation. | 139 // testing::Test implementation. |
140 virtual void SetUp() { | 140 virtual void SetUp() { |
141 ProxyLock::Acquire(); | 141 ppapi::ProxyLock::DisableLockingOnThreadForTest(); |
142 v8::HandleScope handle_scope(isolate_); | 142 v8::HandleScope handle_scope(isolate_); |
143 v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(); | 143 v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(); |
144 context_.Reset(isolate_, v8::Context::New(isolate_, NULL, global)); | 144 context_.Reset(isolate_, v8::Context::New(isolate_, NULL, global)); |
145 } | 145 } |
146 virtual void TearDown() { | 146 virtual void TearDown() { |
147 context_.Dispose(); | 147 context_.Dispose(); |
148 ASSERT_TRUE(PpapiGlobals::Get()->GetVarTracker()->GetLiveVars().empty()); | 148 ASSERT_TRUE(PpapiGlobals::Get()->GetVarTracker()->GetLiveVars().empty()); |
149 ProxyLock::Release(); | 149 ProxyLock::Release(); |
150 } | 150 } |
151 | 151 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 ScopedPPVar oops(ScopedPPVar::PassRef(), StringVar::StringToPPVar("oops")); | 376 ScopedPPVar oops(ScopedPPVar::PassRef(), StringVar::StringToPPVar("oops")); |
377 expected->SetWithStringKey("undefined", oops.get()); | 377 expected->SetWithStringKey("undefined", oops.get()); |
378 ScopedPPVar release_expected( | 378 ScopedPPVar release_expected( |
379 ScopedPPVar::PassRef(), expected->GetPPVar()); | 379 ScopedPPVar::PassRef(), expected->GetPPVar()); |
380 | 380 |
381 ASSERT_TRUE(TestEqual(release_expected.get(), release_actual.get())); | 381 ASSERT_TRUE(TestEqual(release_expected.get(), release_actual.get())); |
382 } | 382 } |
383 } | 383 } |
384 | 384 |
385 } // namespace content | 385 } // namespace content |
OLD | NEW |