| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 // CheckCandidate2, except that it will provide more detail about | 491 // CheckCandidate2, except that it will provide more detail about |
| 492 // what didn't match. | 492 // what didn't match. |
| 493 void ExpectCandidate2(const Result& expected) { | 493 void ExpectCandidate2(const Result& expected) { |
| 494 if (CheckCandidate2(expected)) { | 494 if (CheckCandidate2(expected)) { |
| 495 return; | 495 return; |
| 496 } | 496 } |
| 497 | 497 |
| 498 const std::string& local_type = LocalCandidate(ep2_ch1())->type(); | 498 const std::string& local_type = LocalCandidate(ep2_ch1())->type(); |
| 499 const std::string& local_proto = LocalCandidate(ep2_ch1())->protocol(); | 499 const std::string& local_proto = LocalCandidate(ep2_ch1())->protocol(); |
| 500 const std::string& remote_type = RemoteCandidate(ep2_ch1())->type(); | 500 const std::string& remote_type = RemoteCandidate(ep2_ch1())->type(); |
| 501 const std::string& remote_proto = RemoteCandidate(ep2_ch1())->protocol(); |
| 502 EXPECT_EQ(expected.local_type2, local_type); |
| 503 EXPECT_EQ(expected.remote_type2, remote_type); |
| 501 EXPECT_EQ(expected.local_proto2, local_proto); | 504 EXPECT_EQ(expected.local_proto2, local_proto); |
| 502 EXPECT_EQ(expected.remote_proto2, remote_type); | 505 EXPECT_EQ(expected.remote_proto2, remote_proto); |
| 503 EXPECT_EQ(expected.local_type2, local_type); | |
| 504 if (remote_type != expected.remote_type2) { | |
| 505 EXPECT_TRUE(expected.remote_type2 == cricket::LOCAL_PORT_TYPE || | |
| 506 expected.remote_type2 == cricket::STUN_PORT_TYPE); | |
| 507 EXPECT_TRUE(remote_type == cricket::LOCAL_PORT_TYPE || | |
| 508 remote_type == cricket::STUN_PORT_TYPE || | |
| 509 remote_type == cricket::PRFLX_PORT_TYPE); | |
| 510 } | |
| 511 } | 506 } |
| 512 | 507 |
| 513 void Test(const Result& expected) { | 508 void Test(const Result& expected) { |
| 514 int64_t connect_start = rtc::TimeMillis(); | 509 int64_t connect_start = rtc::TimeMillis(); |
| 515 int64_t connect_time; | 510 int64_t connect_time; |
| 516 | 511 |
| 517 // Create the channels and wait for them to connect. | 512 // Create the channels and wait for them to connect. |
| 518 CreateChannels(1); | 513 CreateChannels(1); |
| 519 EXPECT_TRUE_WAIT_MARGIN(ep1_ch1() != NULL && | 514 EXPECT_TRUE_WAIT_MARGIN(ep1_ch1() != NULL && |
| 520 ep2_ch1() != NULL && | 515 ep2_ch1() != NULL && |
| (...skipping 11 matching lines...) Expand all Loading... |
| 532 << expected.connect_wait << " ms)"; | 527 << expected.connect_wait << " ms)"; |
| 533 } | 528 } |
| 534 | 529 |
| 535 // Allow a few turns of the crank for the best connections to emerge. | 530 // Allow a few turns of the crank for the best connections to emerge. |
| 536 // This may take up to 2 seconds. | 531 // This may take up to 2 seconds. |
| 537 if (ep1_ch1()->best_connection() && | 532 if (ep1_ch1()->best_connection() && |
| 538 ep2_ch1()->best_connection()) { | 533 ep2_ch1()->best_connection()) { |
| 539 int64_t converge_start = rtc::TimeMillis(); | 534 int64_t converge_start = rtc::TimeMillis(); |
| 540 int64_t converge_time; | 535 int64_t converge_time; |
| 541 int64_t converge_wait = 2000; | 536 int64_t converge_wait = 2000; |
| 542 EXPECT_TRUE_WAIT_MARGIN(CheckCandidate1(expected), converge_wait, | 537 // Verifying local and remote channel best connection information. This is |
| 543 converge_wait); | 538 // done only for the RFC 5245 as controlled agent will use USE-CANDIDATE |
| 539 // from controlling (ep1) agent. We can easily predict from EP1 result |
| 540 // matrix. |
| 541 EXPECT_TRUE_WAIT_MARGIN( |
| 542 CheckCandidate1(expected) && CheckCandidate2(expected), converge_wait, |
| 543 converge_wait); |
| 544 // Also do EXPECT_EQ on each part so that failures are more verbose. | 544 // Also do EXPECT_EQ on each part so that failures are more verbose. |
| 545 ExpectCandidate1(expected); | 545 ExpectCandidate1(expected); |
| 546 | |
| 547 // Verifying remote channel best connection information. This is done | |
| 548 // only for the RFC 5245 as controlled agent will use USE-CANDIDATE | |
| 549 // from controlling (ep1) agent. We can easily predict from EP1 result | |
| 550 // matrix. | |
| 551 | |
| 552 // Checking for best connection candidates information at remote. | |
| 553 EXPECT_TRUE_WAIT(CheckCandidate2(expected), kDefaultTimeout); | |
| 554 // For verbose | |
| 555 ExpectCandidate2(expected); | 546 ExpectCandidate2(expected); |
| 556 | 547 |
| 557 converge_time = rtc::TimeMillis() - converge_start; | 548 converge_time = rtc::TimeMillis() - converge_start; |
| 558 if (converge_time < converge_wait) { | 549 if (converge_time < converge_wait) { |
| 559 LOG(LS_INFO) << "Converge time: " << converge_time << " ms"; | 550 LOG(LS_INFO) << "Converge time: " << converge_time << " ms"; |
| 560 } else { | 551 } else { |
| 561 LOG(LS_INFO) << "Converge time: " << "TIMEOUT (" | 552 LOG(LS_INFO) << "Converge time: " << "TIMEOUT (" |
| 562 << converge_wait << " ms)"; | 553 << converge_wait << " ms)"; |
| 563 } | 554 } |
| 564 } | 555 } |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 "prflx", "tcp", "local", "tcp", 3000); | 847 "prflx", "tcp", "local", "tcp", 3000); |
| 857 const P2PTransportChannelTestBase::Result P2PTransportChannelTestBase:: | 848 const P2PTransportChannelTestBase::Result P2PTransportChannelTestBase:: |
| 858 kPrflxTcpToLocalTcp("prflx", "tcp", "local", "tcp", | 849 kPrflxTcpToLocalTcp("prflx", "tcp", "local", "tcp", |
| 859 "local", "tcp", "prflx", "tcp", 3000); | 850 "local", "tcp", "prflx", "tcp", 3000); |
| 860 | 851 |
| 861 // Test the matrix of all the connectivity types we expect to see in the wild. | 852 // Test the matrix of all the connectivity types we expect to see in the wild. |
| 862 // Just test every combination of the configs in the Config enum. | 853 // Just test every combination of the configs in the Config enum. |
| 863 class P2PTransportChannelTest : public P2PTransportChannelTestBase { | 854 class P2PTransportChannelTest : public P2PTransportChannelTestBase { |
| 864 protected: | 855 protected: |
| 865 static const Result* kMatrix[NUM_CONFIGS][NUM_CONFIGS]; | 856 static const Result* kMatrix[NUM_CONFIGS][NUM_CONFIGS]; |
| 866 static const Result* kMatrixSharedUfrag[NUM_CONFIGS][NUM_CONFIGS]; | |
| 867 static const Result* kMatrixSharedSocketAsGice[NUM_CONFIGS][NUM_CONFIGS]; | |
| 868 static const Result* kMatrixSharedSocketAsIce[NUM_CONFIGS][NUM_CONFIGS]; | |
| 869 void ConfigureEndpoints(Config config1, | 857 void ConfigureEndpoints(Config config1, |
| 870 Config config2, | 858 Config config2, |
| 871 int allocator_flags1, | 859 int allocator_flags1, |
| 872 int allocator_flags2) { | 860 int allocator_flags2) { |
| 873 ServerAddresses stun_servers; | 861 ServerAddresses stun_servers; |
| 874 stun_servers.insert(kStunAddr); | 862 stun_servers.insert(kStunAddr); |
| 875 GetEndpoint(0)->allocator_.reset( | 863 GetEndpoint(0)->allocator_.reset( |
| 876 new cricket::BasicPortAllocator(&(GetEndpoint(0)->network_manager_), | 864 new cricket::BasicPortAllocator(&(GetEndpoint(0)->network_manager_), |
| 877 stun_servers, | 865 stun_servers, |
| 878 rtc::SocketAddress(), rtc::SocketAddress(), | 866 rtc::SocketAddress(), rtc::SocketAddress(), |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 #define PURU &kPrflxUdpToRelayUdp | 969 #define PURU &kPrflxUdpToRelayUdp |
| 982 #define LTLT &kLocalTcpToLocalTcp | 970 #define LTLT &kLocalTcpToLocalTcp |
| 983 #define LTPT &kLocalTcpToPrflxTcp | 971 #define LTPT &kLocalTcpToPrflxTcp |
| 984 #define PTLT &kPrflxTcpToLocalTcp | 972 #define PTLT &kPrflxTcpToLocalTcp |
| 985 // TODO: Enable these once TestRelayServer can accept external TCP. | 973 // TODO: Enable these once TestRelayServer can accept external TCP. |
| 986 #define LTRT NULL | 974 #define LTRT NULL |
| 987 #define LSRS NULL | 975 #define LSRS NULL |
| 988 | 976 |
| 989 // Test matrix. Originator behavior defined by rows, receiever by columns. | 977 // Test matrix. Originator behavior defined by rows, receiever by columns. |
| 990 | 978 |
| 991 // Currently the p2ptransportchannel.cc (specifically the | |
| 992 // P2PTransportChannel::OnUnknownAddress) operates in 2 modes depend on the | |
| 993 // remote candidates - ufrag per port or shared ufrag. | |
| 994 // For example, if the remote candidates have the shared ufrag, for the unknown | |
| 995 // address reaches the OnUnknownAddress, we will try to find the matched | |
| 996 // remote candidate based on the address and protocol, if not found, a new | |
| 997 // remote candidate will be created for this address. But if the remote | |
| 998 // candidates have different ufrags, we will try to find the matched remote | |
| 999 // candidate by comparing the ufrag. If not found, an error will be returned. | |
| 1000 // Because currently the shared ufrag feature is under the experiment and will | |
| 1001 // be rolled out gradually. We want to test the different combinations of peers | |
| 1002 // with/without the shared ufrag enabled. And those different combinations have | |
| 1003 // different expectation of the best connection. For example in the OpenToCONE | |
| 1004 // case, an unknown address will be updated to a "host" remote candidate if the | |
| 1005 // remote peer uses different ufrag per port. But in the shared ufrag case, | |
| 1006 // a "stun" (should be peer-reflexive eventually) candidate will be created for | |
| 1007 // that. So the expected best candidate will be LUSU instead of LULU. | |
| 1008 // With all these, we have to keep 2 test matrixes for the tests: | |
| 1009 // kMatrix - for the tests that the remote peer uses different ufrag per port. | |
| 1010 // kMatrixSharedUfrag - for the tests that remote peer uses shared ufrag. | |
| 1011 // The different between the two matrixes are on: | |
| 1012 // OPToCONE, OPTo2CON, | |
| 1013 // COToCONE, COToADDR, COToPORT, COToSYMM, COTo2CON, COToSCON, | |
| 1014 // ADToCONE, ADToADDR, ADTo2CON, | |
| 1015 // POToADDR, | |
| 1016 // SYToADDR, | |
| 1017 // 2CToCONE, 2CToADDR, 2CToPORT, 2CToSYMM, 2CTo2CON, 2CToSCON, | |
| 1018 // SCToADDR, | |
| 1019 | |
| 1020 // TODO: Fix NULLs caused by lack of TCP support in NATSocket. | 979 // TODO: Fix NULLs caused by lack of TCP support in NATSocket. |
| 1021 // TODO: Fix NULLs caused by no HTTP proxy support. | 980 // TODO: Fix NULLs caused by no HTTP proxy support. |
| 1022 // TODO: Rearrange rows/columns from best to worst. | 981 // TODO: Rearrange rows/columns from best to worst. |
| 1023 // TODO(ronghuawu): Keep only one test matrix once the shared ufrag is enabled. | 982 const P2PTransportChannelTest::Result* P2PTransportChannelTest::kMatrix[NUM_CONF
IGS][NUM_CONFIGS] = { |
| 1024 const P2PTransportChannelTest::Result* | 983 // OPEN CONE ADDR PORT SYMM 2CON SCON !UDP !TCP HTTP PRXH PR
XS |
| 1025 P2PTransportChannelTest::kMatrix[NUM_CONFIGS][NUM_CONFIGS] = { | 984 /*OP*/ {LULU, LUSU, LUSU, LUSU, LUPU, LUSU, LUPU, PTLT, LTPT, LSRS, NULL, LT
PT}, |
| 1026 // OPEN CONE ADDR PORT SYMM 2CON SCON !UDP !TCP HTTP PRXH PRXS | 985 /*CO*/ {LULU, LUSU, LUSU, LUSU, LUPU, LUSU, LUPU, NULL, NULL, LSRS, NULL, LT
RT}, |
| 1027 /*OP*/ {LULU, LULU, LULU, LULU, LULU, LULU, LULU, LTLT, LTLT, LSRS, NULL, LTLT}, | 986 /*AD*/ {LULU, LUSU, LUSU, LUSU, LUPU, LUSU, LUPU, NULL, NULL, LSRS, NULL, LT
RT}, |
| 1028 /*CO*/ {LULU, LULU, LULU, SULU, SULU, LULU, SULU, NULL, NULL, LSRS, NULL, LTRT}, | 987 /*PO*/ {LULU, LUSU, LUSU, LUSU, LURU, LUSU, LURU, NULL, NULL, LSRS, NULL, LT
RT}, |
| 1029 /*AD*/ {LULU, LULU, LULU, SUSU, SUSU, LULU, SUSU, NULL, NULL, LSRS, NULL, LTRT}, | 988 /*SY*/ {PULU, PUSU, PUSU, PURU, PURU, PUSU, PURU, NULL, NULL, LSRS, NULL, LT
RT}, |
| 1030 /*PO*/ {LULU, LUSU, LUSU, SUSU, LURU, LUSU, LURU, NULL, NULL, LSRS, NULL, LTRT}, | 989 /*2C*/ {LULU, LUSU, LUSU, LUSU, LUPU, LUSU, LUPU, NULL, NULL, LSRS, NULL, LT
RT}, |
| 1031 /*SY*/ {LULU, LUSU, LUSU, LURU, LURU, LUSU, LURU, NULL, NULL, LSRS, NULL, LTRT}, | 990 /*SC*/ {PULU, PUSU, PUSU, PURU, PURU, PUSU, PURU, NULL, NULL, LSRS, NULL, LT
RT}, |
| 1032 /*2C*/ {LULU, LULU, LULU, SULU, SULU, LULU, SULU, NULL, NULL, LSRS, NULL, LTRT}, | 991 /*!U*/ {PTLT, NULL, NULL, NULL, NULL, NULL, NULL, PTLT, LTPT, LSRS, NULL, LT
RT}, |
| 1033 /*SC*/ {LULU, LUSU, LUSU, LURU, LURU, LUSU, LURU, NULL, NULL, LSRS, NULL, LTRT}, | 992 /*!T*/ {LTRT, NULL, NULL, NULL, NULL, NULL, NULL, PTLT, LTRT, LSRS, NULL, LT
RT}, |
| 1034 /*!U*/ {LTLT, NULL, NULL, NULL, NULL, NULL, NULL, LTLT, LTLT, LSRS, NULL, LTRT}, | 993 /*HT*/ {LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, NULL, LS
RS}, |
| 1035 /*!T*/ {LTRT, NULL, NULL, NULL, NULL, NULL, NULL, LTLT, LTRT, LSRS, NULL, LTRT}, | 994 /*PR*/ {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NU
LL}, |
| 1036 /*HT*/ {LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, NULL, LSRS}, | 995 /*PR*/ {LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LSRS, NULL, LT
RT}, |
| 1037 /*PR*/ {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, | |
| 1038 /*PR*/ {LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LSRS, NULL, LTRT}, | |
| 1039 }; | |
| 1040 const P2PTransportChannelTest::Result* | |
| 1041 P2PTransportChannelTest::kMatrixSharedUfrag[NUM_CONFIGS][NUM_CONFIGS] = { | |
| 1042 // OPEN CONE ADDR PORT SYMM 2CON SCON !UDP !TCP HTTP PRXH PRXS | |
| 1043 /*OP*/ {LULU, LUSU, LULU, LULU, LULU, LUSU, LULU, LTLT, LTLT, LSRS, NULL, LTLT}, | |
| 1044 /*CO*/ {LULU, LUSU, LUSU, SUSU, SUSU, LUSU, SUSU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1045 /*AD*/ {LULU, LUSU, LUSU, SUSU, SUSU, LUSU, SUSU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1046 /*PO*/ {LULU, LUSU, LUSU, SUSU, LURU, LUSU, LURU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1047 /*SY*/ {LULU, LUSU, LUSU, LURU, LURU, LUSU, LURU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1048 /*2C*/ {LULU, LUSU, LUSU, SUSU, SUSU, LUSU, SUSU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1049 /*SC*/ {LULU, LUSU, LUSU, LURU, LURU, LUSU, LURU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1050 /*!U*/ {LTLT, NULL, NULL, NULL, NULL, NULL, NULL, LTLT, LTLT, LSRS, NULL, LTRT}, | |
| 1051 /*!T*/ {LTRT, NULL, NULL, NULL, NULL, NULL, NULL, LTLT, LTRT, LSRS, NULL, LTRT}, | |
| 1052 /*HT*/ {LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, NULL, LSRS}, | |
| 1053 /*PR*/ {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, | |
| 1054 /*PR*/ {LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LSRS, NULL, LTRT}, | |
| 1055 }; | |
| 1056 const P2PTransportChannelTest::Result* | |
| 1057 P2PTransportChannelTest::kMatrixSharedSocketAsGice | |
| 1058 [NUM_CONFIGS][NUM_CONFIGS] = { | |
| 1059 // OPEN CONE ADDR PORT SYMM 2CON SCON !UDP !TCP HTTP PRXH PRXS | |
| 1060 /*OP*/ {LULU, LUSU, LUSU, LUSU, LUSU, LUSU, LUSU, LTLT, LTLT, LSRS, NULL, LTLT}, | |
| 1061 /*CO*/ {LULU, LUSU, LUSU, LUSU, LUSU, LUSU, LUSU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1062 /*AD*/ {LULU, LUSU, LUSU, LUSU, LUSU, LUSU, LUSU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1063 /*PO*/ {LULU, LUSU, LUSU, LUSU, LURU, LUSU, LURU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1064 /*SY*/ {LULU, LUSU, LUSU, LURU, LURU, LUSU, LURU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1065 /*2C*/ {LULU, LUSU, LUSU, LUSU, LUSU, LUSU, LUSU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1066 /*SC*/ {LULU, LUSU, LUSU, LURU, LURU, LUSU, LURU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1067 /*!U*/ {LTLT, NULL, NULL, NULL, NULL, NULL, NULL, LTLT, LTLT, LSRS, NULL, LTRT}, | |
| 1068 /*!T*/ {LTRT, NULL, NULL, NULL, NULL, NULL, NULL, LTLT, LTRT, LSRS, NULL, LTRT}, | |
| 1069 /*HT*/ {LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, NULL, LSRS}, | |
| 1070 /*PR*/ {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, | |
| 1071 /*PR*/ {LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LSRS, NULL, LTRT}, | |
| 1072 }; | |
| 1073 const P2PTransportChannelTest::Result* | |
| 1074 P2PTransportChannelTest::kMatrixSharedSocketAsIce | |
| 1075 [NUM_CONFIGS][NUM_CONFIGS] = { | |
| 1076 // OPEN CONE ADDR PORT SYMM 2CON SCON !UDP !TCP HTTP PRXH PRXS | |
| 1077 /*OP*/ {LULU, LUSU, LUSU, LUSU, LUPU, LUSU, LUPU, PTLT, LTPT, LSRS, NULL, LTPT}, | |
| 1078 /*CO*/ {LULU, LUSU, LUSU, LUSU, LUPU, LUSU, LUPU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1079 /*AD*/ {LULU, LUSU, LUSU, LUSU, LUPU, LUSU, LUPU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1080 /*PO*/ {LULU, LUSU, LUSU, LUSU, LURU, LUSU, LURU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1081 /*SY*/ {PULU, PUSU, PUSU, PURU, PURU, PUSU, PURU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1082 /*2C*/ {LULU, LUSU, LUSU, LUSU, LUPU, LUSU, LUPU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1083 /*SC*/ {PULU, PUSU, PUSU, PURU, PURU, PUSU, PURU, NULL, NULL, LSRS, NULL, LTRT}, | |
| 1084 /*!U*/ {PTLT, NULL, NULL, NULL, NULL, NULL, NULL, PTLT, LTPT, LSRS, NULL, LTRT}, | |
| 1085 /*!T*/ {LTRT, NULL, NULL, NULL, NULL, NULL, NULL, PTLT, LTRT, LSRS, NULL, LTRT}, | |
| 1086 /*HT*/ {LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, LSRS, NULL, LSRS}, | |
| 1087 /*PR*/ {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, | |
| 1088 /*PR*/ {LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LTRT, LSRS, NULL, LTRT}, | |
| 1089 }; | 996 }; |
| 1090 | 997 |
| 1091 // The actual tests that exercise all the various configurations. | 998 // The actual tests that exercise all the various configurations. |
| 1092 // Test names are of the form P2PTransportChannelTest_TestOPENToNAT_FULL_CONE | 999 // Test names are of the form P2PTransportChannelTest_TestOPENToNAT_FULL_CONE |
| 1093 #define P2P_TEST_DECLARATION(x, y, z) \ | 1000 #define P2P_TEST_DECLARATION(x, y, z) \ |
| 1094 TEST_F(P2PTransportChannelTest, z##Test##x##To##y) { \ | 1001 TEST_F(P2PTransportChannelTest, z##Test##x##To##y) { \ |
| 1095 ConfigureEndpoints(x, y, PORTALLOCATOR_ENABLE_SHARED_SOCKET, \ | 1002 ConfigureEndpoints(x, y, PORTALLOCATOR_ENABLE_SHARED_SOCKET, \ |
| 1096 PORTALLOCATOR_ENABLE_SHARED_SOCKET); \ | 1003 PORTALLOCATOR_ENABLE_SHARED_SOCKET); \ |
| 1097 if (kMatrixSharedSocketAsIce[x][y] != NULL) \ | 1004 if (kMatrix[x][y] != NULL) \ |
| 1098 Test(*kMatrixSharedSocketAsIce[x][y]); \ | 1005 Test(*kMatrix[x][y]); \ |
| 1099 else \ | 1006 else \ |
| 1100 LOG(LS_WARNING) << "Not yet implemented"; \ | 1007 LOG(LS_WARNING) << "Not yet implemented"; \ |
| 1101 } | 1008 } |
| 1102 | 1009 |
| 1103 #define P2P_TEST(x, y) \ | 1010 #define P2P_TEST(x, y) \ |
| 1104 P2P_TEST_DECLARATION(x, y,) | 1011 P2P_TEST_DECLARATION(x, y,) |
| 1105 | 1012 |
| 1106 #define FLAKY_P2P_TEST(x, y) \ | 1013 #define FLAKY_P2P_TEST(x, y) \ |
| 1107 P2P_TEST_DECLARATION(x, y, DISABLED_) | 1014 P2P_TEST_DECLARATION(x, y, DISABLED_) |
| 1108 | 1015 |
| (...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2950 | 2857 |
| 2951 // TCP Relay/Relay is the next. | 2858 // TCP Relay/Relay is the next. |
| 2952 VerifyNextPingableConnection(cricket::RELAY_PORT_TYPE, | 2859 VerifyNextPingableConnection(cricket::RELAY_PORT_TYPE, |
| 2953 cricket::RELAY_PORT_TYPE, | 2860 cricket::RELAY_PORT_TYPE, |
| 2954 cricket::TCP_PROTOCOL_NAME); | 2861 cricket::TCP_PROTOCOL_NAME); |
| 2955 | 2862 |
| 2956 // Finally, Local/Relay will be pinged. | 2863 // Finally, Local/Relay will be pinged. |
| 2957 VerifyNextPingableConnection(cricket::LOCAL_PORT_TYPE, | 2864 VerifyNextPingableConnection(cricket::LOCAL_PORT_TYPE, |
| 2958 cricket::RELAY_PORT_TYPE); | 2865 cricket::RELAY_PORT_TYPE); |
| 2959 } | 2866 } |
| OLD | NEW |