Skip to content

Instantly share code, notes, and snippets.

@beverloo
Created March 24, 2016 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beverloo/29d04dc0032f67724954 to your computer and use it in GitHub Desktop.
Save beverloo/29d04dc0032f67724954 to your computer and use it in GitHub Desktop.
diff --git a/chrome/browser/push_messaging/push_messaging_browsertest.cc b/chrome/browser/push_messaging/push_messaging_browsertest.cc
index 2543d79d..ffa3179 100644
--- a/chrome/browser/push_messaging/push_messaging_browsertest.cc
+++ b/chrome/browser/push_messaging/push_messaging_browsertest.cc
@@ -901,6 +901,8 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_PUSH_MESSAGING);
+ HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
+ ->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
message_loop_runner->Run();
@@ -934,6 +936,11 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
CONTENT_SETTINGS_TYPE_PUSH_MESSAGING,
std::string(), CONTENT_SETTING_DEFAULT);
+ HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
+ ->SetContentSettingDefaultScope(origin, origin,
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
+ std::string(), CONTENT_SETTING_DEFAULT);
+
message_loop_runner->Run();
ASSERT_TRUE(RunScript("permissionState()", &script_result));
@@ -1193,6 +1200,8 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
// codepath due to sender_id being required for unsubscribing there.
HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_PUSH_MESSAGING);
+ HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
+ ->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
run_loop.Run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment