| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome_frame/test/http_server.h" | 5 #include "chrome_frame/test/http_server.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 cfi_path = cfi_path | 57 cfi_path = cfi_path |
| 58 .Append(FILE_PATH_LITERAL("chrome_frame")) | 58 .Append(FILE_PATH_LITERAL("chrome_frame")) |
| 59 .Append(FILE_PATH_LITERAL("test")) | 59 .Append(FILE_PATH_LITERAL("test")) |
| 60 .Append(FILE_PATH_LITERAL("data")) | 60 .Append(FILE_PATH_LITERAL("data")) |
| 61 .Append(FILE_PATH_LITERAL("CFInstall.js")); | 61 .Append(FILE_PATH_LITERAL("CFInstall.js")); |
| 62 | 62 |
| 63 file_util::Delete(cfi_path, false); | 63 file_util::Delete(cfi_path, false); |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool ChromeFrameHTTPServer::WaitToFinish(int milliseconds) { | 66 bool ChromeFrameHTTPServer::WaitToFinish(int milliseconds) { |
| 67 return test_server_.WaitToFinish(milliseconds); | 67 bool ret = test_server_.WaitToFinish(milliseconds); |
| 68 if (!ret) { |
| 69 LOG(ERROR) << "WaitToFinish failed with error:" << ::GetLastError(); |
| 70 } |
| 71 return ret; |
| 68 } | 72 } |
| 69 | 73 |
| 70 // TODO(phajdan.jr): Change wchar_t* to std::string& and fix callers. | 74 // TODO(phajdan.jr): Change wchar_t* to std::string& and fix callers. |
| 71 GURL ChromeFrameHTTPServer::Resolve(const wchar_t* relative_url) { | 75 GURL ChromeFrameHTTPServer::Resolve(const wchar_t* relative_url) { |
| 72 return test_server_.GetURL(WideToUTF8(relative_url)); | 76 return test_server_.GetURL(WideToUTF8(relative_url)); |
| 73 } | 77 } |
| 74 | 78 |
| 75 FilePath ChromeFrameHTTPServer::GetDataDir() { | 79 FilePath ChromeFrameHTTPServer::GetDataDir() { |
| 76 return test_server_.document_root(); | 80 return test_server_.document_root(); |
| 77 } | 81 } |
| OLD | NEW |