Diff
Modified: trunk/Tools/ChangeLog (104205 => 104206)
--- trunk/Tools/ChangeLog 2012-01-05 21:22:08 UTC (rev 104205)
+++ trunk/Tools/ChangeLog 2012-01-05 21:25:23 UTC (rev 104206)
@@ -1,3 +1,21 @@
+2012-01-05 Jochen Eisinger <[email protected]>
+
+ Replace webkitpy.common.system.filesystem.file_path_as_url with webkitpy.common.system.path.abspath_to_uri
+ https://bugs.webkit.org/show_bug.cgi?id=75617
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/common/system/filesystem.py:
+ (FileSystem.exists):
+ * Scripts/webkitpy/common/system/filesystem_mock.py:
+ (MockFileSystem.exists):
+ * Scripts/webkitpy/common/system/filesystem_unittest.py:
+ (GenericFileSystemTests.teardown_generic_test_dir):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.to.show_results_html_file):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_results_directory_absolute):
+
2012-01-05 Adam Roben <[email protected]>
Remove some unnecessary code from old-run-webkit-tests
Modified: trunk/Tools/Scripts/webkitpy/common/system/filesystem.py (104205 => 104206)
--- trunk/Tools/Scripts/webkitpy/common/system/filesystem.py 2012-01-05 21:22:08 UTC (rev 104205)
+++ trunk/Tools/Scripts/webkitpy/common/system/filesystem.py 2012-01-05 21:25:23 UTC (rev 104206)
@@ -40,7 +40,6 @@
import sys
import tempfile
import time
-from urllib import pathname2url
from webkitpy.common.system import ospath
@@ -83,9 +82,6 @@
def exists(self, path):
return os.path.exists(path)
- def file_path_as_url(self, path):
- return 'file://' + pathname2url(path)
-
def files_under(self, path, dirs_to_skip=[], file_filter=None):
"""Return the list of all files under the given path in topdown order.
Modified: trunk/Tools/Scripts/webkitpy/common/system/filesystem_mock.py (104205 => 104206)
--- trunk/Tools/Scripts/webkitpy/common/system/filesystem_mock.py 2012-01-05 21:22:08 UTC (rev 104205)
+++ trunk/Tools/Scripts/webkitpy/common/system/filesystem_mock.py 2012-01-05 21:25:23 UTC (rev 104206)
@@ -31,7 +31,6 @@
import hashlib
import os
import re
-from urllib import pathname2url
from webkitpy.common.system import path
from webkitpy.common.system import ospath
@@ -118,9 +117,6 @@
def exists(self, path):
return self.isfile(path) or self.isdir(path)
- def file_path_as_url(self, path):
- return 'file://' + pathname2url(path)
-
def files_under(self, path, dirs_to_skip=[], file_filter=None):
def filter_all(fs, dirpath, basename):
return True
Modified: trunk/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py (104205 => 104206)
--- trunk/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py 2012-01-05 21:22:08 UTC (rev 104205)
+++ trunk/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py 2012-01-05 21:25:23 UTC (rev 104206)
@@ -60,11 +60,6 @@
self.fs.chdir(self.orig_cwd)
self.generic_test_dir = None
- def test_file_path_as_url(self):
- fs = FileSystem()
- self.assertEqual(fs.file_path_as_url('/foo'),
- 'file:///foo')
-
def test_glob__trailing_asterisk(self):
self.fs.chdir(self.generic_test_dir)
self.assertEquals(set(self.fs.glob('fo*')), set(['foo.txt', 'foobar', 'foodir']))
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (104205 => 104206)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-01-05 21:22:08 UTC (rev 104205)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-01-05 21:25:23 UTC (rev 104206)
@@ -751,7 +751,7 @@
def show_results_html_file(self, results_filename):
"""This routine should display the HTML file pointed at by
results_filename in a users' browser."""
- return self.host.user.open_url(self._filesystem.file_path_as_url(results_filename))
+ return self.host.user.open_url(path.abspath_to_uri(results_filename))
def create_driver(self, worker_number):
"""Return a newly created Driver subclass for starting/stopping the test driver."""
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py (104205 => 104206)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py 2012-01-05 21:22:08 UTC (rev 104205)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py 2012-01-05 21:25:23 UTC (rev 104206)
@@ -44,6 +44,8 @@
import threading
import unittest
+from webkitpy.common.system import path
+
try:
import multiprocessing
except ImportError:
@@ -604,7 +606,7 @@
with host.filesystem.mkdtemp() as tmpdir:
res, out, err, user = logging_run(['--results-directory=' + str(tmpdir)],
tests_included=True, host=host)
- self.assertEqual(user.opened_urls, [host.filesystem.file_path_as_url(host.filesystem.join(tmpdir, 'results.html'))])
+ self.assertEqual(user.opened_urls, [path.abspath_to_uri(host.filesystem.join(tmpdir, 'results.html'))])
def test_results_directory_default(self):
# We run a configuration that should fail, to generate output, then