| Index: chrome/test/ui/ppapi_uitest.cc
|
| diff --git a/chrome/test/ui/ppapi_uitest.cc b/chrome/test/ui/ppapi_uitest.cc
|
| index 7476466f1e334c878d51c2a084dac20e2aa5cb2a..71d877960a7671e846d99b88133776033f513c09 100644
|
| --- a/chrome/test/ui/ppapi_uitest.cc
|
| +++ b/chrome/test/ui/ppapi_uitest.cc
|
| @@ -25,6 +25,7 @@
|
| #include "content/public/common/content_paths.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "content/public/common/url_constants.h"
|
| +#include "content/public/test/test_renderer_host.h"
|
| #include "media/audio/audio_manager.h"
|
| #include "net/base/net_util.h"
|
| #include "net/test/test_server.h"
|
| @@ -1093,6 +1094,30 @@ IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, View_PageHideShow) {
|
| EXPECT_STREQ("PASS", observer.result().c_str());
|
| }
|
|
|
| +// Tests that if a plugin accepts touch events, the browser knows to send touch
|
| +// events to the renderer.
|
| +IN_PROC_BROWSER_TEST_F(PPAPITest, InputEvent_AcceptTouchEvent) {
|
| + std::string positive_tests[] = { "InputEvent_AcceptTouchEvent_1",
|
| + "InputEvent_AcceptTouchEvent_3",
|
| + "InputEvent_AcceptTouchEvent_4"
|
| + };
|
| +
|
| + for (size_t i = 0; i < arraysize(positive_tests); ++i) {
|
| + RenderViewHost* host = browser()->GetActiveWebContents()->
|
| + GetRenderViewHost();
|
| + RunTest(positive_tests[i]);
|
| + EXPECT_TRUE(content::RenderViewHostTester::HasTouchEventHandler(host));
|
| + }
|
| +
|
| + std::string negative_tests[] = { "InputEvent_AcceptTouchEvent_2" };
|
| + for (size_t i = 0; i < arraysize(negative_tests); ++i) {
|
| + RenderViewHost* host = browser()->GetActiveWebContents()->
|
| + GetRenderViewHost();
|
| + RunTest(negative_tests[i]);
|
| + EXPECT_FALSE(content::RenderViewHostTester::HasTouchEventHandler(host));
|
| + }
|
| +}
|
| +
|
| TEST_PPAPI_IN_PROCESS(View_SizeChange);
|
| TEST_PPAPI_OUT_OF_PROCESS(View_SizeChange);
|
| TEST_PPAPI_NACL_VIA_HTTP(View_SizeChange);
|
|
|