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

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

Issue 874613002: Don't share Push API message payloads unless explicitly enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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 | chrome/browser/services/gcm/push_messaging_service_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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 class PushMessagingBrowserTest : public InProcessBrowserTest { 110 class PushMessagingBrowserTest : public InProcessBrowserTest {
111 public: 111 public:
112 PushMessagingBrowserTest() : gcm_service_(nullptr) {} 112 PushMessagingBrowserTest() : gcm_service_(nullptr) {}
113 ~PushMessagingBrowserTest() override {} 113 ~PushMessagingBrowserTest() override {}
114 114
115 // InProcessBrowserTest: 115 // InProcessBrowserTest:
116 void SetUpCommandLine(base::CommandLine* command_line) override { 116 void SetUpCommandLine(base::CommandLine* command_line) override {
117 command_line->AppendSwitch( 117 command_line->AppendSwitch(
118 switches::kEnableExperimentalWebPlatformFeatures); 118 switches::kEnableExperimentalWebPlatformFeatures);
119 command_line->AppendSwitch(
120 switches::kEnablePushMessagePayload);
119 121
120 InProcessBrowserTest::SetUpCommandLine(command_line); 122 InProcessBrowserTest::SetUpCommandLine(command_line);
121 } 123 }
122 124
123 // InProcessBrowserTest: 125 // InProcessBrowserTest:
124 void SetUp() override { 126 void SetUp() override {
125 https_server_.reset(new net::SpawnedTestServer( 127 https_server_.reset(new net::SpawnedTestServer(
126 net::SpawnedTestServer::TYPE_HTTPS, 128 net::SpawnedTestServer::TYPE_HTTPS,
127 net::BaseTestServer::SSLOptions( 129 net::BaseTestServer::SSLOptions(
128 net::BaseTestServer::SSLOptions::CERT_OK), 130 net::BaseTestServer::SSLOptions::CERT_OK),
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 596
595 gcm_service()->AddExpectedUnregisterResponse(GCMClient::UNKNOWN_ERROR); 597 gcm_service()->AddExpectedUnregisterResponse(GCMClient::UNKNOWN_ERROR);
596 598
597 ASSERT_TRUE(RunScript("unregister()", &script_result)); 599 ASSERT_TRUE(RunScript("unregister()", &script_result));
598 EXPECT_EQ("unregister error: " 600 EXPECT_EQ("unregister error: "
599 "UnknownError: Unexpected error while trying to unregister from the" 601 "UnknownError: Unexpected error while trying to unregister from the"
600 " push server.", script_result); 602 " push server.", script_result);
601 } 603 }
602 604
603 } // namespace gcm 605 } // namespace gcm
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/services/gcm/push_messaging_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698