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

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

Issue 1409163006: Migrating tests to use EmbeddedTestServer (/chrome/browser misc) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/media/webrtc_browsertest_base.h" 6 #include "chrome/browser/media/webrtc_browsertest_base.h"
7 #include "chrome/browser/media/webrtc_browsertest_common.h" 7 #include "chrome/browser/media/webrtc_browsertest_common.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_tabstrip.h" 9 #include "chrome/browser/ui/browser_tabstrip.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 #else 75 #else
76 return false; 76 return false;
77 #endif 77 #endif
78 } 78 }
79 }; 79 };
80 80
81 // This test is manual because the test results can vary heavily depending on 81 // This test is manual because the test results can vary heavily depending on
82 // which webcam or drivers you have on the system. 82 // which webcam or drivers you have on the system.
83 IN_PROC_BROWSER_TEST_P(WebRtcWebcamBrowserTest, 83 IN_PROC_BROWSER_TEST_P(WebRtcWebcamBrowserTest,
84 MANUAL_TestAcquiringAndReacquiringWebcam) { 84 MANUAL_TestAcquiringAndReacquiringWebcam) {
85 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 85 ASSERT_TRUE(embedded_test_server()->Start());
86 GURL url(embedded_test_server()->GetURL(kMainWebrtcTestHtmlPage)); 86 GURL url(embedded_test_server()->GetURL(kMainWebrtcTestHtmlPage));
87 ui_test_utils::NavigateToURL(browser(), url); 87 ui_test_utils::NavigateToURL(browser(), url);
88 content::WebContents* tab = 88 content::WebContents* tab =
89 browser()->tab_strip_model()->GetActiveWebContents(); 89 browser()->tab_strip_model()->GetActiveWebContents();
90 90
91 if (!HasWebcamAvailableOnSystem(tab)) { 91 if (!HasWebcamAvailableOnSystem(tab)) {
92 LOG(INFO) << "No webcam found on bot: skipping..."; 92 LOG(INFO) << "No webcam found on bot: skipping...";
93 return; 93 return;
94 } 94 }
95 95
(...skipping 15 matching lines...) Expand all
111 111
112 EXPECT_EQ("1280x720", 112 EXPECT_EQ("1280x720",
113 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints720p)); 113 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints720p));
114 EXPECT_EQ("1920x1080", 114 EXPECT_EQ("1920x1080",
115 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints1080p)); 115 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints1080p));
116 } 116 }
117 117
118 INSTANTIATE_TEST_CASE_P(WebRtcWebcamBrowserTests, 118 INSTANTIATE_TEST_CASE_P(WebRtcWebcamBrowserTests,
119 WebRtcWebcamBrowserTest, 119 WebRtcWebcamBrowserTest,
120 testing::ValuesIn(kTestConfigFlags)); 120 testing::ValuesIn(kTestConfigFlags));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698