| OLD | NEW |
| 1 # Copyright (C) 2012 Google Inc. All rights reserved. | 1 # Copyright (C) 2012 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 14 matching lines...) Expand all Loading... |
| 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | 28 |
| 29 """Integration tests for run_perf_tests.""" | 29 """Integration tests for run_perf_tests.""" |
| 30 | 30 |
| 31 import StringIO | 31 import StringIO |
| 32 import datetime | 32 import datetime |
| 33 import json | 33 import json |
| 34 import re | 34 import re |
| 35 import unittest2 as unittest | 35 from webkitpy.thirdparty import unittest2 as unittest |
| 36 | 36 |
| 37 from webkitpy.common.host_mock import MockHost | 37 from webkitpy.common.host_mock import MockHost |
| 38 from webkitpy.common.system.outputcapture import OutputCapture | 38 from webkitpy.common.system.outputcapture import OutputCapture |
| 39 from webkitpy.layout_tests.port.driver import DriverOutput | 39 from webkitpy.layout_tests.port.driver import DriverOutput |
| 40 from webkitpy.layout_tests.port.test import TestPort | 40 from webkitpy.layout_tests.port.test import TestPort |
| 41 from webkitpy.performance_tests.perftest import ChromiumStylePerfTest | 41 from webkitpy.performance_tests.perftest import ChromiumStylePerfTest |
| 42 from webkitpy.performance_tests.perftest import PerfTest | 42 from webkitpy.performance_tests.perftest import PerfTest |
| 43 from webkitpy.performance_tests.perftestsrunner import PerfTestsRunner | 43 from webkitpy.performance_tests.perftestsrunner import PerfTestsRunner |
| 44 | 44 |
| 45 | 45 |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 self._test_run_with_json_output(runner, port.host.filesystem, compare_lo
gs=False) | 574 self._test_run_with_json_output(runner, port.host.filesystem, compare_lo
gs=False) |
| 575 generated_json = json.loads(port.host.filesystem.files['/mock-checkout/o
utput.json']) | 575 generated_json = json.loads(port.host.filesystem.files['/mock-checkout/o
utput.json']) |
| 576 self.assertTrue(isinstance(generated_json, list)) | 576 self.assertTrue(isinstance(generated_json, list)) |
| 577 self.assertEqual(len(generated_json), 1) | 577 self.assertEqual(len(generated_json), 1) |
| 578 | 578 |
| 579 output = generated_json[0]['tests']['Bindings']['tests']['event-target-w
rapper']['metrics']['Time']['current'] | 579 output = generated_json[0]['tests']['Bindings']['tests']['event-target-w
rapper']['metrics']['Time']['current'] |
| 580 self.assertEqual(len(output), 3) | 580 self.assertEqual(len(output), 3) |
| 581 expectedMetrics = EventTargetWrapperTestData.results['metrics']['Time'][
'current'][0] | 581 expectedMetrics = EventTargetWrapperTestData.results['metrics']['Time'][
'current'][0] |
| 582 for metrics in output: | 582 for metrics in output: |
| 583 self.assertEqual(metrics, expectedMetrics) | 583 self.assertEqual(metrics, expectedMetrics) |
| OLD | NEW |