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

Issue 12210088: Make the TestServer use an absolute document root path. (Closed)

Created:
7 years, 10 months ago by Joao da Silva
Modified:
7 years, 10 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Make the TestServer use an absolute document root path. This change allows having ScopedTempDirs outside the source dir as the docroot, so that the files being served can be modified during tests. BUG=None TEST=Nothing breaks, tests with TestServers still pass

Patch Set 1 #

Total comments: 2

Patch Set 2 : testserver uses absolute docroot path #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+279 lines, -213 lines) Patch
M chrome/browser/captive_portal/captive_portal_browsertest.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/content_settings/content_settings_browsertest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc View 1 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_apitest.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_apitest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/instant/instant_test_utils.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/net/connection_tester_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/net/ftp_browsertest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/net/http_pipelining_compatibility_client_unittest.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/net/network_stats_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/net/proxy_browsertest.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/net/websocket_browsertest.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/policy/cloud_policy_browsertest.cc View 1 2 chunks +2 lines, -7 lines 0 comments Download
M chrome/browser/policy/device_management_service_browsertest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 12 chunks +24 lines, -24 lines 0 comments Download
M chrome/browser/referrer_policy_browsertest.cc View 1 1 chunk +8 lines, -6 lines 0 comments Download
M chrome/browser/safe_browsing/local_safebrowsing_test_server.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/search_engines/template_url_fetcher_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ssl/ssl_browser_tests.cc View 1 2 chunks +5 lines, -7 lines 0 comments Download
M chrome/browser/ui/browser_browsertest.cc View 1 5 chunks +4 lines, -7 lines 0 comments Download
M chrome/browser/ui/pdf/pdf_browsertest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc View 1 5 chunks +4 lines, -7 lines 0 comments Download
M chrome/test/nacl/nacl_browsertest_util.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/test/perf/mach_ports_test.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/test/ppapi/ppapi_test.cc View 1 3 chunks +10 lines, -5 lines 0 comments Download
M chrome/test/pyautolib/pyauto.py View 1 4 chunks +12 lines, -4 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_host_browsertest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_view_host_manager_browsertest.cc View 1 16 chunks +32 lines, -16 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 3 chunks +6 lines, -3 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura_browsertest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/worker_host/test/worker_browsertest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/public/test/browser_test_base.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M net/proxy/proxy_resolver_perftest.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M net/proxy/proxy_script_fetcher_impl_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 1 16 chunks +17 lines, -16 lines 0 comments Download
M net/test/base_test_server.h View 1 1 chunk +4 lines, -0 lines 1 comment Download
M net/test/base_test_server.cc View 1 1 chunk +18 lines, -0 lines 2 comments Download
M net/test/local_test_server.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M net/test/local_test_server.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M net/test/remote_test_server.h View 1 1 chunk +2 lines, -2 lines 1 comment Download
M net/test/remote_test_server.cc View 1 2 chunks +4 lines, -4 lines 0 comments Download
M net/url_request/url_fetcher_impl_unittest.cc View 1 29 chunks +30 lines, -30 lines 0 comments Download
M net/url_request/url_request_context_builder_unittest.cc View 1 1 chunk +1 line, -5 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 17 chunks +33 lines, -18 lines 0 comments Download
M sync/internal_api/http_bridge_unittest.cc View 1 1 chunk +1 line, -7 lines 0 comments Download
M sync/test/local_sync_test_server.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M webkit/glue/unittest_test_server.h View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Joao da Silva
Hi Paweł, can you review this? I went through git history looking for a reason ...
7 years, 10 months ago (2013-02-08 16:50:21 UTC) #1
Paweł Hajdan Jr.
https://codereview.chromium.org/12210088/diff/1/net/test/local_test_server.h File net/test/local_test_server.h (right): https://codereview.chromium.org/12210088/diff/1/net/test/local_test_server.h#newcode33 net/test/local_test_server.h:33: // |document_root| must be an absolute path, or a ...
7 years, 10 months ago (2013-02-11 09:02:40 UTC) #2
Joao da Silva
@Pawel: I've made the TestServer require an absolute path. To make the refactoring easier I've ...
7 years, 10 months ago (2013-02-11 12:54:56 UTC) #3
Paweł Hajdan Jr.
7 years, 10 months ago (2013-02-11 15:36:53 UTC) #4
https://codereview.chromium.org/12210088/diff/7050/net/test/base_test_server.cc
File net/test/base_test_server.cc (right):

https://codereview.chromium.org/12210088/diff/7050/net/test/base_test_server....
net/test/base_test_server.cc:210: CHECK(PathService::Get(base::DIR_SOURCE_ROOT,
&src_dir));
Is it really needed to create a wrapper like that around PathService?

https://codereview.chromium.org/12210088/diff/7050/net/test/base_test_server....
net/test/base_test_server.cc:216: return
GetSourcePath().Append(FILE_PATH_LITERAL("chrome/test/data"));
net shouldn't know about chrome

https://codereview.chromium.org/12210088/diff/7050/net/test/base_test_server.h
File net/test/base_test_server.h (right):

https://codereview.chromium.org/12210088/diff/7050/net/test/base_test_server....
net/test/base_test_server.h:175: static base::FilePath GetSourcePath();
nit: These need comments.

https://codereview.chromium.org/12210088/diff/7050/net/test/remote_test_server.h
File net/test/remote_test_server.h (right):

https://codereview.chromium.org/12210088/diff/7050/net/test/remote_test_serve...
net/test/remote_test_server.h:21: // |document_root| must be an absolute path.
I just realized this may be a problem for the use case of RemoteTestServer. Make
sure people using it are OK with this.

Powered by Google App Engine
This is Rietveld 408576698