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 <string> | 9 #include <string> |
10 | 10 |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/message_loop/message_loop.h" |
13 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
14 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
15 #include "base/test/test_timeouts.h" | 16 #include "base/test/test_timeouts.h" |
16 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
17 #include "chrome/test/base/browser_with_test_window_test.h" | 18 #include "chrome/test/base/browser_with_test_window_test.h" |
18 #include "extensions/browser/api/socket/udp_socket.h" | 19 #include "extensions/browser/api/socket/udp_socket.h" |
19 #include "net/base/io_buffer.h" | 20 #include "net/base/io_buffer.h" |
20 #include "net/base/ip_address.h" | 21 #include "net/base/ip_address.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
22 | 23 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // If not received within the test action timeout, quit the message loop. | 149 // If not received within the test action timeout, quit the message loop. |
149 io_loop.task_runner()->PostDelayedTask(FROM_HERE, run_loop.QuitClosure(), | 150 io_loop.task_runner()->PostDelayedTask(FROM_HERE, run_loop.QuitClosure(), |
150 TestTimeouts::action_timeout()); | 151 TestTimeouts::action_timeout()); |
151 | 152 |
152 run_loop.Run(); | 153 run_loop.Run(); |
153 | 154 |
154 EXPECT_TRUE(packet_received) << "Failed to receive from multicast address"; | 155 EXPECT_TRUE(packet_received) << "Failed to receive from multicast address"; |
155 } | 156 } |
156 | 157 |
157 } // namespace extensions | 158 } // namespace extensions |
OLD | NEW |