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

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

Issue 2186853002: WebRTCStats added, retaining type info when surfacing WebRTC stats into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed tommi's comments Created 4 years, 4 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_browsertest_base.h" 5 #include "chrome/browser/media/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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 453
454 bool WebRtcTestBase::OnWin8() const { 454 bool WebRtcTestBase::OnWin8() const {
455 #if defined(OS_WIN) 455 #if defined(OS_WIN)
456 return base::win::GetVersion() > base::win::VERSION_WIN7; 456 return base::win::GetVersion() > base::win::VERSION_WIN7;
457 #else 457 #else
458 return false; 458 return false;
459 #endif 459 #endif
460 } 460 }
461 461
462 void WebRtcTestBase::OpenDatabase(content::WebContents* tab) const { 462 void WebRtcTestBase::OpenDatabase(content::WebContents* tab) const {
463 std::string response = ExecuteJavascript("openDatabase()", tab); 463 EXPECT_EQ("ok-database-opened", ExecuteJavascript("openDatabase()", tab));
464 EXPECT_EQ("ok-database-opened", response) << "Failed to open database: "
465 << response;
466 } 464 }
467 465
468 void WebRtcTestBase::CloseDatabase(content::WebContents* tab) const { 466 void WebRtcTestBase::CloseDatabase(content::WebContents* tab) const {
469 std::string response = ExecuteJavascript("closeDatabase()", tab); 467 EXPECT_EQ("ok-database-closed", ExecuteJavascript("closeDatabase()", tab));
470 EXPECT_EQ("ok-database-closed", response) << "Failed to close database: "
471 << response;
472 } 468 }
473 469
474 void WebRtcTestBase::DeleteDatabase(content::WebContents* tab) const { 470 void WebRtcTestBase::DeleteDatabase(content::WebContents* tab) const {
475 std::string response = ExecuteJavascript("deleteDatabase()", tab); 471 EXPECT_EQ("ok-database-deleted", ExecuteJavascript("deleteDatabase()", tab));
476 EXPECT_EQ("ok-database-deleted", response) << "Failed to delete database: "
477 << response;
478 } 472 }
479 473
480 void WebRtcTestBase::GenerateAndCloneCertificate( 474 void WebRtcTestBase::GenerateAndCloneCertificate(
481 content::WebContents* tab, const std::string& keygen_algorithm) const { 475 content::WebContents* tab, const std::string& keygen_algorithm) const {
482 std::string javascript = base::StringPrintf( 476 std::string javascript = base::StringPrintf(
483 "generateAndCloneCertificate(%s)", keygen_algorithm.c_str()); 477 "generateAndCloneCertificate(%s)", keygen_algorithm.c_str());
484 std::string response = ExecuteJavascript(javascript, tab); 478 EXPECT_EQ("ok-generated-and-cloned", ExecuteJavascript(javascript, tab));
485 EXPECT_EQ("ok-generated-and-cloned", response) << "Failed to generate and "
486 "clone certificate: " << response;
487 } 479 }
480
481 void WebRtcTestBase::VerifyStatsGenerated(content::WebContents* tab) const {
482 EXPECT_EQ("ok-got-stats", ExecuteJavascript("verifyStatsGenerated()", tab));
483 }
OLDNEW
« no previous file with comments | « chrome/browser/media/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