diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-08 17:06:43 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-08 17:06:43 +0000 |
commit | 4c85f66d40d3b1b25e6f30ad90888dc29eb90ee8 (patch) | |
tree | efafdd70c921591168a8cc34dff990f83c147916 /ppapi/tests/testing_instance.h | |
parent | ad301eb035b5610de22356cadaac3a3826ca3abe (diff) | |
download | chromium_src-4c85f66d40d3b1b25e6f30ad90888dc29eb90ee8.zip chromium_src-4c85f66d40d3b1b25e6f30ad90888dc29eb90ee8.tar.gz chromium_src-4c85f66d40d3b1b25e6f30ad90888dc29eb90ee8.tar.bz2 |
Revert 91859 - 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
TBR=dmichael@chromium.org
Review URL: http://codereview.chromium.org/7329024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests/testing_instance.h')
-rw-r--r-- | ppapi/tests/testing_instance.h | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/ppapi/tests/testing_instance.h b/ppapi/tests/testing_instance.h index 9f42409..2201e13 100644 --- a/ppapi/tests/testing_instance.h +++ b/ppapi/tests/testing_instance.h @@ -8,23 +8,11 @@ #include <string> #include "ppapi/cpp/completion_callback.h" - -#if defined(__native_client__) #include "ppapi/cpp/instance.h" -#else -#include "ppapi/cpp/private/instance_private.h" -#endif class TestCase; -// In trusted builds, we use InstancePrivate and allow tests that use -// synchronous scripting. NaCl does not support synchronous scripting. -class TestingInstance : public -#if defined(__native_client__) -pp::Instance { -#else -pp::InstancePrivate { -#endif +class TestingInstance : public pp::Instance { public: explicit TestingInstance(PP_Instance instance); virtual ~TestingInstance(); @@ -32,10 +20,7 @@ pp::InstancePrivate { // pp::Instance override. virtual bool Init(uint32_t argc, const char* argn[], const char* argv[]); virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip); - -#if !(defined __native_client__) virtual pp::Var GetInstanceObject(); -#endif // Outputs the information from one test run, using the format // <test_name> [PASS|FAIL <error_message>] @@ -61,10 +46,6 @@ pp::InstancePrivate { // TestClass object that's associated with this instance. virtual void HandleMessage(const pp::Var& message_data); - const std::string& protocol() { - return protocol_; - } - private: void ExecuteTests(int32_t unused); @@ -97,10 +78,6 @@ pp::InstancePrivate { // True if running in Native Client. bool nacl_mode_; - - // String representing the protocol. Used for detecting whether we're running - // with http. - std::string protocol_; }; #endif // PPAPI_TESTS_TESTING_INSTANCE_H_ |