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/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
6 #include "base/stringprintf.h" | 6 #include "base/stringprintf.h" |
7 #include "chrome/browser/extensions/api/dns/host_resolver_wrapper.h" | 7 #include "chrome/browser/extensions/api/dns/host_resolver_wrapper.h" |
8 #include "chrome/browser/extensions/api/dns/mock_host_resolver_creator.h" | 8 #include "chrome/browser/extensions/api/dns/mock_host_resolver_creator.h" |
9 #include "chrome/browser/extensions/api/socket/socket_api.h" | 9 #include "chrome/browser/extensions/api/socket/socket_api.h" |
10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 LoadExtension(test_data_dir_.AppendASCII("socket/unload")); | 192 LoadExtension(test_data_dir_.AppendASCII("socket/unload")); |
193 ASSERT_TRUE(extension); | 193 ASSERT_TRUE(extension); |
194 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 194 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
195 | 195 |
196 UnloadExtension(extension->id()); | 196 UnloadExtension(extension->id()); |
197 | 197 |
198 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("socket/unload"))) | 198 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("socket/unload"))) |
199 << message_; | 199 << message_; |
200 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 200 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
201 } | 201 } |
| 202 |
| 203 IN_PROC_BROWSER_TEST_F(SocketApiTest, SocketMulticast) { |
| 204 ResultCatcher catcher; |
| 205 catcher.RestrictToProfile(browser()->profile()); |
| 206 ExtensionTestMessageListener listener("info_please", true); |
| 207 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("socket/api"))); |
| 208 EXPECT_TRUE(listener.WaitUntilSatisfied()); |
| 209 listener.Reply( |
| 210 base::StringPrintf("multicast:%s:%d", kHostname.c_str(), kPort)); |
| 211 |
| 212 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 213 } |
OLD | NEW |