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

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

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 years, 5 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 "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/media/webrtc_browsertest_common.h" 10 #include "chrome/browser/media/webrtc_browsertest_common.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 EXPECT_TRUE(is_video_playing); 285 EXPECT_TRUE(is_video_playing);
286 return is_video_playing; 286 return is_video_playing;
287 } 287 }
288 288
289 std::string WebRtcTestBase::GetStreamSize( 289 std::string WebRtcTestBase::GetStreamSize(
290 content::WebContents* tab_contents, 290 content::WebContents* tab_contents,
291 const std::string& video_element) const { 291 const std::string& video_element) const {
292 std::string javascript = 292 std::string javascript =
293 base::StringPrintf("getStreamSize('%s')", video_element.c_str()); 293 base::StringPrintf("getStreamSize('%s')", video_element.c_str());
294 std::string result = ExecuteJavascript(javascript, tab_contents); 294 std::string result = ExecuteJavascript(javascript, tab_contents);
295 EXPECT_TRUE(base::StartsWithASCII(result, "ok-", true)); 295 EXPECT_TRUE(base::StartsWith(result, "ok-", base::CompareCase::SENSITIVE));
296 return result.substr(3); 296 return result.substr(3);
297 } 297 }
298 298
299 bool WebRtcTestBase::HasWebcamAvailableOnSystem( 299 bool WebRtcTestBase::HasWebcamAvailableOnSystem(
300 content::WebContents* tab_contents) const { 300 content::WebContents* tab_contents) const {
301 std::string result = 301 std::string result =
302 ExecuteJavascript("hasVideoInputDeviceOnSystem();", tab_contents); 302 ExecuteJavascript("hasVideoInputDeviceOnSystem();", tab_contents);
303 return result == "has-video-input-device"; 303 return result == "has-video-input-device";
304 } 304 }
305 305
306 bool WebRtcTestBase::OnWinXp() const { 306 bool WebRtcTestBase::OnWinXp() const {
307 #if defined(OS_WIN) 307 #if defined(OS_WIN)
308 return base::win::GetVersion() <= base::win::VERSION_XP; 308 return base::win::GetVersion() <= base::win::VERSION_XP;
309 #else 309 #else
310 return false; 310 return false;
311 #endif 311 #endif
312 } 312 }
313 313
314 bool WebRtcTestBase::OnWin8() const { 314 bool WebRtcTestBase::OnWin8() const {
315 #if defined(OS_WIN) 315 #if defined(OS_WIN)
316 return base::win::GetVersion() > base::win::VERSION_WIN7; 316 return base::win::GetVersion() > base::win::VERSION_WIN7;
317 #else 317 #else
318 return false; 318 return false;
319 #endif 319 #endif
320 } 320 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698