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

Side by Side Diff: chrome/browser/services/gcm/push_messaging_browsertest.cc

Issue 937563004: [Push] Enable PushManager.hasPermission() in browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } // namespace 154 } // namespace
155 155
156 class PushMessagingBrowserTest : public InProcessBrowserTest { 156 class PushMessagingBrowserTest : public InProcessBrowserTest {
157 public: 157 public:
158 PushMessagingBrowserTest() : gcm_service_(nullptr) {} 158 PushMessagingBrowserTest() : gcm_service_(nullptr) {}
159 ~PushMessagingBrowserTest() override {} 159 ~PushMessagingBrowserTest() override {}
160 160
161 // InProcessBrowserTest: 161 // InProcessBrowserTest:
162 void SetUpCommandLine(base::CommandLine* command_line) override { 162 void SetUpCommandLine(base::CommandLine* command_line) override {
163 command_line->AppendSwitch(switches::kEnablePushMessagePayload); 163 command_line->AppendSwitch(switches::kEnablePushMessagePayload);
164 command_line->AppendSwitch(switches::kEnablePushMessagingHasPermission);
165
164 InProcessBrowserTest::SetUpCommandLine(command_line); 166 InProcessBrowserTest::SetUpCommandLine(command_line);
165 } 167 }
166 168
167 // InProcessBrowserTest: 169 // InProcessBrowserTest:
168 void SetUp() override { 170 void SetUp() override {
169 https_server_.reset(new net::SpawnedTestServer( 171 https_server_.reset(new net::SpawnedTestServer(
170 net::SpawnedTestServer::TYPE_HTTPS, 172 net::SpawnedTestServer::TYPE_HTTPS,
171 net::BaseTestServer::SSLOptions( 173 net::BaseTestServer::SSLOptions(
172 net::BaseTestServer::SSLOptions::CERT_OK), 174 net::BaseTestServer::SSLOptions::CERT_OK),
173 base::FilePath(FILE_PATH_LITERAL("chrome/test/data/")))); 175 base::FilePath(FILE_PATH_LITERAL("chrome/test/data/"))));
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 // left without permission to use Push. 1036 // left without permission to use Push.
1035 1037
1036 ASSERT_TRUE(RunScript("hasPermission()", &script_result)); 1038 ASSERT_TRUE(RunScript("hasPermission()", &script_result));
1037 EXPECT_EQ("permission status - granted", script_result); 1039 EXPECT_EQ("permission status - granted", script_result);
1038 1040
1039 ASSERT_TRUE(RunScript("hasRegistration()", &script_result)); 1041 ASSERT_TRUE(RunScript("hasRegistration()", &script_result));
1040 EXPECT_EQ("true - registered", script_result); 1042 EXPECT_EQ("true - registered", script_result);
1041 } 1043 }
1042 1044
1043 } // namespace gcm 1045 } // namespace gcm
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