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

Side by Side Diff: chrome/browser/push_messaging/push_messaging_browsertest.cc

Issue 1129293007: Remove the obsolete HasPermission switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/barrier_closure.h" 8 #include "base/barrier_closure.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } // namespace 70 } // namespace
71 71
72 class PushMessagingBrowserTest : public InProcessBrowserTest { 72 class PushMessagingBrowserTest : public InProcessBrowserTest {
73 public: 73 public:
74 PushMessagingBrowserTest() : gcm_service_(nullptr) {} 74 PushMessagingBrowserTest() : gcm_service_(nullptr) {}
75 ~PushMessagingBrowserTest() override {} 75 ~PushMessagingBrowserTest() override {}
76 76
77 // InProcessBrowserTest: 77 // InProcessBrowserTest:
78 void SetUpCommandLine(base::CommandLine* command_line) override { 78 void SetUpCommandLine(base::CommandLine* command_line) override {
79 command_line->AppendSwitch(switches::kEnablePushMessagePayload); 79 command_line->AppendSwitch(switches::kEnablePushMessagePayload);
80 command_line->AppendSwitch(switches::kEnablePushMessagingHasPermission);
81 80
82 InProcessBrowserTest::SetUpCommandLine(command_line); 81 InProcessBrowserTest::SetUpCommandLine(command_line);
83 } 82 }
84 83
85 // InProcessBrowserTest: 84 // InProcessBrowserTest:
86 void SetUp() override { 85 void SetUp() override {
87 https_server_.reset(new net::SpawnedTestServer( 86 https_server_.reset(new net::SpawnedTestServer(
88 net::SpawnedTestServer::TYPE_HTTPS, 87 net::SpawnedTestServer::TYPE_HTTPS,
89 net::BaseTestServer::SSLOptions( 88 net::BaseTestServer::SSLOptions(
90 net::BaseTestServer::SSLOptions::CERT_OK), 89 net::BaseTestServer::SSLOptions::CERT_OK),
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 std::string script_result; 1096 std::string script_result;
1098 1097
1099 ASSERT_TRUE(RunScript("registerServiceWorker()", &script_result)); 1098 ASSERT_TRUE(RunScript("registerServiceWorker()", &script_result));
1100 ASSERT_EQ("ok - service worker registered", script_result); 1099 ASSERT_EQ("ok - service worker registered", script_result);
1101 1100
1102 // In Incognito mode the promise returned by getSubscription should not hang, 1101 // In Incognito mode the promise returned by getSubscription should not hang,
1103 // it should just fulfill with null. 1102 // it should just fulfill with null.
1104 ASSERT_TRUE(RunScript("hasSubscription()", &script_result)); 1103 ASSERT_TRUE(RunScript("hasSubscription()", &script_result));
1105 ASSERT_EQ("false - not subscribed", script_result); 1104 ASSERT_EQ("false - not subscribed", script_result);
1106 } 1105 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698