| Index: chrome/test/pyautolib/pyauto.py
|
| diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
|
| index dce9741ea025af71d62a3e028a09d3edcb26282a..a0f0828ac3f38b57401e687ad7eb709c6e9c0ebf 100755
|
| --- a/chrome/test/pyautolib/pyauto.py
|
| +++ b/chrome/test/pyautolib/pyauto.py
|
| @@ -851,9 +851,11 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
|
| Returns:
|
| handle to FTP Server, an instance of TestServer
|
| """
|
| + source_dir = os.path.normpath(pyauto_paths.GetSourceDir())
|
| + path = os.path.join(source_dir, data_dir)
|
| ftp_server = pyautolib.TestServer(pyautolib.TestServer.TYPE_FTP,
|
| '127.0.0.1',
|
| - pyautolib.FilePath(data_dir))
|
| + pyautolib.FilePath(path))
|
| assert ftp_server.Start(), 'Could not start ftp server'
|
| logging.debug('Started ftp server at "%s".', data_dir)
|
| return ftp_server
|
| @@ -874,9 +876,11 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
|
| Returns:
|
| handle to the HTTP TestServer
|
| """
|
| + source_dir = os.path.normpath(pyauto_paths.GetSourceDir())
|
| + path = os.path.join(source_dir, data_dir)
|
| http_server = pyautolib.TestServer(pyautolib.TestServer.TYPE_HTTP,
|
| '127.0.0.1',
|
| - pyautolib.FilePath(data_dir))
|
| + pyautolib.FilePath(path))
|
| assert http_server.Start(), 'Could not start HTTP server'
|
| logging.debug('Started HTTP server at "%s".', data_dir)
|
| return http_server
|
| @@ -898,10 +902,12 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
|
| Returns:
|
| Handle to the HTTPS TestServer
|
| """
|
| + source_dir = os.path.normpath(pyauto_paths.GetSourceDir())
|
| + path = os.path.join(source_dir, data_dir)
|
| https_server = pyautolib.TestServer(
|
| pyautolib.TestServer.TYPE_HTTPS,
|
| pyautolib.SSLOptions(cert_type),
|
| - pyautolib.FilePath(data_dir))
|
| + pyautolib.FilePath(path))
|
| assert https_server.Start(), 'Could not start HTTPS server.'
|
| logging.debug('Start HTTPS server at "%s".' % data_dir)
|
| return https_server
|
| @@ -5851,9 +5857,11 @@ class PyUITestSuite(pyautolib.PyUITestSuiteBase, unittest.TestSuite):
|
| global _HTTP_SERVER
|
| assert not _HTTP_SERVER, 'HTTP Server already started'
|
| http_data_dir = _OPTIONS.http_data_dir
|
| + source_dir = os.path.normpath(pyauto_paths.GetSourceDir())
|
| + path = os.path.join(source_dir, http_data_dir)
|
| http_server = pyautolib.TestServer(pyautolib.TestServer.TYPE_HTTP,
|
| '127.0.0.1',
|
| - pyautolib.FilePath(http_data_dir))
|
| + pyautolib.FilePath(path))
|
| assert http_server.Start(), 'Could not start http server'
|
| _HTTP_SERVER = http_server
|
| logging.debug('Started http server at "%s".', http_data_dir)
|
|
|