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

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

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 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_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/infobars/infobar_responder.h" 10 #include "chrome/browser/infobars/infobar_responder.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 EXPECT_TRUE(is_video_playing); 315 EXPECT_TRUE(is_video_playing);
316 return is_video_playing; 316 return is_video_playing;
317 } 317 }
318 318
319 std::string WebRtcTestBase::GetStreamSize( 319 std::string WebRtcTestBase::GetStreamSize(
320 content::WebContents* tab_contents, 320 content::WebContents* tab_contents,
321 const std::string& video_element) const { 321 const std::string& video_element) const {
322 std::string javascript = 322 std::string javascript =
323 base::StringPrintf("getStreamSize('%s')", video_element.c_str()); 323 base::StringPrintf("getStreamSize('%s')", video_element.c_str());
324 std::string result = ExecuteJavascript(javascript, tab_contents); 324 std::string result = ExecuteJavascript(javascript, tab_contents);
325 EXPECT_TRUE(StartsWithASCII(result, "ok-", true)); 325 EXPECT_TRUE(base::StartsWithASCII(result, "ok-", true));
326 return result.substr(3); 326 return result.substr(3);
327 } 327 }
328 328
329 bool WebRtcTestBase::HasWebcamAvailableOnSystem( 329 bool WebRtcTestBase::HasWebcamAvailableOnSystem(
330 content::WebContents* tab_contents) const { 330 content::WebContents* tab_contents) const {
331 std::string result = 331 std::string result =
332 ExecuteJavascript("hasVideoInputDeviceOnSystem();", tab_contents); 332 ExecuteJavascript("hasVideoInputDeviceOnSystem();", tab_contents);
333 return result == "has-video-input-device"; 333 return result == "has-video-input-device";
334 } 334 }
335 335
336 bool WebRtcTestBase::OnWinXp() const { 336 bool WebRtcTestBase::OnWinXp() const {
337 #if defined(OS_WIN) 337 #if defined(OS_WIN)
338 return base::win::GetVersion() <= base::win::VERSION_XP; 338 return base::win::GetVersion() <= base::win::VERSION_XP;
339 #else 339 #else
340 return false; 340 return false;
341 #endif 341 #endif
342 } 342 }
343 343
344 bool WebRtcTestBase::OnWin8() const { 344 bool WebRtcTestBase::OnWin8() const {
345 #if defined(OS_WIN) 345 #if defined(OS_WIN)
346 return base::win::GetVersion() > base::win::VERSION_WIN7; 346 return base::win::GetVersion() > base::win::VERSION_WIN7;
347 #else 347 #else
348 return false; 348 return false;
349 #endif 349 #endif
350 } 350 }
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_source_helper.cc ('k') | chrome/browser/media/webrtc_browsertest_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698