diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-08 16:23:36 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-08 16:23:36 +0000 |
commit | 368ca47678e6c2208bd1849e5c8ad6f954ff0989 (patch) | |
tree | f308afb5e2e1f77906b8bd5b0479903ac9c7f42b /ppapi/tests/test_var_deprecated.cc | |
parent | 7b084b0f357f6a8a2cd4b58a56af234e7af063f5 (diff) | |
download | chromium_src-368ca47678e6c2208bd1849e5c8ad6f954ff0989.zip chromium_src-368ca47678e6c2208bd1849e5c8ad6f954ff0989.tar.gz chromium_src-368ca47678e6c2208bd1849e5c8ad6f954ff0989.tar.bz2 |
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
Diffstat (limited to 'ppapi/tests/test_var_deprecated.cc')
-rw-r--r-- | ppapi/tests/test_var_deprecated.cc | 7 |
1 files changed, 4 insertions, 3 deletions
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(<value>)"); 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(); } + |