From 368ca47678e6c2208bd1849e5c8ad6f954ff0989 Mon Sep 17 00:00:00 2001 From: "dmichael@chromium.org" Date: Fri, 8 Jul 2011 16:23:36 +0000 Subject: Porting ppapi_tests framework to postMessage. Some tests still rely on scripting, so we changed to using InstancePrivate (since scripting will disappear from Instance soon). Also use conditional compilation so that if compiled as untrusted with NaCl, the tests use Instance instead of InstancePrivate. This means that tests which rely on scripting aren't runnable in NaCl. I also added a gyp option: pepper_scripting. The default is that scripting is on in this CL, but it will make it easy to turn it off in local builds. Soon we'll switch the default to no scripting, and soon after we can remove the option entirely. BUG=82606 TEST=these tests Review URL: http://codereview.chromium.org/7312008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91859 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/tests/test_var_deprecated.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ppapi/tests/test_var_deprecated.cc') diff --git a/ppapi/tests/test_var_deprecated.cc b/ppapi/tests/test_var_deprecated.cc index 34309ee..07ccf91 100644 --- a/ppapi/tests/test_var_deprecated.cc +++ b/ppapi/tests/test_var_deprecated.cc @@ -57,7 +57,7 @@ pp::Var VarScriptableObject::Call(const pp::Var& method_name, if (args.size() != 1) *exception = pp::Var("Bad argument to SetValue()"); else - test_var_deprecated_->set_var_from_page(args[0]); + test_var_deprecated_->set_var_from_page(pp::VarPrivate(args[0])); } return pp::Var(); @@ -297,7 +297,7 @@ std::string TestVarDeprecated::TestHasPropertyAndMethod() { uint32_t before_objects = testing_interface_->GetLiveObjectsForInstance( instance_->pp_instance()); { - pp::Var window = instance_->GetWindowObject(); + pp::VarPrivate window = instance_->GetWindowObject(); ASSERT_TRUE(window.is_object()); // Regular property. @@ -330,7 +330,7 @@ std::string TestVarDeprecated::TestHasPropertyAndMethod() { // Try to use something not an object. exception = pp::Var(); - pp::Var string_object("asdf"); + pp::VarPrivate string_object("asdf"); ASSERT_FALSE(string_object.HasProperty("find", &exception)); ASSERT_FALSE(exception.is_undefined()); exception = pp::Var(); @@ -397,3 +397,4 @@ std::string TestVarDeprecated::TestPassReference() { PASS(); } + -- cgit v1.1