OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 import sys |
5 import time | 6 import time |
6 | 7 |
7 print 'child2' | 8 |
8 # Introduce a race condition with the parent so the parent may have a chance | 9 def main(): |
9 # to exit before the child. Will be random. | 10 print 'child2' |
10 time.sleep(.01) | 11 # Introduce a race condition with the parent so the parent may have a chance |
11 # Do not do anything with it. | 12 # to exit before the child. Will be random. |
12 open('test_file.txt') | 13 time.sleep(.01) |
| 14 # Do not do anything with it. |
| 15 open('test_file.txt') |
| 16 # Check for case-insensitive file system. This happens on Windows and OSX. |
| 17 try: |
| 18 open('Test_File.txt') |
| 19 except OSError: |
| 20 # Pass on other OSes since this code assumes only win32 has case-insensitive |
| 21 # path. This is not strictly true. |
| 22 if sys.platform not in ('darwin', 'win32'): |
| 23 raise |
| 24 |
| 25 |
| 26 if __name__ == '__main__': |
| 27 sys.exit(main()) |
OLD | NEW |