OLD | NEW |
1 # Copyright (C) 2014 Google Inc. All rights reserved. | 1 # Copyright (C) 2014 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 26 matching lines...) Expand all Loading... |
37 if 'linux' in port_name: | 37 if 'linux' in port_name: |
38 return 'BrowserTestLinuxPort' | 38 return 'BrowserTestLinuxPort' |
39 elif 'mac' in port_name: | 39 elif 'mac' in port_name: |
40 return 'BrowserTestMacPort' | 40 return 'BrowserTestMacPort' |
41 elif 'win' in port_name: | 41 elif 'win' in port_name: |
42 return 'BrowserTestWinPort' | 42 return 'BrowserTestWinPort' |
43 return None | 43 return None |
44 | 44 |
45 | 45 |
46 class BrowserTestPortOverrides(object): | 46 class BrowserTestPortOverrides(object): |
| 47 |
47 """Set of overrides that every browser test platform port should have. This | 48 """Set of overrides that every browser test platform port should have. This |
48 class should not be instantiated as certain functions depend on base. Port | 49 class should not be instantiated as certain functions depend on base. Port |
49 to work.""" | 50 to work.""" |
| 51 |
50 def _driver_class(self): | 52 def _driver_class(self): |
51 return browser_test_driver.BrowserTestDriver | 53 return browser_test_driver.BrowserTestDriver |
52 | 54 |
53 def layout_tests_dir(self): | 55 def layout_tests_dir(self): |
54 """Overriden function from the base port class. Redirects everything | 56 """Overriden function from the base port class. Redirects everything |
55 to src/chrome/test/data/printing/layout_tests. | 57 to src/chrome/test/data/printing/layout_tests. |
56 """ | 58 """ |
57 return self.path_from_chromium_base('chrome', 'test', 'data', 'printing'
, 'layout_tests') # pylint: disable=E1101 | 59 return self.path_from_chromium_base('chrome', 'test', 'data', 'printing'
, 'layout_tests') # pylint: disable=E1101 |
58 | 60 |
59 def check_sys_deps(self, needs_http): | 61 def check_sys_deps(self, needs_http): |
(...skipping 10 matching lines...) Expand all Loading... |
70 # Debug is usually 2x-3x slower than Release. | 72 # Debug is usually 2x-3x slower than Release. |
71 return 3 * timeout_ms | 73 return 3 * timeout_ms |
72 return timeout_ms | 74 return timeout_ms |
73 | 75 |
74 | 76 |
75 class BrowserTestLinuxPort(BrowserTestPortOverrides, linux.LinuxPort): | 77 class BrowserTestLinuxPort(BrowserTestPortOverrides, linux.LinuxPort): |
76 pass | 78 pass |
77 | 79 |
78 | 80 |
79 class BrowserTestMacPort(BrowserTestPortOverrides, mac.MacPort): | 81 class BrowserTestMacPort(BrowserTestPortOverrides, mac.MacPort): |
| 82 |
80 def _path_to_driver(self, configuration=None): | 83 def _path_to_driver(self, configuration=None): |
81 return self._build_path_with_configuration(configuration, self.driver_na
me()) | 84 return self._build_path_with_configuration(configuration, self.driver_na
me()) |
82 | 85 |
83 def default_timeout_ms(self): | 86 def default_timeout_ms(self): |
84 timeout_ms = 20 * 1000 | 87 timeout_ms = 20 * 1000 |
85 if self.get_option('configuration') == 'Debug': # pylint: disable=E1101 | 88 if self.get_option('configuration') == 'Debug': # pylint: disable=E1101 |
86 # Debug is usually 2x-3x slower than Release. | 89 # Debug is usually 2x-3x slower than Release. |
87 return 3 * timeout_ms | 90 return 3 * timeout_ms |
88 return timeout_ms | 91 return timeout_ms |
89 | 92 |
90 | 93 |
91 class BrowserTestWinPort(BrowserTestPortOverrides, win.WinPort): | 94 class BrowserTestWinPort(BrowserTestPortOverrides, win.WinPort): |
| 95 |
92 def default_timeout_ms(self): | 96 def default_timeout_ms(self): |
93 timeout_ms = 20 * 1000 | 97 timeout_ms = 20 * 1000 |
94 if self.get_option('configuration') == 'Debug': # pylint: disable=E1101 | 98 if self.get_option('configuration') == 'Debug': # pylint: disable=E1101 |
95 # Debug is usually 2x-3x slower than Release. | 99 # Debug is usually 2x-3x slower than Release. |
96 return 3 * timeout_ms | 100 return 3 * timeout_ms |
97 return timeout_ms | 101 return timeout_ms |
OLD | NEW |