Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: chrome/browser/media/webrtc/webrtc_browsertest_base.cc

Issue 2828563002: RTCCertificate.getFingerprints added (exposed to the web) (Closed)
Patch Set: Changed fingerprints to getFingerprints() as per pull request Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 content::WebContents* to_tab) const { 420 content::WebContents* to_tab) const {
421 std::string local_offer = CreateLocalOffer(from_tab); 421 std::string local_offer = CreateLocalOffer(from_tab);
422 std::string answer = CreateAnswer(local_offer, to_tab); 422 std::string answer = CreateAnswer(local_offer, to_tab);
423 ReceiveAnswer(answer, from_tab); 423 ReceiveAnswer(answer, from_tab);
424 424
425 // Send all ICE candidates (wait for gathering to finish if necessary). 425 // Send all ICE candidates (wait for gathering to finish if necessary).
426 GatherAndSendIceCandidates(to_tab, from_tab); 426 GatherAndSendIceCandidates(to_tab, from_tab);
427 GatherAndSendIceCandidates(from_tab, to_tab); 427 GatherAndSendIceCandidates(from_tab, to_tab);
428 } 428 }
429 429
430 void WebRtcTestBase::VerifyLocalDescriptionContainsCertificate(
431 content::WebContents* tab,
432 const std::string& certificate) const {
433 std::string javascript = base::StringPrintf(
434 "verifyLocalDescriptionContainsCertificate(%s)", certificate.c_str());
435 EXPECT_EQ("ok-verified", ExecuteJavascript(javascript, tab));
436 }
437
430 void WebRtcTestBase::HangUp(content::WebContents* from_tab) const { 438 void WebRtcTestBase::HangUp(content::WebContents* from_tab) const {
431 EXPECT_EQ("ok-call-hung-up", ExecuteJavascript("hangUp()", from_tab)); 439 EXPECT_EQ("ok-call-hung-up", ExecuteJavascript("hangUp()", from_tab));
432 } 440 }
433 441
434 void WebRtcTestBase::DetectErrorsInJavaScript() { 442 void WebRtcTestBase::DetectErrorsInJavaScript() {
435 detect_errors_in_javascript_ = true; 443 detect_errors_in_javascript_ = true;
436 } 444 }
437 445
438 void WebRtcTestBase::StartDetectingVideo( 446 void WebRtcTestBase::StartDetectingVideo(
439 content::WebContents* tab_contents, 447 content::WebContents* tab_contents,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 578
571 void WebRtcTestBase::VerifyRtpReceivers( 579 void WebRtcTestBase::VerifyRtpReceivers(
572 content::WebContents* tab, 580 content::WebContents* tab,
573 base::Optional<size_t> expected_num_tracks) const { 581 base::Optional<size_t> expected_num_tracks) const {
574 std::string javascript = 582 std::string javascript =
575 expected_num_tracks ? "verifyRtpReceivers(" + 583 expected_num_tracks ? "verifyRtpReceivers(" +
576 base::SizeTToString(*expected_num_tracks) + ")" 584 base::SizeTToString(*expected_num_tracks) + ")"
577 : "verifyRtpReceivers()"; 585 : "verifyRtpReceivers()";
578 EXPECT_EQ("ok-receivers-verified", ExecuteJavascript(javascript, tab)); 586 EXPECT_EQ("ok-receivers-verified", ExecuteJavascript(javascript, tab));
579 } 587 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698