| 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/files/file_util.h" | 5 #include "base/files/file_util.h" |
| 6 #include "base/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "content/browser/browser_thread_impl.h" | 10 #include "content/browser/browser_thread_impl.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 class DummyDelegate : public DevToolsHttpHandlerDelegate { | 79 class DummyDelegate : public DevToolsHttpHandlerDelegate { |
| 80 public: | 80 public: |
| 81 virtual std::string GetDiscoveryPageHTML() OVERRIDE { return std::string(); } | 81 virtual std::string GetDiscoveryPageHTML() OVERRIDE { return std::string(); } |
| 82 | 82 |
| 83 virtual bool BundlesFrontendResources() OVERRIDE { return true; } | 83 virtual bool BundlesFrontendResources() OVERRIDE { return true; } |
| 84 | 84 |
| 85 virtual base::FilePath GetDebugFrontendDir() OVERRIDE { | 85 virtual base::FilePath GetDebugFrontendDir() OVERRIDE { |
| 86 return base::FilePath(); | 86 return base::FilePath(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE { | |
| 90 return std::string(); | |
| 91 } | |
| 92 | |
| 93 virtual scoped_ptr<DevToolsTarget> CreateNewTarget(const GURL& url) OVERRIDE { | |
| 94 return scoped_ptr<DevToolsTarget>(); | |
| 95 } | |
| 96 | |
| 97 virtual void EnumerateTargets(TargetCallback callback) OVERRIDE { | |
| 98 callback.Run(TargetList()); | |
| 99 } | |
| 100 | |
| 101 virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering( | 89 virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering( |
| 102 net::StreamListenSocket::Delegate* delegate, | 90 net::StreamListenSocket::Delegate* delegate, |
| 103 std::string* name) OVERRIDE { | 91 std::string* name) OVERRIDE { |
| 104 return scoped_ptr<net::StreamListenSocket>(); | 92 return scoped_ptr<net::StreamListenSocket>(); |
| 105 } | 93 } |
| 106 }; | 94 }; |
| 107 | 95 |
| 108 } | 96 } |
| 109 | 97 |
| 110 class DevToolsHttpHandlerTest : public testing::Test { | 98 class DevToolsHttpHandlerTest : public testing::Test { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 kDevToolsActivePortFileName); | 160 kDevToolsActivePortFileName); |
| 173 EXPECT_TRUE(base::PathExists(active_port_file)); | 161 EXPECT_TRUE(base::PathExists(active_port_file)); |
| 174 std::string file_contents; | 162 std::string file_contents; |
| 175 EXPECT_TRUE(base::ReadFileToString(active_port_file, &file_contents)); | 163 EXPECT_TRUE(base::ReadFileToString(active_port_file, &file_contents)); |
| 176 int port = 0; | 164 int port = 0; |
| 177 EXPECT_TRUE(base::StringToInt(file_contents, &port)); | 165 EXPECT_TRUE(base::StringToInt(file_contents, &port)); |
| 178 EXPECT_EQ(kDummyPort, port); | 166 EXPECT_EQ(kDummyPort, port); |
| 179 } | 167 } |
| 180 | 168 |
| 181 } // namespace content | 169 } // namespace content |
| OLD | NEW |