| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 } // namespace | 153 } // namespace |
| 154 | 154 |
| 155 class PushMessagingBrowserTest : public InProcessBrowserTest { | 155 class PushMessagingBrowserTest : public InProcessBrowserTest { |
| 156 public: | 156 public: |
| 157 PushMessagingBrowserTest() : gcm_service_(nullptr) {} | 157 PushMessagingBrowserTest() : gcm_service_(nullptr) {} |
| 158 ~PushMessagingBrowserTest() override {} | 158 ~PushMessagingBrowserTest() override {} |
| 159 | 159 |
| 160 // InProcessBrowserTest: | 160 // InProcessBrowserTest: |
| 161 void SetUpCommandLine(base::CommandLine* command_line) override { | 161 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 162 command_line->AppendSwitch( | |
| 163 switches::kEnableExperimentalWebPlatformFeatures); | |
| 164 command_line->AppendSwitch(switches::kEnablePushMessagePayload); | 162 command_line->AppendSwitch(switches::kEnablePushMessagePayload); |
| 165 InProcessBrowserTest::SetUpCommandLine(command_line); | 163 InProcessBrowserTest::SetUpCommandLine(command_line); |
| 166 } | 164 } |
| 167 | 165 |
| 168 // InProcessBrowserTest: | 166 // InProcessBrowserTest: |
| 169 void SetUp() override { | 167 void SetUp() override { |
| 170 https_server_.reset(new net::SpawnedTestServer( | 168 https_server_.reset(new net::SpawnedTestServer( |
| 171 net::SpawnedTestServer::TYPE_HTTPS, | 169 net::SpawnedTestServer::TYPE_HTTPS, |
| 172 net::BaseTestServer::SSLOptions( | 170 net::BaseTestServer::SSLOptions( |
| 173 net::BaseTestServer::SSLOptions::CERT_OK), | 171 net::BaseTestServer::SSLOptions::CERT_OK), |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 if (IsPushSupported()) | 794 if (IsPushSupported()) |
| 797 return; | 795 return; |
| 798 | 796 |
| 799 std::string script_result; | 797 std::string script_result; |
| 800 ASSERT_TRUE(RunScript("window.PushManager", &script_result)); | 798 ASSERT_TRUE(RunScript("window.PushManager", &script_result)); |
| 801 EXPECT_EQ("undefined", script_result); | 799 EXPECT_EQ("undefined", script_result); |
| 802 } | 800 } |
| 803 #endif | 801 #endif |
| 804 | 802 |
| 805 } // namespace gcm | 803 } // namespace gcm |
| OLD | NEW |