OLD | NEW |
1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze
ged | 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze
ged |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... |
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 | 29 |
30 """Unit tests for manager.py.""" | 30 """Unit tests for manager.py.""" |
31 | 31 |
32 import sys | 32 import sys |
33 import time | 33 import time |
34 import webkitpy.thirdparty.unittest2 as unittest | 34 import unittest |
35 | 35 |
36 from webkitpy.common.host_mock import MockHost | 36 from webkitpy.common.host_mock import MockHost |
37 from webkitpy.layout_tests.controllers.manager import Manager | 37 from webkitpy.layout_tests.controllers.manager import Manager |
38 from webkitpy.layout_tests.models import test_expectations | 38 from webkitpy.layout_tests.models import test_expectations |
39 from webkitpy.layout_tests.models.test_run_results import TestRunResults | 39 from webkitpy.layout_tests.models.test_run_results import TestRunResults |
40 from webkitpy.thirdparty.mock import Mock | 40 from webkitpy.thirdparty.mock import Mock |
41 from webkitpy.tool.mocktool import MockOptions | 41 from webkitpy.tool.mocktool import MockOptions |
42 | 42 |
43 | 43 |
44 class ManagerTest(unittest.TestCase): | 44 class ManagerTest(unittest.TestCase): |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 port = host.port_factory.get('test-mac-leopard') | 111 port = host.port_factory.get('test-mac-leopard') |
112 manager = Manager(port, options=MockOptions(test_list=None, http=Tru
e, max_locked_shards=1), printer=Mock()) | 112 manager = Manager(port, options=MockOptions(test_list=None, http=Tru
e, max_locked_shards=1), printer=Mock()) |
113 return manager | 113 return manager |
114 host = MockHost() | 114 host = MockHost() |
115 port = host.port_factory.get('test-mac-leopard') | 115 port = host.port_factory.get('test-mac-leopard') |
116 tests = ['failures/expected/crash.html'] | 116 tests = ['failures/expected/crash.html'] |
117 expectations = test_expectations.TestExpectations(port, tests) | 117 expectations = test_expectations.TestExpectations(port, tests) |
118 run_results = TestRunResults(expectations, len(tests)) | 118 run_results = TestRunResults(expectations, len(tests)) |
119 manager = get_manager() | 119 manager = get_manager() |
120 manager._look_for_new_crash_logs(run_results, time.time()) | 120 manager._look_for_new_crash_logs(run_results, time.time()) |
OLD | NEW |