| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |