| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. | 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 stats.host_stats.capture_delay + | 615 stats.host_stats.capture_delay + |
| 616 stats.host_stats.capture_overhead_delay + | 616 stats.host_stats.capture_overhead_delay + |
| 617 stats.host_stats.encode_delay + | 617 stats.host_stats.encode_delay + |
| 618 stats.host_stats.send_pending_delay, | 618 stats.host_stats.send_pending_delay, |
| 619 stats.client_stats.time_received); | 619 stats.client_stats.time_received); |
| 620 EXPECT_LE(stats.client_stats.time_received, stats.client_stats.time_decoded); | 620 EXPECT_LE(stats.client_stats.time_received, stats.client_stats.time_decoded); |
| 621 EXPECT_LE(stats.client_stats.time_decoded, stats.client_stats.time_rendered); | 621 EXPECT_LE(stats.client_stats.time_decoded, stats.client_stats.time_rendered); |
| 622 EXPECT_LE(stats.client_stats.time_rendered, finish_time); | 622 EXPECT_LE(stats.client_stats.time_rendered, finish_time); |
| 623 } | 623 } |
| 624 | 624 |
| 625 // Disabling due to failures after WebRTC roll http://crbug.com/685910 | 625 // Flaky on Linux/ChromeOS, crbug.com/685910. |
| 626 // Note: Apparently it's not possible to use the common MAYBE_ prefix with |
| 627 // TEST_P, so ifdef it out completely. |
| 628 #if !defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 626 TEST_P(ConnectionTest, Audio) { | 629 TEST_P(ConnectionTest, Audio) { |
| 627 Connect(); | 630 Connect(); |
| 628 | 631 |
| 629 std::unique_ptr<AudioStream> audio_stream = | 632 std::unique_ptr<AudioStream> audio_stream = |
| 630 host_connection_->StartAudioStream(base::MakeUnique<TestAudioSource>()); | 633 host_connection_->StartAudioStream(base::MakeUnique<TestAudioSource>()); |
| 631 | 634 |
| 632 // Wait for 1 second worth of audio samples. | 635 // Wait for 1 second worth of audio samples. |
| 633 client_audio_player_.WaitForSamples(kAudioSampleRate * 2); | 636 client_audio_player_.WaitForSamples(kAudioSampleRate * 2); |
| 634 client_audio_player_.Verify(); | 637 client_audio_player_.Verify(); |
| 635 } | 638 } |
| 639 #endif |
| 636 | 640 |
| 637 TEST_P(ConnectionTest, FirstCaptureFailed) { | 641 TEST_P(ConnectionTest, FirstCaptureFailed) { |
| 638 Connect(); | 642 Connect(); |
| 639 | 643 |
| 640 base::TimeTicks event_timestamp = base::TimeTicks::FromInternalValue(42); | 644 base::TimeTicks event_timestamp = base::TimeTicks::FromInternalValue(42); |
| 641 | 645 |
| 642 scoped_refptr<InputEventTimestampsSourceImpl> input_event_timestamps_source = | 646 scoped_refptr<InputEventTimestampsSourceImpl> input_event_timestamps_source = |
| 643 new InputEventTimestampsSourceImpl(); | 647 new InputEventTimestampsSourceImpl(); |
| 644 input_event_timestamps_source->OnEventReceived( | 648 input_event_timestamps_source->OnEventReceived( |
| 645 InputEventTimestamps{event_timestamp, base::TimeTicks::Now()}); | 649 InputEventTimestamps{event_timestamp, base::TimeTicks::Now()}); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 673 auto capturer = base::MakeUnique<TestScreenCapturer>(); | 677 auto capturer = base::MakeUnique<TestScreenCapturer>(); |
| 674 capturer->FailNthFrame(1); | 678 capturer->FailNthFrame(1); |
| 675 auto video_stream = host_connection_->StartVideoStream(std::move(capturer)); | 679 auto video_stream = host_connection_->StartVideoStream(std::move(capturer)); |
| 676 | 680 |
| 677 WaitNextVideoFrame(); | 681 WaitNextVideoFrame(); |
| 678 WaitNextVideoFrame(); | 682 WaitNextVideoFrame(); |
| 679 } | 683 } |
| 680 | 684 |
| 681 } // namespace protocol | 685 } // namespace protocol |
| 682 } // namespace remoting | 686 } // namespace remoting |
| OLD | NEW |