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

Unified Diff: chrome/browser/notifications/platform_notification_service_browsertest.cc

Issue 1726323002: Have Permission{Manager,Service} use Origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/platform_notification_service_browsertest.cc
diff --git a/chrome/browser/notifications/platform_notification_service_browsertest.cc b/chrome/browser/notifications/platform_notification_service_browsertest.cc
index 07c9e984e6dfa1bd2e870a970074d9e8a29cb016..ff5861d322143f91a5fd3ac0a5410d49553cf826 100644
--- a/chrome/browser/notifications/platform_notification_service_browsertest.cc
+++ b/chrome/browser/notifications/platform_notification_service_browsertest.cc
@@ -404,30 +404,30 @@ IN_PROC_BROWSER_TEST_F(PlatformNotificationServiceBrowserTest,
NotificationPermissionContextFactory::GetForProfile(browser()->profile());
ASSERT_TRUE(permission_context);
+ const url::Origin origin(TestPageUrl());
EXPECT_EQ(CONTENT_SETTING_ASK,
- permission_context->GetPermissionStatus(TestPageUrl(),
- TestPageUrl()));
+ permission_context->GetPermissionStatus(origin, origin));
RequestAndAcceptPermission();
EXPECT_EQ(CONTENT_SETTING_ALLOW,
- permission_context->GetPermissionStatus(TestPageUrl(),
- TestPageUrl()));
+ permission_context->GetPermissionStatus(origin, origin));
// This case should fail because a file URL is used.
base::FilePath dir_source_root;
EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &dir_source_root));
base::FilePath full_file_path =
dir_source_root.Append(server_root()).AppendASCII(kTestFileName);
- GURL file_url(net::FilePathToFileURL(full_file_path));
+ const GURL file_url(net::FilePathToFileURL(full_file_path));
+ const url::Origin file_origin(file_url);
ui_test_utils::NavigateToURL(browser(), file_url);
EXPECT_EQ(CONTENT_SETTING_ASK,
- permission_context->GetPermissionStatus(file_url, file_url));
+ permission_context->GetPermissionStatus(file_origin, file_origin));
RequestAndAcceptPermission();
EXPECT_EQ(CONTENT_SETTING_ASK,
- permission_context->GetPermissionStatus(file_url, file_url))
+ permission_context->GetPermissionStatus(file_origin, file_origin))
<< "If this test fails, you may have fixed a bug preventing file origins "
<< "from sending their origin from Blink; if so you need to update the "
<< "display function for notification origins to show the file path.";

Powered by Google App Engine
This is Rietveld 408576698