| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 def test_creating_a_port_does_not_write_to_the_filesystem(self): | 213 def test_creating_a_port_does_not_write_to_the_filesystem(self): |
| 214 port = TestWebKitPort() | 214 port = TestWebKitPort() |
| 215 driver = Driver(port, 0, pixel_tests=True) | 215 driver = Driver(port, 0, pixel_tests=True) |
| 216 self.assertEqual(port._filesystem.written_files, {}) | 216 self.assertEqual(port._filesystem.written_files, {}) |
| 217 self.assertEqual(port._filesystem.last_tmpdir, None) | 217 self.assertEqual(port._filesystem.last_tmpdir, None) |
| 218 | 218 |
| 219 def test_stop_cleans_up_properly(self): | 219 def test_stop_cleans_up_properly(self): |
| 220 port = TestWebKitPort() | 220 port = TestWebKitPort() |
| 221 port._server_process_constructor = MockServerProcess | 221 port._server_process_constructor = MockServerProcess |
| 222 driver = Driver(port, 0, pixel_tests=True) | 222 driver = Driver(port, 0, pixel_tests=True) |
| 223 driver.start(True, [], None) | 223 driver.start(True, []) |
| 224 last_tmpdir = port._filesystem.last_tmpdir | 224 last_tmpdir = port._filesystem.last_tmpdir |
| 225 self.assertNotEquals(last_tmpdir, None) | 225 self.assertNotEquals(last_tmpdir, None) |
| 226 driver.stop() | 226 driver.stop() |
| 227 self.assertFalse(port._filesystem.isdir(last_tmpdir)) | 227 self.assertFalse(port._filesystem.isdir(last_tmpdir)) |
| 228 | 228 |
| 229 def test_two_starts_cleans_up_properly(self): | 229 def test_two_starts_cleans_up_properly(self): |
| 230 port = TestWebKitPort() | 230 port = TestWebKitPort() |
| 231 port._server_process_constructor = MockServerProcess | 231 port._server_process_constructor = MockServerProcess |
| 232 driver = Driver(port, 0, pixel_tests=True) | 232 driver = Driver(port, 0, pixel_tests=True) |
| 233 driver.start(True, [], None) | 233 driver.start(True, []) |
| 234 last_tmpdir = port._filesystem.last_tmpdir | 234 last_tmpdir = port._filesystem.last_tmpdir |
| 235 driver._start(True, []) | 235 driver._start(True, []) |
| 236 self.assertFalse(port._filesystem.isdir(last_tmpdir)) | 236 self.assertFalse(port._filesystem.isdir(last_tmpdir)) |
| 237 | 237 |
| 238 def test_start_actually_starts(self): | 238 def test_start_actually_starts(self): |
| 239 port = TestWebKitPort() | 239 port = TestWebKitPort() |
| 240 port._server_process_constructor = MockServerProcess | 240 port._server_process_constructor = MockServerProcess |
| 241 driver = Driver(port, 0, pixel_tests=True) | 241 driver = Driver(port, 0, pixel_tests=True) |
| 242 driver.start(True, [], None) | 242 driver.start(True, []) |
| 243 self.assertTrue(driver._server_process.started) | 243 self.assertTrue(driver._server_process.started) |
| OLD | NEW |