OLD | NEW |
1 #!/usr/bin/python2.4 | 1 #!/usr/bin/python2.4 |
2 # Copyright 2009, Google Inc. | 2 # Copyright 2009, Google Inc. |
3 # All rights reserved. | 3 # All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 # Default path where screenshots will be stored. | 44 # Default path where screenshots will be stored. |
45 DEFAULT_SCREENSHOT_PATH = os.path.join(o3d_dir, | 45 DEFAULT_SCREENSHOT_PATH = os.path.join(o3d_dir, |
46 "tests", | 46 "tests", |
47 "selenium", | 47 "selenium", |
48 "screenshots") | 48 "screenshots") |
49 | 49 |
50 # Path where reference screenshots will be stored. | 50 # Path where reference screenshots will be stored. |
51 # Unfortunately we need separate reference images for certain platforms | 51 # Unfortunately we need separate reference images for certain platforms |
52 # for certain tests. | 52 # for certain tests. |
| 53 DEFAULT_SCREENSHOT_DIR = "reference" |
53 if sys.platform == "darwin": | 54 if sys.platform == "darwin": |
54 PLATFORM_SCREENSHOT_DIR = "reference-mac" | 55 PLATFORM_SCREENSHOT_DIR = "reference-mac" |
55 elif sys.platform[:5] == "linux": | 56 elif sys.platform[:5] == "linux": |
56 PLATFORM_SCREENSHOT_DIR = "reference-linux" | 57 PLATFORM_SCREENSHOT_DIR = "reference-linux" |
57 elif sys.platform == "win32" or sys.platform == "cygwin": | 58 elif sys.platform == "win32" or sys.platform == "cygwin": |
58 PLATFORM_SCREENSHOT_DIR = "reference-win" | 59 PLATFORM_SCREENSHOT_DIR = "reference-win" |
59 else: | 60 else: |
60 raise Exception, 'Platform %s not supported' % sys.platform | 61 raise Exception, 'Platform %s not supported' % sys.platform |
61 | 62 |
62 | 63 |
63 | 64 |
64 SELENIUM_BROWSER_SET = ["*iexplore", "*firefox", "*googlechrome", "*safari"] | 65 SELENIUM_BROWSER_SET = ["*iexplore", "*firefox", "*googlechrome", "*safari"] |
65 | 66 |
66 # Dimensions to resize window to | 67 # Dimensions to resize window to |
67 # on the Mac, the window has to be big enough to hold the entire o3d div | 68 # on the Mac, the window has to be big enough to hold the entire o3d div |
68 # otherwise the OpenGL context will be clipped to the size of the window | 69 # otherwise the OpenGL context will be clipped to the size of the window |
69 RESIZE_WIDTH = 1400 | 70 RESIZE_WIDTH = 1400 |
70 RESIZE_HEIGHT = 1200 | 71 RESIZE_HEIGHT = 1200 |
| 72 |
| 73 # Time to wait (after load timeout) till assume the browser has crashed. |
| 74 MAX_SELENIUM_TEST_TIME = 60 |
OLD | NEW |