OLD | NEW |
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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "base/prefs/pref_service.h" | |
10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
11 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
12 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 11 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
13 #include "chrome/browser/media/media_stream_capture_indicator.h" | 12 #include "chrome/browser/media/media_stream_capture_indicator.h" |
14 #include "chrome/browser/media/media_stream_device_permissions.h" | 13 #include "chrome/browser/media/media_stream_device_permissions.h" |
15 #include "chrome/browser/media/media_stream_devices_controller.h" | 14 #include "chrome/browser/media/media_stream_devices_controller.h" |
16 #include "chrome/browser/media/webrtc_browsertest_base.h" | 15 #include "chrome/browser/media/webrtc_browsertest_base.h" |
17 #include "chrome/browser/permissions/permission_context_base.h" | 16 #include "chrome/browser/permissions/permission_context_base.h" |
18 #include "chrome/browser/permissions/permission_util.h" | 17 #include "chrome/browser/permissions/permission_util.h" |
19 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
21 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 20 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
22 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
23 #include "chrome/test/base/ui_test_utils.h" | 22 #include "chrome/test/base/ui_test_utils.h" |
24 #include "components/content_settings/core/browser/host_content_settings_map.h" | 23 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 24 #include "components/prefs/pref_service.h" |
25 #include "components/variations/variations_associated_data.h" | 25 #include "components/variations/variations_associated_data.h" |
26 #include "content/public/common/media_stream_request.h" | 26 #include "content/public/common/media_stream_request.h" |
27 #include "content/public/test/mock_render_process_host.h" | 27 #include "content/public/test/mock_render_process_host.h" |
28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 // Causes the controller to update the TabSpecificContentSettings associated | 32 // Causes the controller to update the TabSpecificContentSettings associated |
33 // with the same WebContents with the current permissions. This should be the | 33 // with the same WebContents with the current permissions. This should be the |
34 // last change made to the controller in the test. | 34 // last change made to the controller in the test. |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 MediaStreamDevicesController controller( | 742 MediaStreamDevicesController controller( |
743 GetWebContents(), CreateRequest(example_audio_id(), example_video_id()), | 743 GetWebContents(), CreateRequest(example_audio_id(), example_video_id()), |
744 base::Bind(&MediaStreamDevicesControllerTest::OnMediaStreamResponse, | 744 base::Bind(&MediaStreamDevicesControllerTest::OnMediaStreamResponse, |
745 this)); | 745 this)); |
746 | 746 |
747 EXPECT_FALSE(controller.IsAllowedForAudio()); | 747 EXPECT_FALSE(controller.IsAllowedForAudio()); |
748 EXPECT_FALSE(controller.IsAllowedForVideo()); | 748 EXPECT_FALSE(controller.IsAllowedForVideo()); |
749 EXPECT_FALSE(controller.IsAskingForAudio()); | 749 EXPECT_FALSE(controller.IsAskingForAudio()); |
750 EXPECT_FALSE(controller.IsAskingForVideo()); | 750 EXPECT_FALSE(controller.IsAskingForVideo()); |
751 } | 751 } |
OLD | NEW |