OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <map> | 5 #include <map> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #if defined(OS_MACOSX) | 10 #if defined(OS_MACOSX) |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 | 539 |
540 ASSERT_EQ(1, | 540 ASSERT_EQ(1, |
541 (HasFlag(k24fps) ? 1 : 0) + | 541 (HasFlag(k24fps) ? 1 : 0) + |
542 (HasFlag(k30fps) ? 1 : 0) + | 542 (HasFlag(k30fps) ? 1 : 0) + |
543 (HasFlag(k60fps) ? 1 : 0)); | 543 (HasFlag(k60fps) ? 1 : 0)); |
544 | 544 |
545 net::IPEndPoint receiver_end_point = GetFreeLocalPort(); | 545 net::IPEndPoint receiver_end_point = GetFreeLocalPort(); |
546 | 546 |
547 // Start the in-process receiver that examines audio/video for the expected | 547 // Start the in-process receiver that examines audio/video for the expected |
548 // test patterns. | 548 // test patterns. |
549 media::cast::CastLoggingConfig logging_config = | |
550 media::cast::GetDefaultCastReceiverLoggingConfig(); | |
551 scoped_refptr<media::cast::StandaloneCastEnvironment> cast_environment( | 549 scoped_refptr<media::cast::StandaloneCastEnvironment> cast_environment( |
552 new media::cast::StandaloneCastEnvironment(logging_config)); | 550 new media::cast::StandaloneCastEnvironment); |
553 TestPatternReceiver* const receiver = | 551 TestPatternReceiver* const receiver = |
554 new TestPatternReceiver(cast_environment, receiver_end_point); | 552 new TestPatternReceiver(cast_environment, receiver_end_point); |
555 receiver->Start(); | 553 receiver->Start(); |
556 | 554 |
557 std::string json_events; | 555 std::string json_events; |
558 ASSERT_TRUE(tracing::BeginTracing("test_fps,mirroring,cast_perf_test")); | 556 ASSERT_TRUE(tracing::BeginTracing("test_fps,mirroring,cast_perf_test")); |
559 const std::string page_url = base::StringPrintf( | 557 const std::string page_url = base::StringPrintf( |
560 "performance%d.html?port=%d", | 558 "performance%d.html?port=%d", |
561 getfps(), | 559 getfps(), |
562 receiver_end_point.port()); | 560 receiver_end_point.port()); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 // Note: First argument is optional and intentionally left blank. | 611 // Note: First argument is optional and intentionally left blank. |
614 // (it's a prefix for the generated test cases) | 612 // (it's a prefix for the generated test cases) |
615 INSTANTIATE_TEST_CASE_P( | 613 INSTANTIATE_TEST_CASE_P( |
616 , | 614 , |
617 CastV2PerformanceTest, | 615 CastV2PerformanceTest, |
618 testing::Values( | 616 testing::Values( |
619 kUseGpu | k24fps, | 617 kUseGpu | k24fps, |
620 kUseGpu | k30fps, | 618 kUseGpu | k30fps, |
621 kUseGpu | k60fps, | 619 kUseGpu | k60fps, |
622 kDisableVsync | k24fps | kUseGpu)); | 620 kDisableVsync | k24fps | kUseGpu)); |
OLD | NEW |