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

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

Issue 2528253002: Revert of WebRtcBrowserTest: Include all stats in getStats. (Closed)
Patch Set: Created 4 years 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 "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 content::WebContents* from_tab, 397 content::WebContents* from_tab,
398 content::WebContents* to_tab) const { 398 content::WebContents* to_tab) const {
399 std::string ice_candidates = 399 std::string ice_candidates =
400 ExecuteJavascript("getAllIceCandidates()", from_tab); 400 ExecuteJavascript("getAllIceCandidates()", from_tab);
401 401
402 EXPECT_EQ("ok-received-candidates", ExecuteJavascript( 402 EXPECT_EQ("ok-received-candidates", ExecuteJavascript(
403 base::StringPrintf("receiveIceCandidates('%s')", ice_candidates.c_str()), 403 base::StringPrintf("receiveIceCandidates('%s')", ice_candidates.c_str()),
404 to_tab)); 404 to_tab));
405 } 405 }
406 406
407 void WebRtcTestBase::CreateDataChannel(content::WebContents* tab,
408 const std::string& label) {
409 EXPECT_EQ("ok-created",
410 ExecuteJavascript("createDataChannel('" + label + "')", tab));
411 }
412
413 void WebRtcTestBase::NegotiateCall(content::WebContents* from_tab, 407 void WebRtcTestBase::NegotiateCall(content::WebContents* from_tab,
414 content::WebContents* to_tab) const { 408 content::WebContents* to_tab) const {
415 std::string local_offer = CreateLocalOffer(from_tab); 409 std::string local_offer = CreateLocalOffer(from_tab);
416 std::string answer = CreateAnswer(local_offer, to_tab); 410 std::string answer = CreateAnswer(local_offer, to_tab);
417 ReceiveAnswer(answer, from_tab); 411 ReceiveAnswer(answer, from_tab);
418 412
419 // Send all ICE candidates (wait for gathering to finish if necessary). 413 // Send all ICE candidates (wait for gathering to finish if necessary).
420 GatherAndSendIceCandidates(to_tab, from_tab); 414 GatherAndSendIceCandidates(to_tab, from_tab);
421 GatherAndSendIceCandidates(from_tab, to_tab); 415 GatherAndSendIceCandidates(from_tab, to_tab);
422 } 416 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 void WebRtcTestBase::SetDefaultVideoCodec( 497 void WebRtcTestBase::SetDefaultVideoCodec(
504 content::WebContents* tab, 498 content::WebContents* tab,
505 const std::string& video_codec) const { 499 const std::string& video_codec) const {
506 EXPECT_EQ("ok-forced", 500 EXPECT_EQ("ok-forced",
507 ExecuteJavascript("forceVideoCodec('" + video_codec + "')", tab)); 501 ExecuteJavascript("forceVideoCodec('" + video_codec + "')", tab));
508 } 502 }
509 503
510 void WebRtcTestBase::EnableOpusDtx(content::WebContents* tab) const { 504 void WebRtcTestBase::EnableOpusDtx(content::WebContents* tab) const {
511 EXPECT_EQ("ok-forced", ExecuteJavascript("forceOpusDtx()", tab)); 505 EXPECT_EQ("ok-forced", ExecuteJavascript("forceOpusDtx()", tab));
512 } 506 }
OLDNEW
« no previous file with comments | « chrome/browser/media/webrtc/webrtc_browsertest_base.h ('k') | chrome/test/data/webrtc/peerconnection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698