| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """ | 5 """ |
| 6 Recipe for running WebView CTS using system WebView. | 6 Recipe for running WebView CTS using system WebView. |
| 7 """ | 7 """ |
| 8 DEPS = [ | 8 DEPS = [ |
| 9 'adb', | 9 'adb', |
| 10 'bot_update', | 10 'bot_update', |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 for failed_class in failed_classes: | 110 for failed_class in failed_classes: |
| 111 failed_class_name = 'android.webkit.cts.' + failed_class.get('name') | 111 failed_class_name = 'android.webkit.cts.' + failed_class.get('name') |
| 112 if failed_class_name not in EXPECTED_FAILURE: | 112 if failed_class_name not in EXPECTED_FAILURE: |
| 113 api.step.active_result.presentation.status = api.step.FAILURE | 113 api.step.active_result.presentation.status = api.step.FAILURE |
| 114 continue | 114 continue |
| 115 failed_methods = failed_class.findall('Test/FailedScene/..') | 115 failed_methods = failed_class.findall('Test/FailedScene/..') |
| 116 for failed_method in failed_methods: | 116 for failed_method in failed_methods: |
| 117 if failed_method.get('name') not in EXPECTED_FAILURE[failed_class_name]: | 117 if failed_method.get('name') not in EXPECTED_FAILURE[failed_class_name]: |
| 118 api.step.active_result.presentation.status = api.step.FAILURE | 118 api.step.active_result.presentation.status = api.step.FAILURE |
| 119 | 119 |
| 120 api.chromium_android.logcat_dump() | 120 logcat_file = api.chromium.output_dir.join('full_logcat') |
| 121 api.chromium_android.stack_tool_steps() | 121 api.chromium_android.logcat_dump(output_logcat_file=logcat_file) |
| 122 api.chromium_android.stack_tool_steps(logcat_file=logcat_file) |
| 122 api.chromium_android.test_report() | 123 api.chromium_android.test_report() |
| 123 | 124 |
| 124 def GenTests(api): | 125 def GenTests(api): |
| 125 result_xml_with_unexecuted_tests = """<TestResult> | 126 result_xml_with_unexecuted_tests = """<TestResult> |
| 126 <TestPackage> | 127 <TestPackage> |
| 127 <TestSuite name='android'> | 128 <TestSuite name='android'> |
| 128 <TestSuite name='webkit'> | 129 <TestSuite name='webkit'> |
| 129 <TestSuite name='cts'> | 130 <TestSuite name='cts'> |
| 130 <TestCase name='WebSettingsTest'> | 131 <TestCase name='WebSettingsTest'> |
| 131 <Test name='test' result='notExecuted'> | 132 <Test name='test' result='notExecuted'> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 api.override_step_data('Read test result and report failures', | 216 api.override_step_data('Read test result and report failures', |
| 216 api.raw_io.output(result_xml_with_unexpected_failure_method)) + \ | 217 api.raw_io.output(result_xml_with_unexpected_failure_method)) + \ |
| 217 api.properties.generic(mastername='chromium.android') | 218 api.properties.generic(mastername='chromium.android') |
| 218 | 219 |
| 219 yield api.test('Test_parsing_invalid_cts_output') + \ | 220 yield api.test('Test_parsing_invalid_cts_output') + \ |
| 220 api.override_step_data('Run Cts', api.raw_io.stream_output( | 221 api.override_step_data('Run Cts', api.raw_io.stream_output( |
| 221 'Invalid CTS output here...', | 222 'Invalid CTS output here...', |
| 222 stream='stdout')) + \ | 223 stream='stdout')) + \ |
| 223 api.properties.generic(mastername='chromium.android') + \ | 224 api.properties.generic(mastername='chromium.android') + \ |
| 224 api.expect_exception('Exception') | 225 api.expect_exception('Exception') |
| OLD | NEW |