| 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 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 } | 920 } |
| 921 | 921 |
| 922 // NaClGLibc AudioConfig tests | 922 // NaClGLibc AudioConfig tests |
| 923 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(AudioConfig)) { | 923 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(AudioConfig)) { |
| 924 RunTestViaHTTP( | 924 RunTestViaHTTP( |
| 925 LIST_TEST(AudioConfig_RecommendSampleRate) | 925 LIST_TEST(AudioConfig_RecommendSampleRate) |
| 926 LIST_TEST(AudioConfig_ValidConfigs) | 926 LIST_TEST(AudioConfig_ValidConfigs) |
| 927 LIST_TEST(AudioConfig_InvalidConfigs)); | 927 LIST_TEST(AudioConfig_InvalidConfigs)); |
| 928 } | 928 } |
| 929 | 929 |
| 930 // Only run audio output tests if we have an audio device available. | 930 IN_PROC_BROWSER_TEST_F(PPAPITest, Audio) { |
| 931 // TODO(raymes): We should probably test scenarios where there is no audio | 931 RunTest(LIST_TEST(Audio_Creation) |
| 932 // device available. | 932 LIST_TEST(Audio_DestroyNoStop) |
| 933 TEST_PPAPI_IN_PROCESS(Audio_Creation) | 933 LIST_TEST(Audio_Failures) |
| 934 TEST_PPAPI_IN_PROCESS(Audio_DestroyNoStop) | 934 LIST_TEST(Audio_AudioCallback1) |
| 935 TEST_PPAPI_IN_PROCESS(Audio_Failures) | 935 LIST_TEST(Audio_AudioCallback2)); |
| 936 TEST_PPAPI_IN_PROCESS(Audio_AudioCallback1) | 936 } |
| 937 TEST_PPAPI_IN_PROCESS(Audio_AudioCallback2) | 937 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, Audio) { |
| 938 TEST_PPAPI_OUT_OF_PROCESS(Audio_Creation) | 938 RunTest(LIST_TEST(Audio_Creation) |
| 939 TEST_PPAPI_OUT_OF_PROCESS(Audio_DestroyNoStop) | 939 LIST_TEST(Audio_DestroyNoStop) |
| 940 TEST_PPAPI_OUT_OF_PROCESS(Audio_Failures) | 940 LIST_TEST(Audio_Failures) |
| 941 TEST_PPAPI_OUT_OF_PROCESS(Audio_AudioCallback1) | 941 LIST_TEST(Audio_AudioCallback1) |
| 942 TEST_PPAPI_OUT_OF_PROCESS(Audio_AudioCallback2) | 942 LIST_TEST(Audio_AudioCallback2)); |
| 943 TEST_PPAPI_NACL(Audio_Creation) | 943 } |
| 944 TEST_PPAPI_NACL(Audio_DestroyNoStop) | 944 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, Audio) { |
| 945 TEST_PPAPI_NACL(Audio_Failures) | 945 RunTestViaHTTP(LIST_TEST(Audio_Creation) |
| 946 TEST_PPAPI_NACL(Audio_AudioCallback1) | 946 LIST_TEST(Audio_DestroyNoStop) |
| 947 TEST_PPAPI_NACL(Audio_AudioCallback2) | 947 LIST_TEST(Audio_Failures) |
| 948 LIST_TEST(Audio_AudioCallback1) |
| 949 LIST_TEST(Audio_AudioCallback2)); |
| 950 } |
| 951 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(Audio)) { |
| 952 RunTestViaHTTP(LIST_TEST(Audio_Creation) |
| 953 LIST_TEST(Audio_DestroyNoStop) |
| 954 LIST_TEST(Audio_Failures) |
| 955 LIST_TEST(Audio_AudioCallback1) |
| 956 LIST_TEST(Audio_AudioCallback2)); |
| 957 } |
| 948 | 958 |
| 949 TEST_PPAPI_IN_PROCESS(View_CreatedVisible); | 959 TEST_PPAPI_IN_PROCESS(View_CreatedVisible); |
| 950 TEST_PPAPI_OUT_OF_PROCESS(View_CreatedVisible); | 960 TEST_PPAPI_OUT_OF_PROCESS(View_CreatedVisible); |
| 951 TEST_PPAPI_NACL(View_CreatedVisible); | 961 TEST_PPAPI_NACL(View_CreatedVisible); |
| 952 // This test ensures that plugins created in a background tab have their | 962 // This test ensures that plugins created in a background tab have their |
| 953 // initial visibility set to false. We don't bother testing in-process for this | 963 // initial visibility set to false. We don't bother testing in-process for this |
| 954 // custom test since the out of process code also exercises in-process. | 964 // custom test since the out of process code also exercises in-process. |
| 955 | 965 |
| 956 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, View_CreateInvisible) { | 966 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, View_CreateInvisible) { |
| 957 // Make a second tab in the foreground. | 967 // Make a second tab in the foreground. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 }; | 1015 }; |
| 1006 | 1016 |
| 1007 for (size_t i = 0; i < arraysize(positive_tests); ++i) { | 1017 for (size_t i = 0; i < arraysize(positive_tests); ++i) { |
| 1008 RenderViewHost* host = browser()->tab_strip_model()-> | 1018 RenderViewHost* host = browser()->tab_strip_model()-> |
| 1009 GetActiveWebContents()->GetRenderViewHost(); | 1019 GetActiveWebContents()->GetRenderViewHost(); |
| 1010 RunTest(positive_tests[i]); | 1020 RunTest(positive_tests[i]); |
| 1011 EXPECT_TRUE(content::RenderViewHostTester::HasTouchEventHandler(host)); | 1021 EXPECT_TRUE(content::RenderViewHostTester::HasTouchEventHandler(host)); |
| 1012 } | 1022 } |
| 1013 } | 1023 } |
| 1014 | 1024 |
| 1015 TEST_PPAPI_IN_PROCESS(View_SizeChange); | 1025 IN_PROC_BROWSER_TEST_F(PPAPITest, View) { |
| 1016 TEST_PPAPI_OUT_OF_PROCESS(View_SizeChange); | 1026 RunTest(LIST_TEST(View_SizeChange) |
| 1017 TEST_PPAPI_NACL(View_SizeChange); | 1027 LIST_TEST(View_ClipChange)); |
| 1018 TEST_PPAPI_IN_PROCESS(View_ClipChange); | 1028 } |
| 1019 TEST_PPAPI_OUT_OF_PROCESS(View_ClipChange); | 1029 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, View) { |
| 1020 TEST_PPAPI_NACL(View_ClipChange); | 1030 RunTest(LIST_TEST(View_SizeChange) |
| 1031 LIST_TEST(View_ClipChange)); |
| 1032 } |
| 1033 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, View) { |
| 1034 RunTestViaHTTP(LIST_TEST(View_SizeChange) |
| 1035 LIST_TEST(View_ClipChange)); |
| 1036 } |
| 1037 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, View) { |
| 1038 RunTestViaHTTP(LIST_TEST(View_SizeChange) |
| 1039 LIST_TEST(View_ClipChange)); |
| 1040 } |
| 1021 | 1041 |
| 1022 TEST_PPAPI_IN_PROCESS(ResourceArray_Basics) | 1042 IN_PROC_BROWSER_TEST_F(PPAPITest, ResourceArray) { |
| 1023 TEST_PPAPI_IN_PROCESS(ResourceArray_OutOfRangeAccess) | 1043 RunTest(LIST_TEST(ResourceArray_Basics) |
| 1024 TEST_PPAPI_IN_PROCESS(ResourceArray_EmptyArray) | 1044 LIST_TEST(ResourceArray_OutOfRangeAccess) |
| 1025 TEST_PPAPI_IN_PROCESS(ResourceArray_InvalidElement) | 1045 LIST_TEST(ResourceArray_EmptyArray) |
| 1026 TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_Basics) | 1046 LIST_TEST(ResourceArray_InvalidElement)); |
| 1027 TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_OutOfRangeAccess) | 1047 } |
| 1028 TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_EmptyArray) | 1048 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, ResourceArray) { |
| 1029 TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_InvalidElement) | 1049 RunTest(LIST_TEST(ResourceArray_Basics) |
| 1050 LIST_TEST(ResourceArray_OutOfRangeAccess) |
| 1051 LIST_TEST(ResourceArray_EmptyArray) |
| 1052 LIST_TEST(ResourceArray_InvalidElement)); |
| 1053 } |
| 1030 | 1054 |
| 1031 TEST_PPAPI_IN_PROCESS(FlashMessageLoop_Basics) | 1055 IN_PROC_BROWSER_TEST_F(PPAPITest, FlashMessageLoop) { |
| 1032 TEST_PPAPI_IN_PROCESS(FlashMessageLoop_RunWithoutQuit) | 1056 RunTest(LIST_TEST(FlashMessageLoop_Basics) |
| 1033 TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_Basics) | 1057 LIST_TEST(FlashMessageLoop_RunWithoutQuit)); |
| 1034 TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_RunWithoutQuit) | 1058 } |
| 1059 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, FlashMessageLoop) { |
| 1060 RunTest(LIST_TEST(FlashMessageLoop_Basics) |
| 1061 LIST_TEST(FlashMessageLoop_RunWithoutQuit)); |
| 1062 } |
| 1035 | 1063 |
| 1036 TEST_PPAPI_IN_PROCESS(MouseCursor) | 1064 TEST_PPAPI_IN_PROCESS(MouseCursor) |
| 1037 TEST_PPAPI_OUT_OF_PROCESS(MouseCursor) | 1065 TEST_PPAPI_OUT_OF_PROCESS(MouseCursor) |
| 1038 TEST_PPAPI_NACL(MouseCursor) | 1066 TEST_PPAPI_NACL(MouseCursor) |
| 1039 | 1067 |
| 1040 // PPB_Printing only implemented for out of process. | 1068 // PPB_Printing only implemented for out of process. |
| 1041 TEST_PPAPI_OUT_OF_PROCESS(Printing) | 1069 TEST_PPAPI_OUT_OF_PROCESS(Printing) |
| 1042 | 1070 |
| 1043 // PPB_MessageLoop is only supported out-of-process. | 1071 // PPB_MessageLoop is only supported out-of-process. |
| 1044 // TODO(dmichael): Enable for NaCl with the IPC proxy. crbug.com/116317 | 1072 // TODO(dmichael): Enable for NaCl with the IPC proxy. crbug.com/116317 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1066 #define MAYBE_FlashFullscreen DISABLED_FlashFullscreen | 1094 #define MAYBE_FlashFullscreen DISABLED_FlashFullscreen |
| 1067 #else | 1095 #else |
| 1068 #define MAYBE_FlashFullscreen FlashFullscreen | 1096 #define MAYBE_FlashFullscreen FlashFullscreen |
| 1069 #endif | 1097 #endif |
| 1070 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_FlashFullscreen) | 1098 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_FlashFullscreen) |
| 1071 | 1099 |
| 1072 TEST_PPAPI_IN_PROCESS(TalkPrivate) | 1100 TEST_PPAPI_IN_PROCESS(TalkPrivate) |
| 1073 TEST_PPAPI_OUT_OF_PROCESS(TalkPrivate) | 1101 TEST_PPAPI_OUT_OF_PROCESS(TalkPrivate) |
| 1074 | 1102 |
| 1075 #endif // ADDRESS_SANITIZER | 1103 #endif // ADDRESS_SANITIZER |
| OLD | NEW |