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

Unified Diff: chrome/browser/push_messaging/push_messaging_browsertest.cc

Issue 1158923002: Remove support for the "gcm_user_visible_only" manifest key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a message Created 5 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/push_messaging/push_messaging_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/push_messaging/push_messaging_browsertest.cc
diff --git a/chrome/browser/push_messaging/push_messaging_browsertest.cc b/chrome/browser/push_messaging/push_messaging_browsertest.cc
index b03f0825b18d8b21aefc31a8bb12c1275775a298..11a05c838635206c467492d1b0ebbbf800cfbfa5 100644
--- a/chrome/browser/push_messaging/push_messaging_browsertest.cc
+++ b/chrome/browser/push_messaging/push_messaging_browsertest.cc
@@ -194,19 +194,6 @@ class PushMessagingBrowserTest : public InProcessBrowserTest {
DISALLOW_COPY_AND_ASSIGN(PushMessagingBrowserTest);
};
-class PushMessagingBadManifestBrowserTest : public PushMessagingBrowserTest {
- std::string GetTestURL() override {
- return "files/push_messaging/test_bad_manifest.html";
- }
-};
-
-class PushMessagingManifestUserVisibleOnlyTrueTest
- : public PushMessagingBrowserTest {
- std::string GetTestURL() override {
- return "files/push_messaging/test_user_visible_only_manifest.html";
- }
-};
-
class PushMessagingBrowserTestEmptySubscriptionOptions
: public PushMessagingBrowserTest {
std::string GetTestURL() override {
@@ -214,17 +201,6 @@ class PushMessagingBrowserTestEmptySubscriptionOptions
}
};
-IN_PROC_BROWSER_TEST_F(PushMessagingBadManifestBrowserTest,
- SubscribeFailsNotVisibleMessages) {
- std::string script_result;
-
- ASSERT_TRUE(RunScript("registerServiceWorker()", &script_result));
- ASSERT_EQ("ok - service worker registered", script_result);
- ASSERT_TRUE(RunScript("subscribePush()", &script_result));
- EXPECT_EQ("AbortError - Registration failed - permission denied",
- script_result);
-}
-
void PushMessagingBrowserTest::TryToSubscribeSuccessfully(
const std::string& expected_push_subscription_id) {
std::string script_result;
@@ -341,44 +317,6 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTestEmptySubscriptionOptions,
script_result);
}
-IN_PROC_BROWSER_TEST_F(PushMessagingBadManifestBrowserTest,
- RegisterFailsNotVisibleMessages) {
- std::string script_result;
-
- ASSERT_TRUE(RunScript("registerServiceWorker()", &script_result));
- ASSERT_EQ("ok - service worker registered", script_result);
- ASSERT_TRUE(RunScript("subscribePush()", &script_result));
- EXPECT_EQ("AbortError - Registration failed - permission denied",
- script_result);
-}
-
-IN_PROC_BROWSER_TEST_F(PushMessagingManifestUserVisibleOnlyTrueTest,
- ManifestKeyConsidered) {
- // Chrome 42 introduced the "gcm_user_visible_only" manifest key, but Chrome
- // 43 supersedes this by the standardized PushSubscriptionOptions.userVisible
- // option. We maintain support for the manifest key without specifying the
- // subscription option, so verify that it is still being considered.
- std::string script_result;
-
- ASSERT_TRUE(RunScript("registerServiceWorker()", &script_result));
- ASSERT_EQ("ok - service worker registered", script_result);
-
- InfoBarResponder accepting_responder(GetInfoBarService(), true);
- ASSERT_TRUE(RunScript("requestNotificationPermission();", &script_result));
- EXPECT_EQ("permission status - granted", script_result);
-
- ASSERT_TRUE(RunScript("subscribePush()", &script_result));
- EXPECT_EQ(GetEndpointForSubscriptionId("1-0"), script_result);
-
- // permissionState has been introduced later so it does not
- // respect the manifest key.
- ASSERT_TRUE(RunScript("permissionState()", &script_result));
- EXPECT_EQ(
- "NotSupportedError - Push subscriptions that don't enable"
- " userVisibleOnly are not supported.",
- script_result);
-}
-
IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, SubscribePersisted) {
std::string script_result;
« no previous file with comments | « no previous file | chrome/browser/push_messaging/push_messaging_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698