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 "ppapi/proxy/ppapi_proxy_test.h" | 5 #include "ppapi/proxy/ppapi_proxy_test.h" |
6 | 6 |
7 #include "ppapi/proxy/serialized_var.h" | 7 #include "ppapi/proxy/serialized_var.h" |
8 | 8 |
9 namespace pp { | 9 namespace ppapi { |
10 namespace proxy { | 10 namespace proxy { |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 PP_Var MakeStringVar(int64_t string_id) { | 14 PP_Var MakeStringVar(int64_t string_id) { |
15 PP_Var ret; | 15 PP_Var ret; |
16 ret.type = PP_VARTYPE_STRING; | 16 ret.type = PP_VARTYPE_STRING; |
17 ret.value.as_id = string_id; | 17 ret.value.as_id = string_id; |
18 return ret; | 18 return ret; |
19 } | 19 } |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 EXPECT_EQ(1, var_tracker().GetRefCountForObject(plugin_object)); | 181 EXPECT_EQ(1, var_tracker().GetRefCountForObject(plugin_object)); |
182 } | 182 } |
183 | 183 |
184 // When the ReturnValue object goes out of scope, it should have sent a | 184 // When the ReturnValue object goes out of scope, it should have sent a |
185 // release message to the browser. | 185 // release message to the browser. |
186 EXPECT_EQ(-1, var_tracker().GetRefCountForObject(plugin_object)); | 186 EXPECT_EQ(-1, var_tracker().GetRefCountForObject(plugin_object)); |
187 EXPECT_EQ(1u, sink().message_count()); | 187 EXPECT_EQ(1u, sink().message_count()); |
188 } | 188 } |
189 | 189 |
190 } // namespace proxy | 190 } // namespace proxy |
191 } // namespace pp | 191 } // namespace ppapi |
OLD | NEW |