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

Unified Diff: Tools/Scripts/webkitpy/layout_tests/layout_tests_mover_unittest.py

Issue 546133003: Reformat webkitpy.layout_tests w/ format-webkitpy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Tools/Scripts/webkitpy/layout_tests/layout_tests_mover_unittest.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_tests_mover_unittest.py b/Tools/Scripts/webkitpy/layout_tests/layout_tests_mover_unittest.py
index 0c4efbc0cf5eaa0ff296653464cebf09ae5a36d5..d33204d09086447c5732b5729435d4bfeae817ba 100755
--- a/Tools/Scripts/webkitpy/layout_tests/layout_tests_mover_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_tests_mover_unittest.py
@@ -124,41 +124,79 @@ class LayoutTestsMoverTest(unittest.TestCase):
def test_moved_reference_in_moved_file_not_updated(self):
self._mover.move('origin/path', 'destination')
- self.assertTrue('src="local_script.js"' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.html')))
+ self.assertTrue(
+ 'src="local_script.js"' in self._filesystem.read_text_file(
+ self._port._absolute_path(
+ 'destination',
+ 'test.html')))
def test_unmoved_reference_in_unmoved_file_not_updated(self):
self._mover.move('origin/path', 'destination')
- self.assertTrue('src="local_script.js"' in self._filesystem.read_text_file(self._port._absolute_path('unmoved', 'test.html')))
+ self.assertTrue(
+ 'src="local_script.js"' in self._filesystem.read_text_file(
+ self._port._absolute_path(
+ 'unmoved',
+ 'test.html')))
def test_moved_reference_in_unmoved_file_is_updated(self):
self._mover.move('origin/path', 'destination')
- self.assertTrue('src="../destination/remote_script.js"' in self._filesystem.read_text_file(self._port._absolute_path('unmoved', 'test.html')))
+ self.assertTrue(
+ 'src="../destination/remote_script.js"' in self._filesystem.read_text_file(self._port._absolute_path('unmoved', 'test.html')))
def test_unmoved_reference_in_moved_file_is_updated(self):
self._mover.move('origin/path', 'destination')
- self.assertTrue('src="../unmoved/remote_script.js"' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.html')))
+ self.assertTrue(
+ 'src="../unmoved/remote_script.js"' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.html')))
def test_references_in_html_file_are_updated(self):
self._mover.move('origin/path', 'destination')
- self.assertTrue('src="../unmoved/remote_script.js"' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.html')))
- self.assertTrue('src=\'../unmoved/remote_script_single_quotes.js\'' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.html')))
- self.assertTrue('href="../unmoved/remote_script.js"' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.html')))
- self.assertTrue('href=\'../unmoved/remote_script_single_quotes.js\'' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.html')))
+ self.assertTrue(
+ 'src="../unmoved/remote_script.js"' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.html')))
+ self.assertTrue(
+ 'src=\'../unmoved/remote_script_single_quotes.js\'' in self._filesystem.read_text_file(
+ self._port._absolute_path(
+ 'destination',
+ 'test.html')))
+ self.assertTrue(
+ 'href="../unmoved/remote_script.js"' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.html')))
+ self.assertTrue(
+ 'href=\'../unmoved/remote_script_single_quotes.js\'' in self._filesystem.read_text_file(
+ self._port._absolute_path(
+ 'destination',
+ 'test.html')))
self.assertTrue('href=""' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.html')))
def test_references_in_css_file_are_updated(self):
self._mover.move('origin/path', 'destination')
- self.assertTrue('url(\'../unmoved/url_function.js\')' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.css')))
- self.assertTrue('url("../unmoved/url_function_double_quotes.js")' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.css')))
- self.assertTrue('url(../unmoved/url_function_no_quotes.js)' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.css')))
+ self.assertTrue(
+ 'url(\'../unmoved/url_function.js\')' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.css')))
+ self.assertTrue(
+ 'url("../unmoved/url_function_double_quotes.js")' in self._filesystem.read_text_file(
+ self._port._absolute_path(
+ 'destination',
+ 'test.css')))
+ self.assertTrue(
+ 'url(../unmoved/url_function_no_quotes.js)' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.css')))
self.assertTrue('url(\'\')' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.css')))
self.assertTrue('url()' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.css')))
def test_references_in_javascript_file_are_updated(self):
self._mover.move('origin/path', 'destination')
- self.assertTrue('importScripts(\'../unmoved/import_scripts_function.js\')' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.js')))
- self.assertTrue('importScripts("../unmoved/import_scripts_function_double_quotes.js")' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.js')))
- self.assertTrue('importScripts(\'\')' in self._filesystem.read_text_file(self._port._absolute_path('destination', 'test.js')))
+ self.assertTrue(
+ 'importScripts(\'../unmoved/import_scripts_function.js\')' in self._filesystem.read_text_file(
+ self._port._absolute_path(
+ 'destination',
+ 'test.js')))
+ self.assertTrue(
+ 'importScripts("../unmoved/import_scripts_function_double_quotes.js")' in self._filesystem.read_text_file(
+ self._port._absolute_path(
+ 'destination',
+ 'test.js')))
+ self.assertTrue(
+ 'importScripts(\'\')' in self._filesystem.read_text_file(
+ self._port._absolute_path(
+ 'destination',
+ 'test.js')))
def test_expectation_is_updated(self):
self._mover.move('origin/path', 'destination')
@@ -169,9 +207,12 @@ class LayoutTestsMoverTest(unittest.TestCase):
def test_directory_expectation_is_updated(self):
self._mover.move('origin/path', 'destination')
self.assertFalse('origin/path' in self._filesystem.read_text_file(self._port._absolute_path('TestExpectations')))
- self.assertTrue('crbug.com/42 [ Win ] destination [ Slow ]' in self._filesystem.read_text_file(self._port._absolute_path('TestExpectations')))
+ self.assertTrue(
+ 'crbug.com/42 [ Win ] destination [ Slow ]' in self._filesystem.read_text_file(self._port._absolute_path('TestExpectations')))
def test_expectation_is_added_when_subdirectory_moved(self):
self._mover.move('origin/path', 'destination')
- self.assertTrue('crbug.com/42 [ Release ] origin [ Crash ]' in self._filesystem.read_text_file(self._port._absolute_path('TestExpectations')))
- self.assertTrue('crbug.com/42 [ Release ] destination [ Crash ]' in self._filesystem.read_text_file(self._port._absolute_path('TestExpectations')))
+ self.assertTrue(
+ 'crbug.com/42 [ Release ] origin [ Crash ]' in self._filesystem.read_text_file(self._port._absolute_path('TestExpectations')))
+ self.assertTrue(
+ 'crbug.com/42 [ Release ] destination [ Crash ]' in self._filesystem.read_text_file(self._port._absolute_path('TestExpectations')))

Powered by Google App Engine
This is Rietveld 408576698