OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/midi_permission_context.h" | 5 #include "chrome/browser/media/midi_permission_context.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" |
| 9 #include "build/build_config.h" |
8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
9 #include "chrome/browser/permissions/permission_request_id.h" | 11 #include "chrome/browser/permissions/permission_request_id.h" |
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 12 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
11 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
12 #include "components/content_settings/core/browser/host_content_settings_map.h" | 14 #include "components/content_settings/core/browser/host_content_settings_map.h" |
13 #include "components/content_settings/core/common/content_settings.h" | 15 #include "components/content_settings/core/common/content_settings.h" |
14 #include "components/content_settings/core/common/content_settings_types.h" | 16 #include "components/content_settings/core/common/content_settings_types.h" |
15 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
16 #include "content/public/test/mock_render_process_host.h" | 18 #include "content/public/test/mock_render_process_host.h" |
17 #include "content/public/test/web_contents_tester.h" | 19 #include "content/public/test/web_contents_tester.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 ->GetContentSetting(insecure_url.GetOrigin(), | 140 ->GetContentSetting(insecure_url.GetOrigin(), |
139 secure_url.GetOrigin(), | 141 secure_url.GetOrigin(), |
140 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, | 142 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, |
141 std::string())); | 143 std::string())); |
142 | 144 |
143 EXPECT_EQ(CONTENT_SETTING_BLOCK, permission_context.GetPermissionStatus( | 145 EXPECT_EQ(CONTENT_SETTING_BLOCK, permission_context.GetPermissionStatus( |
144 insecure_url, insecure_url)); | 146 insecure_url, insecure_url)); |
145 EXPECT_EQ(CONTENT_SETTING_BLOCK, permission_context.GetPermissionStatus( | 147 EXPECT_EQ(CONTENT_SETTING_BLOCK, permission_context.GetPermissionStatus( |
146 insecure_url, secure_url)); | 148 insecure_url, secure_url)); |
147 } | 149 } |
OLD | NEW |