| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/media/webrtc/webrtc_browsertest_base.h" | 5 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 } | 561 } |
| 562 | 562 |
| 563 void WebRtcTestBase::CreateAndAddStreams(content::WebContents* tab, | 563 void WebRtcTestBase::CreateAndAddStreams(content::WebContents* tab, |
| 564 size_t count) const { | 564 size_t count) const { |
| 565 EXPECT_EQ( | 565 EXPECT_EQ( |
| 566 "ok-streams-created-and-added", | 566 "ok-streams-created-and-added", |
| 567 ExecuteJavascript( | 567 ExecuteJavascript( |
| 568 "createAndAddStreams(" + base::SizeTToString(count) + ")", tab)); | 568 "createAndAddStreams(" + base::SizeTToString(count) + ")", tab)); |
| 569 } | 569 } |
| 570 | 570 |
| 571 void WebRtcTestBase::VerifyRtpSenders( |
| 572 content::WebContents* tab, |
| 573 base::Optional<size_t> expected_num_tracks) const { |
| 574 std::string javascript = |
| 575 expected_num_tracks ? "verifyRtpSenders(" + |
| 576 base::SizeTToString(*expected_num_tracks) + ")" |
| 577 : "verifyRtpSenders()"; |
| 578 EXPECT_EQ("ok-senders-verified", ExecuteJavascript(javascript, tab)); |
| 579 } |
| 580 |
| 571 void WebRtcTestBase::VerifyRtpReceivers( | 581 void WebRtcTestBase::VerifyRtpReceivers( |
| 572 content::WebContents* tab, | 582 content::WebContents* tab, |
| 573 base::Optional<size_t> expected_num_tracks) const { | 583 base::Optional<size_t> expected_num_tracks) const { |
| 574 std::string javascript = | 584 std::string javascript = |
| 575 expected_num_tracks ? "verifyRtpReceivers(" + | 585 expected_num_tracks ? "verifyRtpReceivers(" + |
| 576 base::SizeTToString(*expected_num_tracks) + ")" | 586 base::SizeTToString(*expected_num_tracks) + ")" |
| 577 : "verifyRtpReceivers()"; | 587 : "verifyRtpReceivers()"; |
| 578 EXPECT_EQ("ok-receivers-verified", ExecuteJavascript(javascript, tab)); | 588 EXPECT_EQ("ok-receivers-verified", ExecuteJavascript(javascript, tab)); |
| 579 } | 589 } |
| OLD | NEW |