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 "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 EXPECT_EQ("ok-database-deleted", ExecuteJavascript("deleteDatabase()", tab)); | 448 EXPECT_EQ("ok-database-deleted", ExecuteJavascript("deleteDatabase()", tab)); |
449 } | 449 } |
450 | 450 |
451 void WebRtcTestBase::GenerateAndCloneCertificate( | 451 void WebRtcTestBase::GenerateAndCloneCertificate( |
452 content::WebContents* tab, const std::string& keygen_algorithm) const { | 452 content::WebContents* tab, const std::string& keygen_algorithm) const { |
453 std::string javascript = base::StringPrintf( | 453 std::string javascript = base::StringPrintf( |
454 "generateAndCloneCertificate(%s)", keygen_algorithm.c_str()); | 454 "generateAndCloneCertificate(%s)", keygen_algorithm.c_str()); |
455 EXPECT_EQ("ok-generated-and-cloned", ExecuteJavascript(javascript, tab)); | 455 EXPECT_EQ("ok-generated-and-cloned", ExecuteJavascript(javascript, tab)); |
456 } | 456 } |
457 | 457 |
458 void WebRtcTestBase::VerifyStatsGenerated(content::WebContents* tab) const { | 458 void WebRtcTestBase::VerifyStatsGeneratedCallback( |
| 459 content::WebContents* tab) const { |
459 EXPECT_EQ("ok-got-stats", ExecuteJavascript("verifyStatsGenerated()", tab)); | 460 EXPECT_EQ("ok-got-stats", ExecuteJavascript("verifyStatsGenerated()", tab)); |
460 } | 461 } |
461 | 462 |
| 463 void WebRtcTestBase::VerifyStatsGeneratedPromise( |
| 464 content::WebContents* tab) const { |
| 465 EXPECT_EQ("ok-got-stats", |
| 466 ExecuteJavascript("verifyStatsGeneratedPromise()", tab)); |
| 467 } |
| 468 |
462 void WebRtcTestBase::SetDefaultVideoCodec( | 469 void WebRtcTestBase::SetDefaultVideoCodec( |
463 content::WebContents* tab, | 470 content::WebContents* tab, |
464 const std::string& video_codec) const { | 471 const std::string& video_codec) const { |
465 EXPECT_EQ("ok-forced", | 472 EXPECT_EQ("ok-forced", |
466 ExecuteJavascript("forceVideoCodec('" + video_codec + "')", tab)); | 473 ExecuteJavascript("forceVideoCodec('" + video_codec + "')", tab)); |
467 } | 474 } |
468 | 475 |
469 void WebRtcTestBase::EnableOpusDtx(content::WebContents* tab) const { | 476 void WebRtcTestBase::EnableOpusDtx(content::WebContents* tab) const { |
470 EXPECT_EQ("ok-forced", ExecuteJavascript("forceOpusDtx()", tab)); | 477 EXPECT_EQ("ok-forced", ExecuteJavascript("forceOpusDtx()", tab)); |
471 } | 478 } |
OLD | NEW |