| 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 "base/base64.h" | 5 #include "base/base64.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 // Tests that messages with event_urls are only passed to extensions with | 123 // Tests that messages with event_urls are only passed to extensions with |
| 124 // appropriate permissions. | 124 // appropriate permissions. |
| 125 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MessagingEventURL) { | 125 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MessagingEventURL) { |
| 126 MessageSender sender; | 126 MessageSender sender; |
| 127 ASSERT_TRUE(RunExtensionTest("messaging/event_url")) << message_; | 127 ASSERT_TRUE(RunExtensionTest("messaging/event_url")) << message_; |
| 128 } | 128 } |
| 129 | 129 |
| 130 // Tests connecting from a panel to its extension. | 130 // Tests connecting from a panel to its extension. |
| 131 class PanelMessagingTest : public ExtensionApiTest { | 131 class PanelMessagingTest : public ExtensionApiTest { |
| 132 void SetUpCommandLine(CommandLine* command_line) override { | 132 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 133 ExtensionApiTest::SetUpCommandLine(command_line); | 133 ExtensionApiTest::SetUpCommandLine(command_line); |
| 134 command_line->AppendSwitch(switches::kEnablePanels); | 134 command_line->AppendSwitch(switches::kEnablePanels); |
| 135 } | 135 } |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 IN_PROC_BROWSER_TEST_F(PanelMessagingTest, MessagingPanel) { | 138 IN_PROC_BROWSER_TEST_F(PanelMessagingTest, MessagingPanel) { |
| 139 ASSERT_TRUE(RunExtensionTest("messaging/connect_panel")) << message_; | 139 ASSERT_TRUE(RunExtensionTest("messaging/connect_panel")) << message_; |
| 140 } | 140 } |
| 141 | 141 |
| 142 // XXX(kalman): All web messaging tests disabled on windows due to extreme | 142 // XXX(kalman): All web messaging tests disabled on windows due to extreme |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 ui_test_utils::NavigateToURL(browser(), chromium_org_url()); | 1146 ui_test_utils::NavigateToURL(browser(), chromium_org_url()); |
| 1147 EXPECT_EQ(COULD_NOT_ESTABLISH_CONNECTION_ERROR, | 1147 EXPECT_EQ(COULD_NOT_ESTABLISH_CONNECTION_ERROR, |
| 1148 CanConnectAndSendMessagesToMainFrame(invalid.get())); | 1148 CanConnectAndSendMessagesToMainFrame(invalid.get())); |
| 1149 } | 1149 } |
| 1150 | 1150 |
| 1151 #endif // !defined(OS_WIN) - http://crbug.com/350517. | 1151 #endif // !defined(OS_WIN) - http://crbug.com/350517. |
| 1152 | 1152 |
| 1153 } // namespace | 1153 } // namespace |
| 1154 | 1154 |
| 1155 }; // namespace extensions | 1155 }; // namespace extensions |
| OLD | NEW |