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

Unified Diff: ppapi/tests/test_var_deprecated.cc

Issue 8982006: Add GetLiveVars to PPB_Testing_Dev. Fix leaks it uncovered. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged Created 9 years 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/tests/test_var.cc ('k') | ppapi/tests/test_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_var_deprecated.cc
diff --git a/ppapi/tests/test_var_deprecated.cc b/ppapi/tests/test_var_deprecated.cc
index 00585e69b0237b73bd94021aefdd5c8a9e10dcde..23633ac7c33b8aed0d8dd77301cd4aa484453ce7 100644
--- a/ppapi/tests/test_var_deprecated.cc
+++ b/ppapi/tests/test_var_deprecated.cc
@@ -69,7 +69,7 @@ REGISTER_TEST_CASE(VarDeprecated);
bool TestVarDeprecated::Init() {
var_interface_ = static_cast<const PPB_Var_Deprecated*>(
pp::Module::Get()->GetBrowserInterface(PPB_VAR_DEPRECATED_INTERFACE));
- return var_interface_ && InitTestingInterface();
+ return var_interface_ && CheckTestingInterface();
}
void TestVarDeprecated::RunTests(const std::string& filter) {
@@ -179,6 +179,7 @@ std::string TestVarDeprecated::TestNullInputInUtf8Conversion() {
if (result == NULL) {
return "Expected a non-null result for 0-lengthed string from VarToUtf8.";
}
+ var_interface_->Release(converted_string);
// Should not crash, and make an empty string.
const char* null_string = NULL;
@@ -386,6 +387,10 @@ std::string TestVarDeprecated::TestPassReference() {
ASSERT_TRUE(result.is_string());
ASSERT_TRUE(result.AsString() == "worksnice");
+ // Reset var_from_page_ so it doesn't seem like a leak to the var leak
+ // checking code.
+ var_from_page_ = pp::Var();
+
PASS();
}
« no previous file with comments | « ppapi/tests/test_var.cc ('k') | ppapi/tests/test_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698