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

Side by Side Diff: ppapi/proxy/ppp_messaging_proxy_test.cc

Issue 7655002: Convert the pp::proxy namespace to the ppapi::proxy namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
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 <cstring> 5 #include <cstring>
6 6
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "ppapi/c/pp_var.h" 8 #include "ppapi/c/pp_var.h"
9 #include "ppapi/c/ppb_var.h" 9 #include "ppapi/c/ppb_var.h"
10 #include "ppapi/c/ppp_messaging.h" 10 #include "ppapi/c/ppp_messaging.h"
11 #include "ppapi/proxy/ppapi_proxy_test.h" 11 #include "ppapi/proxy/ppapi_proxy_test.h"
12 #include "ppapi/shared_impl/var.h" 12 #include "ppapi/shared_impl/var.h"
13 13
14 using ::ppapi::StringVar; 14 namespace ppapi {
15
16 namespace pp {
17 namespace proxy { 15 namespace proxy {
18 16
19 namespace { 17 namespace {
20 18
21 // This is a poor man's mock of PPP_Messaging using global variables. Eventually 19 // This is a poor man's mock of PPP_Messaging using global variables. Eventually
22 // we should generalize making PPAPI interface mocks by using IDL or macro/ 20 // we should generalize making PPAPI interface mocks by using IDL or macro/
23 // template magic. 21 // template magic.
24 PP_Instance received_instance; 22 PP_Instance received_instance;
25 PP_Var received_var; 23 PP_Var received_var;
26 base::WaitableEvent handle_message_called(false, false); 24 base::WaitableEvent handle_message_called(false, false);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 scoped_refptr<StringVar> received_string(StringVar::FromPPVar(received_var)); 131 scoped_refptr<StringVar> received_string(StringVar::FromPPVar(received_var));
134 ASSERT_TRUE(received_string.get()); 132 ASSERT_TRUE(received_string.get());
135 EXPECT_EQ(kTestString, received_string->value()); 133 EXPECT_EQ(kTestString, received_string->value());
136 // Now release the var, and the string should go away (because the ref 134 // Now release the var, and the string should go away (because the ref
137 // count should be one). 135 // count should be one).
138 plugin().var_tracker().ReleaseVar(received_var); 136 plugin().var_tracker().ReleaseVar(received_var);
139 EXPECT_FALSE(StringVar::FromPPVar(received_var).get()); 137 EXPECT_FALSE(StringVar::FromPPVar(received_var).get());
140 } 138 }
141 139
142 } // namespace proxy 140 } // namespace proxy
143 } // namespace pp 141 } // namespace ppapi
144 142
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698