OLD | NEW |
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 "ipc/ipc_test_sink.h" | 5 #include "ipc/ipc_test_sink.h" |
6 #include "ppapi/proxy/plugin_var_tracker.h" | 6 #include "ppapi/proxy/plugin_var_tracker.h" |
7 #include "ppapi/proxy/ppapi_messages.h" | 7 #include "ppapi/proxy/ppapi_messages.h" |
8 #include "ppapi/proxy/ppapi_proxy_test.h" | 8 #include "ppapi/proxy/ppapi_proxy_test.h" |
9 | 9 |
10 namespace pp { | 10 namespace ppapi { |
11 namespace proxy { | 11 namespace proxy { |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 PP_Var MakeObject(int32 object_id) { | 15 PP_Var MakeObject(int32 object_id) { |
16 PP_Var ret; | 16 PP_Var ret; |
17 ret.type = PP_VARTYPE_OBJECT; | 17 ret.type = PP_VARTYPE_OBJECT; |
18 ret.value.as_id = object_id; | 18 ret.value.as_id = object_id; |
19 return ret; | 19 return ret; |
20 } | 20 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // Now release those tracked items, the reference should be freed. | 154 // Now release those tracked items, the reference should be freed. |
155 var_tracker().StopTrackingObjectWithNoReference(plugin_var); | 155 var_tracker().StopTrackingObjectWithNoReference(plugin_var); |
156 EXPECT_EQ(1, | 156 EXPECT_EQ(1, |
157 var_tracker().GetTrackedWithNoReferenceCountForObject(plugin_var)); | 157 var_tracker().GetTrackedWithNoReferenceCountForObject(plugin_var)); |
158 var_tracker().StopTrackingObjectWithNoReference(plugin_var); | 158 var_tracker().StopTrackingObjectWithNoReference(plugin_var); |
159 EXPECT_EQ(-1, | 159 EXPECT_EQ(-1, |
160 var_tracker().GetTrackedWithNoReferenceCountForObject(plugin_var)); | 160 var_tracker().GetTrackedWithNoReferenceCountForObject(plugin_var)); |
161 } | 161 } |
162 | 162 |
163 } // namespace proxy | 163 } // namespace proxy |
164 } // namespace pp | 164 } // namespace ppapi |
OLD | NEW |