| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MessagingInterstitial) { | 181 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MessagingInterstitial) { |
| 182 net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS); | 182 net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS); |
| 183 https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_MISMATCHED_NAME); | 183 https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_MISMATCHED_NAME); |
| 184 ASSERT_TRUE(https_server.Start()); | 184 ASSERT_TRUE(https_server.Start()); |
| 185 | 185 |
| 186 ASSERT_TRUE(RunExtensionSubtest("messaging/interstitial_component", | 186 ASSERT_TRUE(RunExtensionSubtest("messaging/interstitial_component", |
| 187 https_server.base_url().spec(), | 187 https_server.base_url().spec(), |
| 188 kFlagLoadAsComponent)) << message_; | 188 kFlagLoadAsComponent)) << message_; |
| 189 } | 189 } |
| 190 | 190 |
| 191 // Tests connecting from a panel to its extension. | |
| 192 class PanelMessagingTest : public ExtensionApiTest { | |
| 193 void SetUpCommandLine(base::CommandLine* command_line) override { | |
| 194 ExtensionApiTest::SetUpCommandLine(command_line); | |
| 195 command_line->AppendSwitch(switches::kEnablePanels); | |
| 196 } | |
| 197 }; | |
| 198 | |
| 199 IN_PROC_BROWSER_TEST_F(PanelMessagingTest, MessagingPanel) { | |
| 200 ASSERT_TRUE(RunExtensionTest("messaging/connect_panel")) << message_; | |
| 201 } | |
| 202 | |
| 203 // XXX(kalman): All web messaging tests disabled on windows due to extreme | 191 // XXX(kalman): All web messaging tests disabled on windows due to extreme |
| 204 // flakiness. See http://crbug.com/350517. | 192 // flakiness. See http://crbug.com/350517. |
| 205 #if !defined(OS_WIN) | 193 #if !defined(OS_WIN) |
| 206 | 194 |
| 207 // Tests externally_connectable between a web page and an extension. | 195 // Tests externally_connectable between a web page and an extension. |
| 208 // | 196 // |
| 209 // TODO(kalman): Test between extensions. This is already tested in this file, | 197 // TODO(kalman): Test between extensions. This is already tested in this file, |
| 210 // but not with externally_connectable set in the manifest. | 198 // but not with externally_connectable set in the manifest. |
| 211 // | 199 // |
| 212 // TODO(kalman): Test with host permissions. | 200 // TODO(kalman): Test with host permissions. |
| (...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 ui_test_utils::NavigateToURL(browser(), chromium_org_url()); | 1282 ui_test_utils::NavigateToURL(browser(), chromium_org_url()); |
| 1295 EXPECT_EQ(COULD_NOT_ESTABLISH_CONNECTION_ERROR, | 1283 EXPECT_EQ(COULD_NOT_ESTABLISH_CONNECTION_ERROR, |
| 1296 CanConnectAndSendMessagesToMainFrame(invalid.get())); | 1284 CanConnectAndSendMessagesToMainFrame(invalid.get())); |
| 1297 } | 1285 } |
| 1298 | 1286 |
| 1299 #endif // !defined(OS_WIN) - http://crbug.com/350517. | 1287 #endif // !defined(OS_WIN) - http://crbug.com/350517. |
| 1300 | 1288 |
| 1301 } // namespace | 1289 } // namespace |
| 1302 | 1290 |
| 1303 }; // namespace extensions | 1291 }; // namespace extensions |
| OLD | NEW |