| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 command_with_spaces = "valgrind --smc-check=\"check with spaces!\" --foo
" | 57 command_with_spaces = "valgrind --smc-check=\"check with spaces!\" --foo
" |
| 58 expected_parse = ["valgrind", "--smc-check=check with spaces!", "--foo"] | 58 expected_parse = ["valgrind", "--smc-check=check with spaces!", "--foo"] |
| 59 self._assert_wrapper(command_with_spaces, expected_parse) | 59 self._assert_wrapper(command_with_spaces, expected_parse) |
| 60 | 60 |
| 61 def test_test_to_uri(self): | 61 def test_test_to_uri(self): |
| 62 port = self.make_port() | 62 port = self.make_port() |
| 63 driver = Driver(port, None, pixel_tests=False) | 63 driver = Driver(port, None, pixel_tests=False) |
| 64 self.assertEqual(driver.test_to_uri('foo/bar.html'), 'file://%s/foo/bar.
html' % port.layout_tests_dir()) | 64 self.assertEqual(driver.test_to_uri('foo/bar.html'), 'file://%s/foo/bar.
html' % port.layout_tests_dir()) |
| 65 self.assertEqual(driver.test_to_uri('http/tests/foo.html'), 'http://127.
0.0.1:8000/foo.html') | 65 self.assertEqual(driver.test_to_uri('http/tests/foo.html'), 'http://127.
0.0.1:8000/foo.html') |
| 66 self.assertEqual(driver.test_to_uri('http/tests/https/bar.html'), 'https
://127.0.0.1:8443/https/bar.html') | 66 self.assertEqual(driver.test_to_uri('http/tests/https/bar.html'), 'https
://127.0.0.1:8443/https/bar.html') |
| 67 self.assertEqual(driver.test_to_uri('http/tests/bar.https.html'), 'https
://127.0.0.1:8443/bar.https.html') |
| 68 self.assertEqual(driver.test_to_uri('http/tests/barhttps.html'), 'http:/
/127.0.0.1:8000/barhttps.html') |
| 67 | 69 |
| 68 def test_uri_to_test(self): | 70 def test_uri_to_test(self): |
| 69 port = self.make_port() | 71 port = self.make_port() |
| 70 driver = Driver(port, None, pixel_tests=False) | 72 driver = Driver(port, None, pixel_tests=False) |
| 71 self.assertEqual(driver.uri_to_test('file://%s/foo/bar.html' % port.layo
ut_tests_dir()), 'foo/bar.html') | 73 self.assertEqual(driver.uri_to_test('file://%s/foo/bar.html' % port.layo
ut_tests_dir()), 'foo/bar.html') |
| 72 self.assertEqual(driver.uri_to_test('http://127.0.0.1:8000/foo.html'), '
http/tests/foo.html') | 74 self.assertEqual(driver.uri_to_test('http://127.0.0.1:8000/foo.html'), '
http/tests/foo.html') |
| 73 self.assertEqual(driver.uri_to_test('https://127.0.0.1:8443/https/bar.ht
ml'), 'http/tests/https/bar.html') | 75 self.assertEqual(driver.uri_to_test('https://127.0.0.1:8443/https/bar.ht
ml'), 'http/tests/https/bar.html') |
| 76 self.assertEqual(driver.uri_to_test('https://127.0.0.1:8443/bar.https.ht
ml'), 'http/tests/bar.https.html') |
| 74 | 77 |
| 75 def test_read_block(self): | 78 def test_read_block(self): |
| 76 port = TestWebKitPort() | 79 port = TestWebKitPort() |
| 77 driver = Driver(port, 0, pixel_tests=False) | 80 driver = Driver(port, 0, pixel_tests=False) |
| 78 driver._server_process = MockServerProcess(lines=[ | 81 driver._server_process = MockServerProcess(lines=[ |
| 79 'ActualHash: foobar', | 82 'ActualHash: foobar', |
| 80 'Content-Type: my_type', | 83 'Content-Type: my_type', |
| 81 'Content-Transfer-Encoding: none', | 84 'Content-Transfer-Encoding: none', |
| 82 "#EOF", | 85 "#EOF", |
| 83 ]) | 86 ]) |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 last_tmpdir = port._filesystem.last_tmpdir | 237 last_tmpdir = port._filesystem.last_tmpdir |
| 235 driver._start(True, []) | 238 driver._start(True, []) |
| 236 self.assertFalse(port._filesystem.isdir(last_tmpdir)) | 239 self.assertFalse(port._filesystem.isdir(last_tmpdir)) |
| 237 | 240 |
| 238 def test_start_actually_starts(self): | 241 def test_start_actually_starts(self): |
| 239 port = TestWebKitPort() | 242 port = TestWebKitPort() |
| 240 port._server_process_constructor = MockServerProcess | 243 port._server_process_constructor = MockServerProcess |
| 241 driver = Driver(port, 0, pixel_tests=True) | 244 driver = Driver(port, 0, pixel_tests=True) |
| 242 driver.start(True, [], None) | 245 driver.start(True, [], None) |
| 243 self.assertTrue(driver._server_process.started) | 246 self.assertTrue(driver._server_process.started) |
| OLD | NEW |