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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 2291893002: Let Contraints Controll Mute/Unmute Audio Local Playback For Desktop Sharing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve Browser Test Issuex Created 4 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 3165 matching lines...) Expand 10 before | Expand all | Expand 10 after
3176 ASSERT_EQ(0U, devices.size()); 3176 ASSERT_EQ(0U, devices.size());
3177 } 3177 }
3178 } 3178 }
3179 3179
3180 void FinishAudioTest() { 3180 void FinishAudioTest() {
3181 content::MediaStreamRequest request(0, 0, 0, 3181 content::MediaStreamRequest request(0, 0, 0,
3182 request_url_.GetOrigin(), false, 3182 request_url_.GetOrigin(), false,
3183 content::MEDIA_DEVICE_ACCESS, 3183 content::MEDIA_DEVICE_ACCESS,
3184 std::string(), std::string(), 3184 std::string(), std::string(),
3185 content::MEDIA_DEVICE_AUDIO_CAPTURE, 3185 content::MEDIA_DEVICE_AUDIO_CAPTURE,
3186 content::MEDIA_NO_SERVICE); 3186 content::MEDIA_NO_SERVICE,
3187 false);
3187 // TODO(raymes): Test MEDIA_DEVICE_OPEN (Pepper) which grants both webcam 3188 // TODO(raymes): Test MEDIA_DEVICE_OPEN (Pepper) which grants both webcam
3188 // and microphone permissions at the same time. 3189 // and microphone permissions at the same time.
3189 MediaStreamDevicesController controller( 3190 MediaStreamDevicesController controller(
3190 browser()->tab_strip_model()->GetActiveWebContents(), request, 3191 browser()->tab_strip_model()->GetActiveWebContents(), request,
3191 base::Bind(&MediaStreamDevicesControllerBrowserTest::Accept, 3192 base::Bind(&MediaStreamDevicesControllerBrowserTest::Accept,
3192 base::Unretained(this))); 3193 base::Unretained(this)));
3193 if (controller.IsAskingForAudio()) 3194 if (controller.IsAskingForAudio())
3194 controller.PermissionGranted(); 3195 controller.PermissionGranted();
3195 3196
3196 base::MessageLoop::current()->QuitWhenIdle(); 3197 base::MessageLoop::current()->QuitWhenIdle();
3197 } 3198 }
3198 3199
3199 void FinishVideoTest() { 3200 void FinishVideoTest() {
3200 content::MediaStreamRequest request(0, 0, 0, 3201 content::MediaStreamRequest request(0, 0, 0,
3201 request_url_.GetOrigin(), false, 3202 request_url_.GetOrigin(), false,
3202 content::MEDIA_DEVICE_ACCESS, 3203 content::MEDIA_DEVICE_ACCESS,
3203 std::string(), 3204 std::string(),
3204 std::string(), 3205 std::string(),
3205 content::MEDIA_NO_SERVICE, 3206 content::MEDIA_NO_SERVICE,
3206 content::MEDIA_DEVICE_VIDEO_CAPTURE); 3207 content::MEDIA_DEVICE_VIDEO_CAPTURE,
3208 false);
3207 // TODO(raymes): Test MEDIA_DEVICE_OPEN (Pepper) which grants both webcam 3209 // TODO(raymes): Test MEDIA_DEVICE_OPEN (Pepper) which grants both webcam
3208 // and microphone permissions at the same time. 3210 // and microphone permissions at the same time.
3209 MediaStreamDevicesController controller( 3211 MediaStreamDevicesController controller(
3210 browser()->tab_strip_model()->GetActiveWebContents(), request, 3212 browser()->tab_strip_model()->GetActiveWebContents(), request,
3211 base::Bind(&MediaStreamDevicesControllerBrowserTest::Accept, 3213 base::Bind(&MediaStreamDevicesControllerBrowserTest::Accept,
3212 base::Unretained(this))); 3214 base::Unretained(this)));
3213 if (controller.IsAskingForVideo()) 3215 if (controller.IsAskingForVideo())
3214 controller.PermissionGranted(); 3216 controller.PermissionGranted();
3215 3217
3216 base::MessageLoop::current()->QuitWhenIdle(); 3218 base::MessageLoop::current()->QuitWhenIdle();
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
4374 4376
4375 SetEmptyPolicy(); 4377 SetEmptyPolicy();
4376 // Policy not set. 4378 // Policy not set.
4377 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); 4379 CheckSystemTimezoneAutomaticDetectionPolicyUnset();
4378 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); 4380 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false));
4379 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); 4381 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests());
4380 } 4382 }
4381 #endif // defined(OS_CHROMEOS) 4383 #endif // defined(OS_CHROMEOS)
4382 4384
4383 } // namespace policy 4385 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698