| 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 "components/devtools_http_handler/devtools_http_handler.h" | 5 #include "components/devtools_http_handler/devtools_http_handler.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
| 13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
| 14 #include "base/location.h" | 14 #include "base/location.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
| 17 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
| 18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 19 #include "base/thread_task_runner_handle.h" | 19 #include "base/threading/thread_task_runner_handle.h" |
| 20 #include "base/values.h" | 20 #include "base/values.h" |
| 21 #include "components/devtools_http_handler/devtools_http_handler_delegate.h" | 21 #include "components/devtools_http_handler/devtools_http_handler_delegate.h" |
| 22 #include "content/public/test/test_browser_thread_bundle.h" | 22 #include "content/public/test/test_browser_thread_bundle.h" |
| 23 #include "content/public/test/test_utils.h" | 23 #include "content/public/test/test_utils.h" |
| 24 #include "net/base/ip_address.h" | 24 #include "net/base/ip_address.h" |
| 25 #include "net/base/ip_endpoint.h" | 25 #include "net/base/ip_endpoint.h" |
| 26 #include "net/base/net_errors.h" | 26 #include "net/base/net_errors.h" |
| 27 #include "net/socket/server_socket.h" | 27 #include "net/socket/server_socket.h" |
| 28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
| 29 | 29 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 kDevToolsActivePortFileName); | 190 kDevToolsActivePortFileName); |
| 191 EXPECT_TRUE(base::PathExists(active_port_file)); | 191 EXPECT_TRUE(base::PathExists(active_port_file)); |
| 192 std::string file_contents; | 192 std::string file_contents; |
| 193 EXPECT_TRUE(base::ReadFileToString(active_port_file, &file_contents)); | 193 EXPECT_TRUE(base::ReadFileToString(active_port_file, &file_contents)); |
| 194 int port = 0; | 194 int port = 0; |
| 195 EXPECT_TRUE(base::StringToInt(file_contents, &port)); | 195 EXPECT_TRUE(base::StringToInt(file_contents, &port)); |
| 196 EXPECT_EQ(static_cast<int>(kDummyPort), port); | 196 EXPECT_EQ(static_cast<int>(kDummyPort), port); |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace devtools_http_handler | 199 } // namespace devtools_http_handler |
| OLD | NEW |