Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: chrome_frame/test/http_server.cc

Issue 2881028: GTTF: test server cleanup: (Closed)
Patch Set: final Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/worker/worker_uitest.cc ('k') | net/base/net_test_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/string_util.h" 7 #include "base/string_util.h"
8 8
9 const wchar_t kDocRoot[] = L"chrome_frame\\test\\data"; 9 const wchar_t kDocRoot[] = L"chrome_frame\\test\\data";
10 10
11 void ChromeFrameHTTPServer::SetUp() { 11 void ChromeFrameHTTPServer::SetUp() {
12 std::wstring document_root(kDocRoot); 12 std::wstring document_root(kDocRoot);
13 server_ = HTTPTestServer::CreateServer(document_root, NULL, 30, 1000); 13 server_ = HTTPTestServer::CreateServer(document_root);
14 ASSERT_TRUE(server_ != NULL); 14 ASSERT_TRUE(server_ != NULL);
15 15
16 // copy CFInstance.js into the test directory 16 // copy CFInstance.js into the test directory
17 FilePath cf_source_path; 17 FilePath cf_source_path;
18 PathService::Get(base::DIR_SOURCE_ROOT, &cf_source_path); 18 PathService::Get(base::DIR_SOURCE_ROOT, &cf_source_path);
19 cf_source_path = cf_source_path.Append(FILE_PATH_LITERAL("chrome_frame")); 19 cf_source_path = cf_source_path.Append(FILE_PATH_LITERAL("chrome_frame"));
20 20
21 file_util::CopyFile(cf_source_path.Append(FILE_PATH_LITERAL("CFInstance.js")), 21 file_util::CopyFile(cf_source_path.Append(FILE_PATH_LITERAL("CFInstance.js")),
22 cf_source_path.Append( 22 cf_source_path.Append(
23 FILE_PATH_LITERAL("test")).Append( 23 FILE_PATH_LITERAL("test")).Append(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 // TODO(phajdan.jr): Change wchar_t* to std::string& and fix callers. 68 // TODO(phajdan.jr): Change wchar_t* to std::string& and fix callers.
69 GURL ChromeFrameHTTPServer::Resolve(const wchar_t* relative_url) { 69 GURL ChromeFrameHTTPServer::Resolve(const wchar_t* relative_url) {
70 return server_->TestServerPage(WideToUTF8(relative_url)); 70 return server_->TestServerPage(WideToUTF8(relative_url));
71 } 71 }
72 72
73 FilePath ChromeFrameHTTPServer::GetDataDir() { 73 FilePath ChromeFrameHTTPServer::GetDataDir() {
74 return server_->GetDataDirectory(); 74 return server_->GetDataDirectory();
75 } 75 }
OLDNEW
« no previous file with comments | « chrome/worker/worker_uitest.cc ('k') | net/base/net_test_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698