| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/test/ppapi/ppapi_test.h" | 5 #include "chrome/test/ppapi/ppapi_test.h" |
| 6 | 6 |
| 7 #include "base/test/test_timeouts.h" | 7 #include "base/test/test_timeouts.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 chrome::ActivateTabAt(browser(), 0, true); | 853 chrome::ActivateTabAt(browser(), 0, true); |
| 854 | 854 |
| 855 ASSERT_TRUE(observer.Run()) << handler.error_message(); | 855 ASSERT_TRUE(observer.Run()) << handler.error_message(); |
| 856 EXPECT_STREQ("PASS", handler.message().c_str()); | 856 EXPECT_STREQ("PASS", handler.message().c_str()); |
| 857 } | 857 } |
| 858 | 858 |
| 859 // Tests that if a plugin accepts touch events, the browser knows to send touch | 859 // Tests that if a plugin accepts touch events, the browser knows to send touch |
| 860 // events to the renderer. | 860 // events to the renderer. |
| 861 IN_PROC_BROWSER_TEST_F(PPAPITest, InputEvent_AcceptTouchEvent) { | 861 IN_PROC_BROWSER_TEST_F(PPAPITest, InputEvent_AcceptTouchEvent) { |
| 862 std::string positive_tests[] = { "InputEvent_AcceptTouchEvent_1", | 862 std::string positive_tests[] = { "InputEvent_AcceptTouchEvent_1", |
| 863 "InputEvent_AcceptTouchEvent_2", |
| 863 "InputEvent_AcceptTouchEvent_3", | 864 "InputEvent_AcceptTouchEvent_3", |
| 864 "InputEvent_AcceptTouchEvent_4" | 865 "InputEvent_AcceptTouchEvent_4" |
| 865 }; | 866 }; |
| 866 | 867 |
| 867 for (size_t i = 0; i < arraysize(positive_tests); ++i) { | 868 for (size_t i = 0; i < arraysize(positive_tests); ++i) { |
| 868 RenderViewHost* host = chrome::GetActiveWebContents(browser())-> | 869 RenderViewHost* host = chrome::GetActiveWebContents(browser())-> |
| 869 GetRenderViewHost(); | 870 GetRenderViewHost(); |
| 870 RunTest(positive_tests[i]); | 871 RunTest(positive_tests[i]); |
| 871 EXPECT_TRUE(content::RenderViewHostTester::HasTouchEventHandler(host)); | 872 EXPECT_TRUE(content::RenderViewHostTester::HasTouchEventHandler(host)); |
| 872 } | 873 } |
| 873 | |
| 874 std::string negative_tests[] = { "InputEvent_AcceptTouchEvent_2" }; | |
| 875 for (size_t i = 0; i < arraysize(negative_tests); ++i) { | |
| 876 RenderViewHost* host = chrome::GetActiveWebContents(browser())-> | |
| 877 GetRenderViewHost(); | |
| 878 RunTest(negative_tests[i]); | |
| 879 EXPECT_FALSE(content::RenderViewHostTester::HasTouchEventHandler(host)); | |
| 880 } | |
| 881 } | 874 } |
| 882 | 875 |
| 883 TEST_PPAPI_IN_PROCESS(View_SizeChange); | 876 TEST_PPAPI_IN_PROCESS(View_SizeChange); |
| 884 TEST_PPAPI_OUT_OF_PROCESS(View_SizeChange); | 877 TEST_PPAPI_OUT_OF_PROCESS(View_SizeChange); |
| 885 TEST_PPAPI_NACL_VIA_HTTP(View_SizeChange); | 878 TEST_PPAPI_NACL_VIA_HTTP(View_SizeChange); |
| 886 TEST_PPAPI_IN_PROCESS(View_ClipChange); | 879 TEST_PPAPI_IN_PROCESS(View_ClipChange); |
| 887 TEST_PPAPI_OUT_OF_PROCESS(View_ClipChange); | 880 TEST_PPAPI_OUT_OF_PROCESS(View_ClipChange); |
| 888 TEST_PPAPI_NACL_VIA_HTTP(View_ClipChange); | 881 TEST_PPAPI_NACL_VIA_HTTP(View_ClipChange); |
| 889 | 882 |
| 890 TEST_PPAPI_IN_PROCESS(ResourceArray_Basics) | 883 TEST_PPAPI_IN_PROCESS(ResourceArray_Basics) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 #endif | 915 #endif |
| 923 | 916 |
| 924 // Going forward, Flash APIs will only work out-of-process. | 917 // Going forward, Flash APIs will only work out-of-process. |
| 925 TEST_PPAPI_OUT_OF_PROCESS(FlashClipboard) | 918 TEST_PPAPI_OUT_OF_PROCESS(FlashClipboard) |
| 926 TEST_PPAPI_OUT_OF_PROCESS(FlashFile_CreateTemporaryFile) | 919 TEST_PPAPI_OUT_OF_PROCESS(FlashFile_CreateTemporaryFile) |
| 927 | 920 |
| 928 TEST_PPAPI_IN_PROCESS(TalkPrivate) | 921 TEST_PPAPI_IN_PROCESS(TalkPrivate) |
| 929 TEST_PPAPI_OUT_OF_PROCESS(TalkPrivate) | 922 TEST_PPAPI_OUT_OF_PROCESS(TalkPrivate) |
| 930 | 923 |
| 931 #endif // ADDRESS_SANITIZER | 924 #endif // ADDRESS_SANITIZER |
| OLD | NEW |