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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 event_router->BroadcastEvent(BuildEvent( | 114 event_router->BroadcastEvent(BuildEvent( |
115 BuildEventArguments(true, "last message"), | 115 BuildEventArguments(true, "last message"), |
116 content::Source<Profile>(source).ptr(), | 116 content::Source<Profile>(source).ptr(), |
117 GURL())); | 117 GURL())); |
118 } | 118 } |
119 | 119 |
120 content::NotificationRegistrar registrar_; | 120 content::NotificationRegistrar registrar_; |
121 }; | 121 }; |
122 | 122 |
123 // Tests that message passing between extensions and content scripts works. | 123 // Tests that message passing between extensions and content scripts works. |
124 #if defined(MEMORY_SANITIZER) | 124 #if defined(MEMORY_SANITIZER) || defined(OS_MACOSX) |
125 // https://crbug.com/582185 | 125 // https://crbug.com/582185 - flakily times out on Linux/CrOS MSAN |
| 126 // https://crbug.com/681705 - flakily times out on mac_chromium_rel_ng |
126 #define MAYBE_Messaging DISABLED_Messaging | 127 #define MAYBE_Messaging DISABLED_Messaging |
127 #else | 128 #else |
128 #define MAYBE_Messaging Messaging | 129 #define MAYBE_Messaging Messaging |
129 #endif | 130 #endif |
130 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_Messaging) { | 131 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_Messaging) { |
131 ASSERT_TRUE(StartEmbeddedTestServer()); | 132 ASSERT_TRUE(StartEmbeddedTestServer()); |
132 ASSERT_TRUE(RunExtensionTest("messaging/connect")) << message_; | 133 ASSERT_TRUE(RunExtensionTest("messaging/connect")) << message_; |
133 } | 134 } |
134 | 135 |
135 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MessagingCrash) { | 136 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MessagingCrash) { |
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 ASSERT_TRUE(content::ExecuteScriptAndExtractInt( | 1324 ASSERT_TRUE(content::ExecuteScriptAndExtractInt( |
1324 background_contents, | 1325 background_contents, |
1325 "window.domAutomationController.send(window.messageCount);", | 1326 "window.domAutomationController.send(window.messageCount);", |
1326 &message_count)); | 1327 &message_count)); |
1327 EXPECT_EQ(1, message_count); | 1328 EXPECT_EQ(1, message_count); |
1328 } | 1329 } |
1329 | 1330 |
1330 } // namespace | 1331 } // namespace |
1331 | 1332 |
1332 }; // namespace extensions | 1333 }; // namespace extensions |
OLD | NEW |