Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / test / fake_network_pipe_unittest.cc
index 0399688..b10f297 100644 (file)
@@ -41,6 +41,8 @@ class FakeNetworkPipeTest : public ::testing::Test {
   virtual void SetUp() {
     TickTime::UseFakeClock(12345);
     receiver_.reset(new MockReceiver());
+    ON_CALL(*receiver_, DeliverPacket(_, _))
+        .WillByDefault(Return(PacketReceiver::DELIVERY_OK));
   }
 
   virtual void TearDown() {
@@ -65,7 +67,7 @@ void DeleteMemory(uint8_t* data, int length) { delete [] data; }
 // Test the capacity link and verify we get as many packets as we expect.
 TEST_F(FakeNetworkPipeTest, CapacityTest) {
   FakeNetworkPipe::Config config;
-  config.queue_length = 20;
+  config.queue_length_packets = 20;
   config.link_capacity_kbps = 80;
   scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
   pipe->SetReceiver(receiver_.get());
@@ -107,7 +109,7 @@ TEST_F(FakeNetworkPipeTest, CapacityTest) {
 // Test the extra network delay.
 TEST_F(FakeNetworkPipeTest, ExtraDelayTest) {
   FakeNetworkPipe::Config config;
-  config.queue_length = 20;
+  config.queue_length_packets = 20;
   config.queue_delay_ms = 100;
   config.link_capacity_kbps = 80;
   scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
@@ -144,7 +146,7 @@ TEST_F(FakeNetworkPipeTest, ExtraDelayTest) {
 // packets too quickly.
 TEST_F(FakeNetworkPipeTest, QueueLengthTest) {
   FakeNetworkPipe::Config config;
-  config.queue_length = 2;
+  config.queue_length_packets = 2;
   config.link_capacity_kbps = 80;
   scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
   pipe->SetReceiver(receiver_.get());
@@ -167,7 +169,7 @@ TEST_F(FakeNetworkPipeTest, QueueLengthTest) {
 // Test we get statistics as expected.
 TEST_F(FakeNetworkPipeTest, StatisticsTest) {
   FakeNetworkPipe::Config config;
-  config.queue_length = 2;
+  config.queue_length_packets = 2;
   config.queue_delay_ms = 20;
   config.link_capacity_kbps = 80;
   scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
@@ -197,7 +199,7 @@ TEST_F(FakeNetworkPipeTest, StatisticsTest) {
 // delivery times change accordingly.
 TEST_F(FakeNetworkPipeTest, ChangingCapacityWithEmptyPipeTest) {
   FakeNetworkPipe::Config config;
-  config.queue_length = 20;
+  config.queue_length_packets = 20;
   config.link_capacity_kbps = 80;
   scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
   pipe->SetReceiver(receiver_.get());
@@ -255,7 +257,7 @@ TEST_F(FakeNetworkPipeTest, ChangingCapacityWithEmptyPipeTest) {
 // delivery times change accordingly.
 TEST_F(FakeNetworkPipeTest, ChangingCapacityWithPacketsInPipeTest) {
   FakeNetworkPipe::Config config;
-  config.queue_length = 20;
+  config.queue_length_packets = 20;
   config.link_capacity_kbps = 80;
   scoped_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(config));
   pipe->SetReceiver(receiver_.get());