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

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

Issue 2909943003: Removing useless Win7 checks + standardize its use (Closed)
Patch Set: Fix reversed conditionnal Created 3 years, 6 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 std::string WebRtcTestBase::GetStreamSize( 454 std::string WebRtcTestBase::GetStreamSize(
455 content::WebContents* tab_contents, 455 content::WebContents* tab_contents,
456 const std::string& video_element) const { 456 const std::string& video_element) const {
457 std::string javascript = 457 std::string javascript =
458 base::StringPrintf("getStreamSize('%s')", video_element.c_str()); 458 base::StringPrintf("getStreamSize('%s')", video_element.c_str());
459 std::string result = ExecuteJavascript(javascript, tab_contents); 459 std::string result = ExecuteJavascript(javascript, tab_contents);
460 EXPECT_TRUE(base::StartsWith(result, "ok-", base::CompareCase::SENSITIVE)); 460 EXPECT_TRUE(base::StartsWith(result, "ok-", base::CompareCase::SENSITIVE));
461 return result.substr(3); 461 return result.substr(3);
462 } 462 }
463 463
464 bool WebRtcTestBase::OnWin8() const { 464 bool WebRtcTestBase::OnWin8OrHigher() const {
465 #if defined(OS_WIN) 465 #if defined(OS_WIN)
466 return base::win::GetVersion() > base::win::VERSION_WIN7; 466 return base::win::GetVersion() >= base::win::VERSION_WIN8;
467 #else 467 #else
468 return false; 468 return false;
469 #endif 469 #endif
470 } 470 }
471 471
472 void WebRtcTestBase::OpenDatabase(content::WebContents* tab) const { 472 void WebRtcTestBase::OpenDatabase(content::WebContents* tab) const {
473 EXPECT_EQ("ok-database-opened", ExecuteJavascript("openDatabase()", tab)); 473 EXPECT_EQ("ok-database-opened", ExecuteJavascript("openDatabase()", tab));
474 } 474 }
475 475
476 void WebRtcTestBase::CloseDatabase(content::WebContents* tab) const { 476 void WebRtcTestBase::CloseDatabase(content::WebContents* tab) const {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 580
581 void WebRtcTestBase::VerifyRtpReceivers( 581 void WebRtcTestBase::VerifyRtpReceivers(
582 content::WebContents* tab, 582 content::WebContents* tab,
583 base::Optional<size_t> expected_num_tracks) const { 583 base::Optional<size_t> expected_num_tracks) const {
584 std::string javascript = 584 std::string javascript =
585 expected_num_tracks ? "verifyRtpReceivers(" + 585 expected_num_tracks ? "verifyRtpReceivers(" +
586 base::SizeTToString(*expected_num_tracks) + ")" 586 base::SizeTToString(*expected_num_tracks) + ")"
587 : "verifyRtpReceivers()"; 587 : "verifyRtpReceivers()";
588 EXPECT_EQ("ok-receivers-verified", ExecuteJavascript(javascript, tab)); 588 EXPECT_EQ("ok-receivers-verified", ExecuteJavascript(javascript, tab));
589 } 589 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698