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

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

Issue 2723983004: Add PermissionManager::GetPermissionStatusForFrame function (Closed)
Patch Set: Add PermissionManager::GetPermissionStatusForFrame function Created 3 years, 9 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 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" 8 #include "base/macros.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, 136 CONTENT_SETTINGS_TYPE_MIDI_SYSEX,
137 std::string())); 137 std::string()));
138 EXPECT_EQ(CONTENT_SETTING_ASK, 138 EXPECT_EQ(CONTENT_SETTING_ASK,
139 HostContentSettingsMapFactory::GetForProfile(profile()) 139 HostContentSettingsMapFactory::GetForProfile(profile())
140 ->GetContentSetting(insecure_url.GetOrigin(), 140 ->GetContentSetting(insecure_url.GetOrigin(),
141 secure_url.GetOrigin(), 141 secure_url.GetOrigin(),
142 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, 142 CONTENT_SETTINGS_TYPE_MIDI_SYSEX,
143 std::string())); 143 std::string()));
144 144
145 EXPECT_EQ(CONTENT_SETTING_BLOCK, 145 EXPECT_EQ(CONTENT_SETTING_BLOCK,
146 permission_context.GetPermissionStatus(insecure_url, insecure_url) 146 permission_context
147 .GetPermissionStatus(nullptr /* render_frame_host */,
148 insecure_url, insecure_url)
147 .content_setting); 149 .content_setting);
148 150
149 EXPECT_EQ(CONTENT_SETTING_BLOCK, 151 EXPECT_EQ(CONTENT_SETTING_BLOCK,
150 permission_context.GetPermissionStatus(insecure_url, secure_url) 152 permission_context
153 .GetPermissionStatus(nullptr /* render_frame_host */,
154 insecure_url, secure_url)
151 .content_setting); 155 .content_setting);
152 } 156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698