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

Unified Diff: ppapi/proxy/ppp_messaging_proxy_test.cc

Issue 7578001: Unify var tracking between webkit and the proxy. (Closed) Base URL: svn://chrome-svn/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppp_messaging_proxy.cc ('k') | ppapi/proxy/proxy_object_var.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppp_messaging_proxy_test.cc
===================================================================
--- ppapi/proxy/ppp_messaging_proxy_test.cc (revision 96002)
+++ ppapi/proxy/ppp_messaging_proxy_test.cc (working copy)
@@ -9,7 +9,10 @@
#include "ppapi/c/ppb_var.h"
#include "ppapi/c/ppp_messaging.h"
#include "ppapi/proxy/ppapi_proxy_test.h"
+#include "ppapi/shared_impl/var.h"
+using ::ppapi::StringVar;
+
namespace pp {
namespace proxy {
@@ -126,14 +129,14 @@
handle_message_called.Wait();
EXPECT_EQ(expected_instance, received_instance);
EXPECT_EQ(expected_var.type, received_var.type);
- const std::string* received_string =
- plugin().var_tracker().GetExistingString(received_var);
- ASSERT_TRUE(received_string);
- EXPECT_EQ(kTestString, *received_string);
+
+ scoped_refptr<StringVar> received_string(StringVar::FromPPVar(received_var));
+ ASSERT_TRUE(received_string.get());
+ EXPECT_EQ(kTestString, received_string->value());
// Now release the var, and the string should go away (because the ref
// count should be one).
- plugin().var_tracker().Release(received_var);
- EXPECT_FALSE(plugin().var_tracker().GetExistingString(received_var));
+ plugin().var_tracker().ReleaseVar(received_var);
+ EXPECT_FALSE(StringVar::FromPPVar(received_var).get());
}
} // namespace proxy
« no previous file with comments | « ppapi/proxy/ppp_messaging_proxy.cc ('k') | ppapi/proxy/proxy_object_var.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698