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 "base/path_service.h" | 5 #include "base/path_service.h" |
6 #include "base/test/test_timeouts.h" | 6 #include "base/test/test_timeouts.h" |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/browser/extensions/extension_browsertest.h" | 8 #include "chrome/browser/extensions/extension_browsertest.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 | 337 |
338 // UDPSocket tests. | 338 // UDPSocket tests. |
339 // UDPSocket_Broadcast is disabled for OSX because it requires root | 339 // UDPSocket_Broadcast is disabled for OSX because it requires root |
340 // permissions on OSX 10.7+. | 340 // permissions on OSX 10.7+. |
341 #if defined(OS_MACOSX) | 341 #if defined(OS_MACOSX) |
342 #define MAYBE_UDPSocket_Broadcast DISABLED_UDPSocket_Broadcast | 342 #define MAYBE_UDPSocket_Broadcast DISABLED_UDPSocket_Broadcast |
343 #else | 343 #else |
344 #define MAYBE_UDPSocket_Broadcast UDPSocket_Broadcast | 344 #define MAYBE_UDPSocket_Broadcast UDPSocket_Broadcast |
345 #endif | 345 #endif |
346 | 346 |
347 #define RUN_UDPSOCKET_SUBTESTS \ | 347 #define UDPSOCKET_TEST(_test) \ |
348 RunTestViaHTTP( \ | 348 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, _test) { \ |
349 LIST_TEST(UDPSocket_ReadWrite) \ | 349 RunTestViaHTTP(LIST_TEST(_test)); \ |
350 LIST_TEST(UDPSocket_SetOption) \ | 350 } \ |
351 LIST_TEST(MAYBE_UDPSocket_Broadcast) \ | 351 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, _test) { \ |
352 LIST_TEST(UDPSocket_ParallelSend)) | 352 RunTestViaHTTP(LIST_TEST(_test)); \ |
| 353 } \ |
| 354 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(_test)) { \ |
| 355 RunTestViaHTTP(LIST_TEST(_test)); \ |
| 356 } \ |
| 357 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, _test) { \ |
| 358 RunTestViaHTTP(LIST_TEST(_test)); \ |
| 359 } \ |
| 360 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, \ |
| 361 MAYBE_PNACL_NONSFI(_test)) { \ |
| 362 RunTestViaHTTP(LIST_TEST(_test)); \ |
| 363 } \ |
| 364 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTransitionalNonSfiTest, \ |
| 365 MAYBE_PNACL_TRANSITIONAL_NONSFI(_test)) { \ |
| 366 RunTestViaHTTP(LIST_TEST(_test)); \ |
| 367 } \ |
353 | 368 |
354 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, UDPSocket) { | 369 // Instead of one single test for all UDPSocket features (like it is done for |
355 RUN_UDPSOCKET_SUBTESTS; | 370 // TCPSocket), split them into multiple, making it easier to isolate which tests |
356 } | 371 // are failing. |
357 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, UDPSocket) { | 372 UDPSOCKET_TEST(UDPSocket_ReadWrite) |
358 RUN_UDPSOCKET_SUBTESTS; | 373 UDPSOCKET_TEST(UDPSocket_SetOption) |
359 } | 374 UDPSOCKET_TEST(UDPSocket_SetOption_1_0) |
360 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(UDPSocket)) { | 375 UDPSOCKET_TEST(UDPSocket_SetOption_1_1) |
361 RUN_UDPSOCKET_SUBTESTS; | 376 UDPSOCKET_TEST(MAYBE_UDPSocket_Broadcast) |
362 } | 377 UDPSOCKET_TEST(UDPSocket_ParallelSend) |
363 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, UDPSocket) { | 378 UDPSOCKET_TEST(UDPSocket_Multicast) |
364 RUN_UDPSOCKET_SUBTESTS; | |
365 } | |
366 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, | |
367 MAYBE_PNACL_NONSFI(UDPSocket)) { | |
368 RUN_UDPSOCKET_SUBTESTS; | |
369 } | |
370 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTransitionalNonSfiTest, | |
371 MAYBE_PNACL_TRANSITIONAL_NONSFI(UDPSocket)) { | |
372 RUN_UDPSOCKET_SUBTESTS; | |
373 } | |
374 | |
375 | 379 |
376 // UDPSocketPrivate tests. | 380 // UDPSocketPrivate tests. |
377 // UDPSocketPrivate_Broadcast is disabled for OSX because it requires root | 381 // UDPSocketPrivate_Broadcast is disabled for OSX because it requires root |
378 // permissions on OSX 10.7+. | 382 // permissions on OSX 10.7+. |
379 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_Connect) | 383 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_Connect) |
380 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_ConnectFailure) | 384 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_ConnectFailure) |
381 #if !defined(OS_MACOSX) | 385 #if !defined(OS_MACOSX) |
382 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_Broadcast) | 386 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_Broadcast) |
383 #endif // !defined(OS_MACOSX) | 387 #endif // !defined(OS_MACOSX) |
384 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_SetSocketFeatureErrors) | 388 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_SetSocketFeatureErrors) |
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1578 #endif | 1582 #endif |
1579 | 1583 |
1580 IN_PROC_BROWSER_TEST_F(MojoPPAPITest, MAYBE_MOJO(Mojo)) { | 1584 IN_PROC_BROWSER_TEST_F(MojoPPAPITest, MAYBE_MOJO(Mojo)) { |
1581 RunTest(); | 1585 RunTest(); |
1582 } | 1586 } |
1583 | 1587 |
1584 IN_PROC_BROWSER_TEST_F(MojoPPAPITest, MAYBE_MOJO(MojoFailsWithoutFlag)) { | 1588 IN_PROC_BROWSER_TEST_F(MojoPPAPITest, MAYBE_MOJO(MojoFailsWithoutFlag)) { |
1585 RunTestWithoutFlag(); | 1589 RunTestWithoutFlag(); |
1586 } | 1590 } |
1587 #endif | 1591 #endif |
OLD | NEW |