summaryrefslogtreecommitdiffstats
path: root/ppapi/tests/test_input_event.cc
diff options
context:
space:
mode:
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-17 14:24:30 +0000
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-17 14:24:30 +0000
commit08610101320e903c398cea854bd8ad66e361aebc (patch)
tree38bb90bf10119a519a68a1a6f0955d0c8910c1f9 /ppapi/tests/test_input_event.cc
parent5ccea8893320e6b6ccf422179ec50cee08f15a7f (diff)
downloadchromium_src-08610101320e903c398cea854bd8ad66e361aebc.zip
chromium_src-08610101320e903c398cea854bd8ad66e361aebc.tar.gz
chromium_src-08610101320e903c398cea854bd8ad66e361aebc.tar.bz2
Add TestingInstance::ExecuteScript method which posts a message that the test page
can eval(). Change InputEvent and PostMessage tests to use this. Add proxy for PPB_Testing_Dev::SimulateInputEvent function. BUG=NONE TEST=ui_tests Review URL: http://codereview.chromium.org/8920005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114924 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests/test_input_event.cc')
-rw-r--r--ppapi/tests/test_input_event.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/ppapi/tests/test_input_event.cc b/ppapi/tests/test_input_event.cc
index 49526db..cdd4939 100644
--- a/ppapi/tests/test_input_event.cc
+++ b/ppapi/tests/test_input_event.cc
@@ -52,8 +52,7 @@ TestInputEvent::~TestInputEvent() {
"plugin.removeEventListener('message',"
" plugin.wait_for_messages_handler);"
"delete plugin.wait_for_messages_handler;";
- pp::Var exception;
- instance_->ExecuteScript(js_code, &exception);
+ instance_->EvalScript(js_code);
}
bool TestInputEvent::Init() {
@@ -94,9 +93,7 @@ bool TestInputEvent::Init() {
"plugin.addEventListener('message', wait_for_messages_handler);"
// Stash it on the plugin so we can remove it in the destructor.
"plugin.wait_for_messages_handler = wait_for_messages_handler;";
- pp::Var exception;
- instance_->ExecuteScript(js_code, &exception);
- success = success && exception.is_undefined();
+ instance_->EvalScript(js_code);
return success;
}