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

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

Issue 1286363002: Switch media stream permissions to use IsOriginSecure() instead of SchemeIsSecure(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 5 years, 4 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 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 protected: 51 protected:
52 void SetUpInProcessBrowserTestFixture() override { 52 void SetUpInProcessBrowserTestFixture() override {
53 DetectErrorsInJavaScript(); // Look for errors in our rather complex js. 53 DetectErrorsInJavaScript(); // Look for errors in our rather complex js.
54 } 54 }
55 55
56 std::string GetUserMediaAndGetStreamSize(content::WebContents* tab, 56 std::string GetUserMediaAndGetStreamSize(content::WebContents* tab,
57 const std::string& constraints) { 57 const std::string& constraints) {
58 std::string actual_stream_size; 58 std::string actual_stream_size;
59 if (GetUserMediaWithSpecificConstraintsAndAccept(tab, constraints)) { 59 if (GetUserMediaWithSpecificConstraintsAndAcceptIfPrompted(tab, constraints) ) {
tommi (sloooow) - chröme 2015/08/13 13:03:17 is this still within 80? (just checking)
lgarron 2015/08/13 20:30:01 Good catch! It seems I forgot to run `git cl forma
60 StartDetectingVideo(tab, "local-view"); 60 StartDetectingVideo(tab, "local-view");
61 if (WaitForVideoToPlay(tab)) 61 if (WaitForVideoToPlay(tab))
62 actual_stream_size = GetStreamSize(tab, "local-view"); 62 actual_stream_size = GetStreamSize(tab, "local-view");
63 CloseLastLocalStream(tab); 63 CloseLastLocalStream(tab);
64 } 64 }
65 return actual_stream_size; 65 return actual_stream_size;
66 } 66 }
67 67
68 bool IsOnQtKit() const { 68 bool IsOnQtKit() const {
69 #if defined(OS_MACOSX) 69 #if defined(OS_MACOSX)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 EXPECT_EQ("1280x720", 106 EXPECT_EQ("1280x720",
107 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints720p)); 107 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints720p));
108 EXPECT_EQ("1920x1080", 108 EXPECT_EQ("1920x1080",
109 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints1080p)); 109 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints1080p));
110 } 110 }
111 111
112 INSTANTIATE_TEST_CASE_P(WebRtcWebcamBrowserTests, 112 INSTANTIATE_TEST_CASE_P(WebRtcWebcamBrowserTests,
113 WebRtcWebcamBrowserTest, 113 WebRtcWebcamBrowserTest,
114 testing::ValuesIn(kTestConfigFlags)); 114 testing::ValuesIn(kTestConfigFlags));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698