Chromium Code Reviews| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 172 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( | 172 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( |
| 173 CONTENT_SETTINGS_TYPE_PPAPI_BROKER, CONTENT_SETTING_ALLOW); | 173 CONTENT_SETTINGS_TYPE_PPAPI_BROKER, CONTENT_SETTING_ALLOW); |
| 174 | 174 |
| 175 // We shouldn't see an infobar. | 175 // We shouldn't see an infobar. |
| 176 InfoBarObserver observer(this); | 176 InfoBarObserver observer(this); |
| 177 | 177 |
| 178 RunTest("Broker_ConnectPermissionGranted"); | 178 RunTest("Broker_ConnectPermissionGranted"); |
| 179 RunTest("Broker_IsAllowedPermissionGranted"); | 179 RunTest("Broker_IsAllowedPermissionGranted"); |
| 180 } | 180 } |
| 181 | 181 |
| 182 TEST_PPAPI_IN_PROCESS(Console) | |
| 183 TEST_PPAPI_OUT_OF_PROCESS(Console) | |
| 184 TEST_PPAPI_NACL(Console) | 182 TEST_PPAPI_NACL(Console) |
| 185 | 183 |
| 186 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) | 184 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) |
| 187 // TODO(erg): linux_aura bringup: http://crbug.com/318961 | 185 // TODO(erg): linux_aura bringup: http://crbug.com/318961 |
| 188 #define MAYBE_Core DISABLED_Core | 186 #define MAYBE_Core DISABLED_Core |
| 189 #else | 187 #else |
| 190 #define MAYBE_Core Core | 188 #define MAYBE_Core Core |
| 191 #endif | 189 #endif |
| 192 TEST_PPAPI_IN_PROCESS(MAYBE_Core) | 190 TEST_PPAPI_IN_PROCESS(MAYBE_Core) |
| 193 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_Core) | 191 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_Core) |
| 194 TEST_PPAPI_NACL(MAYBE_Core) | 192 TEST_PPAPI_NACL(MAYBE_Core) |
| 195 | 193 |
| 196 // Non-NaCl TraceEvent tests are in content/test/ppapi/ppapi_browsertest.cc. | 194 // Non-NaCl TraceEvent tests are in content/test/ppapi/ppapi_browsertest.cc. |
| 197 TEST_PPAPI_NACL(TraceEvent) | 195 TEST_PPAPI_NACL(TraceEvent) |
| 198 | 196 |
| 199 TEST_PPAPI_OUT_OF_PROCESS(InputEvent) | |
| 200 TEST_PPAPI_NACL(InputEvent) | 197 TEST_PPAPI_NACL(InputEvent) |
| 201 | 198 |
| 202 // Flaky on Linux and Windows. http://crbug.com/135403 | 199 // Flaky on Linux and Windows. http://crbug.com/135403 |
| 203 #if defined(OS_LINUX) || defined(OS_WIN) | 200 #if defined(OS_LINUX) || defined(OS_WIN) |
| 204 #define MAYBE_ImeInputEvent DISABLED_ImeInputEvent | 201 #define MAYBE_ImeInputEvent DISABLED_ImeInputEvent |
| 205 #else | 202 #else |
| 206 #define MAYBE_ImeInputEvent ImeInputEvent | 203 #define MAYBE_ImeInputEvent ImeInputEvent |
| 207 #endif | 204 #endif |
| 208 | 205 |
| 209 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_ImeInputEvent) | 206 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_ImeInputEvent) |
| 210 TEST_PPAPI_NACL(MAYBE_ImeInputEvent) | 207 TEST_PPAPI_NACL(MAYBE_ImeInputEvent) |
| 211 | 208 |
| 212 // "Instance" tests are really InstancePrivate tests. InstancePrivate is not | |
| 213 // supported in NaCl, so these tests are only run trusted. | |
| 214 // Also note that these tests are run separately on purpose (versus collapsed | |
| 215 // in to one IN_PROC_BROWSER_TEST_F macro), because some of them have leaks | |
| 216 // on purpose that will look like failures to tests that are run later. | |
| 217 TEST_PPAPI_IN_PROCESS(Instance_ExecuteScript); | |
| 218 TEST_PPAPI_OUT_OF_PROCESS(Instance_ExecuteScript) | |
| 219 | |
| 220 // We run and reload the RecursiveObjects test to ensure that the InstanceObject | 209 // We run and reload the RecursiveObjects test to ensure that the InstanceObject |
| 221 // (and others) are properly cleaned up after the first run. | 210 // (and others) are properly cleaned up after the first run. |
| 222 IN_PROC_BROWSER_TEST_F(PPAPITest, Instance_RecursiveObjects) { | 211 IN_PROC_BROWSER_TEST_F(PPAPITest, Instance_RecursiveObjects) { |
| 223 RunTestAndReload("Instance_RecursiveObjects"); | 212 RunTestAndReload("Instance_RecursiveObjects"); |
| 224 } | 213 } |
| 225 // TODO(dmichael): Make it work out-of-process (or at least see whether we | 214 // TODO(dmichael): Make it work out-of-process (or at least see whether we |
| 226 // care). | 215 // care). |
| 227 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, | 216 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, |
| 228 DISABLED_Instance_RecursiveObjects) { | 217 DISABLED_Instance_RecursiveObjects) { |
| 229 RunTestAndReload("Instance_RecursiveObjects"); | 218 RunTestAndReload("Instance_RecursiveObjects"); |
| 230 } | 219 } |
|
dmichael (off chromium)
2014/05/29 16:04:47
^^^ What's the reasoning behind leaving these ones
teravest
2014/05/29 16:07:17
I took a block of some tests that looked easy to m
| |
| 231 TEST_PPAPI_IN_PROCESS(Instance_LeakedObjectDestructors); | |
| 232 TEST_PPAPI_OUT_OF_PROCESS(Instance_LeakedObjectDestructors); | |
| 233 | 220 |
| 234 IN_PROC_BROWSER_TEST_F(PPAPITest, | |
| 235 Instance_ExecuteScriptAtInstanceShutdown) { | |
| 236 // In other tests, we use one call to RunTest so that the tests can all run | |
| 237 // in one plugin instance. This saves time on loading the plugin (especially | |
| 238 // for NaCl). Here, we actually want to destroy the Instance, to test whether | |
| 239 // the destructor can run ExecuteScript successfully. That's why we have two | |
| 240 // separate calls to RunTest; the second one forces a navigation which | |
| 241 // destroys the instance from the prior RunTest. | |
| 242 // See test_instance_deprecated.cc for more information. | |
| 243 RunTest("Instance_SetupExecuteScriptAtInstanceShutdown"); | |
| 244 RunTest("Instance_ExecuteScriptAtInstanceShutdown"); | |
| 245 } | |
| 246 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, | |
| 247 Instance_ExecuteScriptAtInstanceShutdown) { | |
| 248 // (See the comment for the in-process version of this test above) | |
| 249 RunTest("Instance_SetupExecuteScriptAtInstanceShutdown"); | |
| 250 RunTest("Instance_ExecuteScriptAtInstanceShutdown"); | |
| 251 } | |
| 252 | |
| 253 TEST_PPAPI_IN_PROCESS(Graphics2D) | |
| 254 TEST_PPAPI_OUT_OF_PROCESS(Graphics2D) | |
| 255 // Graphics2D_Dev isn't supported in NaCl, only test the other interfaces | 221 // Graphics2D_Dev isn't supported in NaCl, only test the other interfaces |
| 256 // TODO(jhorwich) Enable when Graphics2D_Dev interfaces are proxied in NaCl. | 222 // TODO(jhorwich) Enable when Graphics2D_Dev interfaces are proxied in NaCl. |
| 257 TEST_PPAPI_NACL(Graphics2D_InvalidResource) | 223 TEST_PPAPI_NACL(Graphics2D_InvalidResource) |
| 258 TEST_PPAPI_NACL(Graphics2D_InvalidSize) | 224 TEST_PPAPI_NACL(Graphics2D_InvalidSize) |
| 259 TEST_PPAPI_NACL(Graphics2D_Humongous) | 225 TEST_PPAPI_NACL(Graphics2D_Humongous) |
| 260 TEST_PPAPI_NACL(Graphics2D_InitToZero) | 226 TEST_PPAPI_NACL(Graphics2D_InitToZero) |
| 261 TEST_PPAPI_NACL(Graphics2D_Describe) | 227 TEST_PPAPI_NACL(Graphics2D_Describe) |
| 262 TEST_PPAPI_NACL(Graphics2D_Paint) | 228 TEST_PPAPI_NACL(Graphics2D_Paint) |
| 263 TEST_PPAPI_NACL(Graphics2D_Scroll) | 229 TEST_PPAPI_NACL(Graphics2D_Scroll) |
| 264 TEST_PPAPI_NACL(Graphics2D_Replace) | 230 TEST_PPAPI_NACL(Graphics2D_Replace) |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 289 #else | 255 #else |
| 290 // The tests are failing in-process. crbug.com/280282 | 256 // The tests are failing in-process. crbug.com/280282 |
| 291 #define MAYBE_IN_Graphics3D DISABLED_Graphics3D | 257 #define MAYBE_IN_Graphics3D DISABLED_Graphics3D |
| 292 #define MAYBE_OUT_Graphics3D Graphics3D | 258 #define MAYBE_OUT_Graphics3D Graphics3D |
| 293 #define MAYBE_NACL_Graphics3D Graphics3D | 259 #define MAYBE_NACL_Graphics3D Graphics3D |
| 294 #endif | 260 #endif |
| 295 TEST_PPAPI_IN_PROCESS(MAYBE_IN_Graphics3D) | 261 TEST_PPAPI_IN_PROCESS(MAYBE_IN_Graphics3D) |
| 296 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_OUT_Graphics3D) | 262 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_OUT_Graphics3D) |
| 297 TEST_PPAPI_NACL(MAYBE_NACL_Graphics3D) | 263 TEST_PPAPI_NACL(MAYBE_NACL_Graphics3D) |
| 298 | 264 |
| 299 TEST_PPAPI_IN_PROCESS(ImageData) | |
| 300 TEST_PPAPI_OUT_OF_PROCESS(ImageData) | |
| 301 TEST_PPAPI_NACL(ImageData) | 265 TEST_PPAPI_NACL(ImageData) |
| 302 | 266 |
| 303 TEST_PPAPI_IN_PROCESS(BrowserFont) | |
| 304 // crbug.com/308949 | |
| 305 #if defined(OS_WIN) | |
| 306 #define MAYBE_OUT_BrowserFont DISABLED_BrowserFont | |
| 307 #else | |
| 308 #define MAYBE_OUT_BrowserFont BrowserFont | |
| 309 #endif | |
| 310 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_OUT_BrowserFont) | |
| 311 | |
| 312 TEST_PPAPI_IN_PROCESS(Buffer) | |
| 313 TEST_PPAPI_OUT_OF_PROCESS(Buffer) | |
| 314 | |
| 315 // TCPSocket and TCPSocketPrivate tests. | 267 // TCPSocket and TCPSocketPrivate tests. |
| 316 #define RUN_TCPSOCKET_SUBTESTS \ | 268 #define RUN_TCPSOCKET_SUBTESTS \ |
| 317 RunTestViaHTTP( \ | 269 RunTestViaHTTP( \ |
| 318 LIST_TEST(TCPSocket_Connect) \ | 270 LIST_TEST(TCPSocket_Connect) \ |
| 319 LIST_TEST(TCPSocket_ReadWrite) \ | 271 LIST_TEST(TCPSocket_ReadWrite) \ |
| 320 LIST_TEST(TCPSocket_SetOption) \ | 272 LIST_TEST(TCPSocket_SetOption) \ |
| 321 LIST_TEST(TCPSocket_Listen) \ | 273 LIST_TEST(TCPSocket_Listen) \ |
| 322 LIST_TEST(TCPSocket_Backlog) \ | 274 LIST_TEST(TCPSocket_Backlog) \ |
| 323 LIST_TEST(TCPSocket_Interface_1_0) \ | 275 LIST_TEST(TCPSocket_Interface_1_0) \ |
| 324 ) | 276 ) |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 613 TEST_PPAPI_NACL(DISABLED_URLRequest_AppendFileToBody) | 565 TEST_PPAPI_NACL(DISABLED_URLRequest_AppendFileToBody) |
| 614 TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_Stress) | 566 TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_Stress) |
| 615 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_Stress) | 567 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_Stress) |
| 616 TEST_PPAPI_NACL(URLRequest_Stress) | 568 TEST_PPAPI_NACL(URLRequest_Stress) |
| 617 | 569 |
| 618 TEST_PPAPI_IN_PROCESS(PaintAggregator) | 570 TEST_PPAPI_IN_PROCESS(PaintAggregator) |
| 619 TEST_PPAPI_OUT_OF_PROCESS(PaintAggregator) | 571 TEST_PPAPI_OUT_OF_PROCESS(PaintAggregator) |
| 620 TEST_PPAPI_NACL(PaintAggregator) | 572 TEST_PPAPI_NACL(PaintAggregator) |
| 621 | 573 |
| 622 // TODO(danakj): http://crbug.com/115286 | 574 // TODO(danakj): http://crbug.com/115286 |
| 623 TEST_PPAPI_IN_PROCESS(DISABLED_Scrollbar) | |
| 624 // http://crbug.com/89961 | |
| 625 TEST_PPAPI_OUT_OF_PROCESS(DISABLED_Scrollbar) | |
| 626 // TODO(danakj): http://crbug.com/115286 | |
| 627 TEST_PPAPI_NACL(DISABLED_Scrollbar) | 575 TEST_PPAPI_NACL(DISABLED_Scrollbar) |
| 628 | 576 |
| 629 TEST_PPAPI_IN_PROCESS(URLUtil) | |
| 630 TEST_PPAPI_OUT_OF_PROCESS(URLUtil) | |
| 631 | |
| 632 TEST_PPAPI_IN_PROCESS(CharSet) | |
| 633 TEST_PPAPI_OUT_OF_PROCESS(CharSet) | |
| 634 | |
| 635 TEST_PPAPI_IN_PROCESS(Var) | |
| 636 TEST_PPAPI_OUT_OF_PROCESS(Var) | |
| 637 TEST_PPAPI_NACL(Var) | 577 TEST_PPAPI_NACL(Var) |
| 638 | 578 |
| 639 TEST_PPAPI_IN_PROCESS(VarResource) | |
| 640 TEST_PPAPI_OUT_OF_PROCESS(VarResource) | |
| 641 TEST_PPAPI_NACL(VarResource) | 579 TEST_PPAPI_NACL(VarResource) |
| 642 | 580 |
| 643 // Flaky on mac, http://crbug.com/121107 | |
| 644 #if defined(OS_MACOSX) | |
| 645 #define MAYBE_VarDeprecated DISABLED_VarDeprecated | |
| 646 #else | |
| 647 #define MAYBE_VarDeprecated VarDeprecated | |
| 648 #endif | |
| 649 | |
| 650 TEST_PPAPI_IN_PROCESS(VarDeprecated) | |
| 651 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_VarDeprecated) | |
| 652 | |
| 653 // PostMessage tests. | 581 // PostMessage tests. |
| 654 #define RUN_POSTMESSAGE_SUBTESTS \ | 582 #define RUN_POSTMESSAGE_SUBTESTS \ |
| 655 RunTestViaHTTP( \ | 583 RunTestViaHTTP( \ |
| 656 LIST_TEST(PostMessage_SendInInit) \ | 584 LIST_TEST(PostMessage_SendInInit) \ |
| 657 LIST_TEST(PostMessage_SendingData) \ | 585 LIST_TEST(PostMessage_SendingData) \ |
| 658 LIST_TEST(PostMessage_SendingString) \ | 586 LIST_TEST(PostMessage_SendingString) \ |
| 659 LIST_TEST(PostMessage_SendingArrayBuffer) \ | 587 LIST_TEST(PostMessage_SendingArrayBuffer) \ |
| 660 LIST_TEST(PostMessage_SendingArray) \ | 588 LIST_TEST(PostMessage_SendingArray) \ |
| 661 LIST_TEST(PostMessage_SendingDictionary) \ | 589 LIST_TEST(PostMessage_SendingDictionary) \ |
| 662 LIST_TEST(PostMessage_SendingResource) \ | 590 LIST_TEST(PostMessage_SendingResource) \ |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 682 RUN_POSTMESSAGE_SUBTESTS; | 610 RUN_POSTMESSAGE_SUBTESTS; |
| 683 } | 611 } |
| 684 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, PostMessage) { | 612 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, PostMessage) { |
| 685 RUN_POSTMESSAGE_SUBTESTS; | 613 RUN_POSTMESSAGE_SUBTESTS; |
| 686 } | 614 } |
| 687 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, | 615 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, |
| 688 MAYBE_PNACL_NONSFI(PostMessage)) { | 616 MAYBE_PNACL_NONSFI(PostMessage)) { |
| 689 RUN_POSTMESSAGE_SUBTESTS; | 617 RUN_POSTMESSAGE_SUBTESTS; |
| 690 } | 618 } |
| 691 | 619 |
| 692 TEST_PPAPI_IN_PROCESS(Memory) | |
| 693 TEST_PPAPI_OUT_OF_PROCESS(Memory) | |
| 694 TEST_PPAPI_NACL(Memory) | 620 TEST_PPAPI_NACL(Memory) |
| 695 | 621 |
| 696 TEST_PPAPI_IN_PROCESS(VideoDecoderDev) | |
| 697 TEST_PPAPI_OUT_OF_PROCESS(VideoDecoderDev) | |
| 698 | |
| 699 // FileIO tests. | 622 // FileIO tests. |
| 700 #define RUN_FILEIO_SUBTESTS \ | 623 #define RUN_FILEIO_SUBTESTS \ |
| 701 RunTestViaHTTP( \ | 624 RunTestViaHTTP( \ |
| 702 LIST_TEST(FileIO_Open) \ | 625 LIST_TEST(FileIO_Open) \ |
| 703 LIST_TEST(FileIO_OpenDirectory) \ | 626 LIST_TEST(FileIO_OpenDirectory) \ |
| 704 LIST_TEST(FileIO_AbortCalls) \ | 627 LIST_TEST(FileIO_AbortCalls) \ |
| 705 LIST_TEST(FileIO_ParallelReads) \ | 628 LIST_TEST(FileIO_ParallelReads) \ |
| 706 LIST_TEST(FileIO_ParallelWrites) \ | 629 LIST_TEST(FileIO_ParallelWrites) \ |
| 707 LIST_TEST(FileIO_NotAllowMixedReadWrite) \ | 630 LIST_TEST(FileIO_NotAllowMixedReadWrite) \ |
| 708 LIST_TEST(FileIO_ReadWriteSetLength) \ | 631 LIST_TEST(FileIO_ReadWriteSetLength) \ |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1365 LIST_TEST(FlashDRM_GetHmonitor) | 1288 LIST_TEST(FlashDRM_GetHmonitor) |
| 1366 LIST_TEST(FlashDRM_GetVoucherFile)); | 1289 LIST_TEST(FlashDRM_GetVoucherFile)); |
| 1367 } | 1290 } |
| 1368 | 1291 |
| 1369 TEST_PPAPI_IN_PROCESS(TalkPrivate) | 1292 TEST_PPAPI_IN_PROCESS(TalkPrivate) |
| 1370 TEST_PPAPI_OUT_OF_PROCESS(TalkPrivate) | 1293 TEST_PPAPI_OUT_OF_PROCESS(TalkPrivate) |
| 1371 | 1294 |
| 1372 #if defined(OS_CHROMEOS) | 1295 #if defined(OS_CHROMEOS) |
| 1373 TEST_PPAPI_OUT_OF_PROCESS(OutputProtectionPrivate) | 1296 TEST_PPAPI_OUT_OF_PROCESS(OutputProtectionPrivate) |
| 1374 #endif | 1297 #endif |
| OLD | NEW |