| OLD | NEW |
| 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/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| 11 #include "chrome/browser/infobars/infobar.h" | |
| 12 #include "chrome/browser/infobars/infobar_service.h" | 11 #include "chrome/browser/infobars/infobar_service.h" |
| 13 #include "chrome/browser/media/media_stream_infobar_delegate.h" | 12 #include "chrome/browser/media/media_stream_infobar_delegate.h" |
| 14 #include "chrome/browser/media/webrtc_browsertest_common.h" | 13 #include "chrome/browser/media/webrtc_browsertest_common.h" |
| 15 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/browser_tabstrip.h" | 15 #include "chrome/browser/ui/browser_tabstrip.h" |
| 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 16 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 18 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
| 18 #include "components/infobars/core/infobar.h" |
| 19 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
| 20 #include "content/public/test/browser_test_utils.h" | 20 #include "content/public/test/browser_test_utils.h" |
| 21 #include "net/test/embedded_test_server/embedded_test_server.h" | 21 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 22 | 22 |
| 23 const char WebRtcTestBase::kAudioVideoCallConstraints[] = | 23 const char WebRtcTestBase::kAudioVideoCallConstraints[] = |
| 24 "'{audio: true, video: true}'"; | 24 "'{audio: true, video: true}'"; |
| 25 const char WebRtcTestBase::kAudioVideoCallConstraintsQVGA[] = | 25 const char WebRtcTestBase::kAudioVideoCallConstraintsQVGA[] = |
| 26 "'{audio: true, video: {mandatory: {minWidth: 320, maxWidth: 320, " | 26 "'{audio: true, video: {mandatory: {minWidth: 320, maxWidth: 320, " |
| 27 " minHeight: 240, maxHeight: 240}}}'"; | 27 " minHeight: 240, maxHeight: 240}}}'"; |
| 28 const char WebRtcTestBase::kAudioVideoCallConstraints360p[] = | 28 const char WebRtcTestBase::kAudioVideoCallConstraints360p[] = |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 EXPECT_TRUE(StartsWithASCII(result, "ok-", true)); | 310 EXPECT_TRUE(StartsWithASCII(result, "ok-", true)); |
| 311 return result.substr(3); | 311 return result.substr(3); |
| 312 } | 312 } |
| 313 | 313 |
| 314 bool WebRtcTestBase::HasWebcamAvailableOnSystem( | 314 bool WebRtcTestBase::HasWebcamAvailableOnSystem( |
| 315 content::WebContents* tab_contents) const { | 315 content::WebContents* tab_contents) const { |
| 316 std::string result = | 316 std::string result = |
| 317 ExecuteJavascript("HasVideoSourceOnSystem();", tab_contents); | 317 ExecuteJavascript("HasVideoSourceOnSystem();", tab_contents); |
| 318 return result == "has-video-source"; | 318 return result == "has-video-source"; |
| 319 } | 319 } |
| OLD | NEW |