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

Side by Side Diff: chrome/browser/storage/durable_storage_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
« no previous file with comments | « chrome/browser/storage/durable_storage_permission_context.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/storage/durable_storage_permission_context.h" 5 #include "chrome/browser/storage/durable_storage_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 "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 EXPECT_FALSE(permission_context.last_permission_set_persisted()); 214 EXPECT_FALSE(permission_context.last_permission_set_persisted());
215 EXPECT_EQ(CONTENT_SETTING_DEFAULT, 215 EXPECT_EQ(CONTENT_SETTING_DEFAULT,
216 permission_context.last_permission_set_setting()); 216 permission_context.last_permission_set_setting());
217 } 217 }
218 218
219 TEST_F(DurableStoragePermissionContextTest, NonsecureOrigin) { 219 TEST_F(DurableStoragePermissionContextTest, NonsecureOrigin) {
220 TestDurablePermissionContext permission_context(profile()); 220 TestDurablePermissionContext permission_context(profile());
221 GURL url("http://www.google.com"); 221 GURL url("http://www.google.com");
222 222
223 EXPECT_EQ(CONTENT_SETTING_BLOCK, 223 EXPECT_EQ(CONTENT_SETTING_BLOCK,
224 permission_context.GetPermissionStatus(url, url).content_setting); 224 permission_context
225 .GetPermissionStatus(nullptr /* render_frame_host */, url, url)
226 .content_setting);
225 } 227 }
OLDNEW
« no previous file with comments | « chrome/browser/storage/durable_storage_permission_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698