OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """End to end tests for ChromeDriver.""" | 6 """End to end tests for ChromeDriver.""" |
7 | 7 |
8 import base64 | 8 import base64 |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 # Desktop doesn't support TAP. | 65 # Desktop doesn't support TAP. |
66 'ChromeDriverTest.testSingleTapElement', | 66 'ChromeDriverTest.testSingleTapElement', |
67 ] | 67 ] |
68 ) | 68 ) |
69 _DESKTOP_NEGATIVE_FILTER['28'] = ( | 69 _DESKTOP_NEGATIVE_FILTER['28'] = ( |
70 _DESKTOP_NEGATIVE_FILTER['HEAD'] + [] | 70 _DESKTOP_NEGATIVE_FILTER['HEAD'] + [] |
71 ) | 71 ) |
72 _DESKTOP_NEGATIVE_FILTER['27'] = ( | 72 _DESKTOP_NEGATIVE_FILTER['27'] = ( |
73 _DESKTOP_NEGATIVE_FILTER['HEAD'] + [] | 73 _DESKTOP_NEGATIVE_FILTER['HEAD'] + [] |
74 ) | 74 ) |
75 _DESKTOP_NEGATIVE_FILTER['26'] = ( | |
76 _DESKTOP_NEGATIVE_FILTER['HEAD'] + [] | |
77 ) | |
78 | 75 |
79 | 76 |
80 _ANDROID_NEGATIVE_FILTER = {} | 77 _ANDROID_NEGATIVE_FILTER = {} |
81 _ANDROID_NEGATIVE_FILTER['com.google.android.apps.chrome'] = ( | 78 _ANDROID_NEGATIVE_FILTER['com.google.android.apps.chrome'] = ( |
82 _DESKTOP_NEGATIVE_FILTER['HEAD'] + [ | 79 _DESKTOP_NEGATIVE_FILTER['HEAD'] + [ |
83 # Android doesn't support switches and extensions. | 80 # Android doesn't support switches and extensions. |
84 'ChromeSwitchesCapabilityTest.*', | 81 'ChromeSwitchesCapabilityTest.*', |
85 'ChromeExtensionsCapabilityTest.*', | 82 'ChromeExtensionsCapabilityTest.*', |
86 # https://code.google.com/p/chromedriver/issues/detail?id=262 | 83 # https://code.google.com/p/chromedriver/issues/detail?id=262 |
87 'ChromeDriverTest.testCloseWindow', | 84 'ChromeDriverTest.testCloseWindow', |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 negative_filter = _DESKTOP_NEGATIVE_FILTER[options.chrome_version] | 647 negative_filter = _DESKTOP_NEGATIVE_FILTER[options.chrome_version] |
651 options.filter = '*-' + ':__main__.'.join([''] + negative_filter) | 648 options.filter = '*-' + ':__main__.'.join([''] + negative_filter) |
652 | 649 |
653 all_tests_suite = unittest.defaultTestLoader.loadTestsFromModule( | 650 all_tests_suite = unittest.defaultTestLoader.loadTestsFromModule( |
654 sys.modules[__name__]) | 651 sys.modules[__name__]) |
655 tests = unittest_util.FilterTestSuite(all_tests_suite, options.filter) | 652 tests = unittest_util.FilterTestSuite(all_tests_suite, options.filter) |
656 ChromeDriverTest.GlobalSetUp() | 653 ChromeDriverTest.GlobalSetUp() |
657 result = unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run(tests) | 654 result = unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run(tests) |
658 ChromeDriverTest.GlobalTearDown() | 655 ChromeDriverTest.GlobalTearDown() |
659 sys.exit(len(result.failures) + len(result.errors)) | 656 sys.exit(len(result.failures) + len(result.errors)) |
OLD | NEW |