| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 class MessagingApiTest : public ExtensionApiTest { | 127 class MessagingApiTest : public ExtensionApiTest { |
| 128 public: | 128 public: |
| 129 void SetUpOnMainThread() override { | 129 void SetUpOnMainThread() override { |
| 130 ExtensionApiTest::SetUpOnMainThread(); | 130 ExtensionApiTest::SetUpOnMainThread(); |
| 131 host_resolver()->AddRule("*", "127.0.0.1"); | 131 host_resolver()->AddRule("*", "127.0.0.1"); |
| 132 ASSERT_TRUE(StartEmbeddedTestServer()); | 132 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 133 } | 133 } |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 // Tests that message passing between extensions and content scripts works. | 136 // Tests that message passing between extensions and content scripts works. |
| 137 #if defined(MEMORY_SANITIZER) || defined(OS_MACOSX) | 137 #if defined(MEMORY_SANITIZER) || defined(OS_MACOSX) || defined(OS_WIN) |
| 138 // https://crbug.com/582185 - flakily times out on Linux/CrOS MSAN | 138 // https://crbug.com/582185 - flakily times out on Linux/CrOS MSAN |
| 139 // https://crbug.com/681705 - flakily times out on mac_chromium_rel_ng | 139 // https://crbug.com/681705 - flakily times out on mac_chromium_rel_ng |
| 140 // https://crbug.com/681705 - flakily times out on win_chromium_rel_ng |
| 140 #define MAYBE_Messaging DISABLED_Messaging | 141 #define MAYBE_Messaging DISABLED_Messaging |
| 141 #else | 142 #else |
| 142 #define MAYBE_Messaging Messaging | 143 #define MAYBE_Messaging Messaging |
| 143 #endif | 144 #endif |
| 144 IN_PROC_BROWSER_TEST_F(MessagingApiTest, MAYBE_Messaging) { | 145 IN_PROC_BROWSER_TEST_F(MessagingApiTest, MAYBE_Messaging) { |
| 145 ASSERT_TRUE(RunExtensionTest("messaging/connect")) << message_; | 146 ASSERT_TRUE(RunExtensionTest("messaging/connect")) << message_; |
| 146 } | 147 } |
| 147 | 148 |
| 148 IN_PROC_BROWSER_TEST_F(MessagingApiTest, MessagingCrash) { | 149 IN_PROC_BROWSER_TEST_F(MessagingApiTest, MessagingCrash) { |
| 149 ExtensionTestMessageListener ready_to_crash("ready_to_crash", false); | 150 ExtensionTestMessageListener ready_to_crash("ready_to_crash", false); |
| (...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1321 ASSERT_TRUE(content::ExecuteScriptAndExtractInt( | 1322 ASSERT_TRUE(content::ExecuteScriptAndExtractInt( |
| 1322 background_contents, | 1323 background_contents, |
| 1323 "window.domAutomationController.send(window.messageCount);", | 1324 "window.domAutomationController.send(window.messageCount);", |
| 1324 &message_count)); | 1325 &message_count)); |
| 1325 EXPECT_EQ(1, message_count); | 1326 EXPECT_EQ(1, message_count); |
| 1326 } | 1327 } |
| 1327 | 1328 |
| 1328 } // namespace | 1329 } // namespace |
| 1329 | 1330 |
| 1330 }; // namespace extensions | 1331 }; // namespace extensions |
| OLD | NEW |