| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # -*- python -*- | 2 # -*- python -*- |
| 3 | 3 |
| 4 # Copyright 2010 The Native Client Authors. All rights reserved. | 4 # Copyright 2010 The Native Client Authors. All rights reserved. |
| 5 # Use of this source code is governed by a BSD-style license that can | 5 # Use of this source code is governed by a BSD-style license that can |
| 6 # be found in the LICENSE file. | 6 # be found in the LICENSE file. |
| 7 | 7 |
| 8 # Simple wrapper script for chrome to work around selenium bugs | 8 # Simple wrapper script for chrome to work around selenium bugs |
| 9 # and hide platform differences. | 9 # and hide platform differences. |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 a = a.replace('"', '') | 41 a = a.replace('"', '') |
| 42 argv_new.append(a) | 42 argv_new.append(a) |
| 43 argv_new += extra_args | 43 argv_new += extra_args |
| 44 logging.info('launching chrome: %s', repr(argv_new)) | 44 logging.info('launching chrome: %s', repr(argv_new)) |
| 45 os.execvp(chrome_browser_exe, argv_new) | 45 os.execvp(chrome_browser_exe, argv_new) |
| 46 | 46 |
| 47 | 47 |
| 48 ###################################################################### | 48 ###################################################################### |
| 49 # Linux Specific Definitions and Functions | 49 # Linux Specific Definitions and Functions |
| 50 ###################################################################### | 50 ###################################################################### |
| 51 PPAPI_MIME_TYPE = 'application/x-ppapi-nacl-srpc' | 51 PPAPI_MIME_TYPE = 'application/x-nacl' |
| 52 | 52 |
| 53 def StartChromeLinux(argv): | 53 def StartChromeLinux(argv): |
| 54 browser = os.getenv('CHROME_BROWSER_EXE', None) | 54 browser = os.getenv('CHROME_BROWSER_EXE', None) |
| 55 plugin = os.getenv('CHROME_PLUGIN_TYPE', None) | 55 plugin = os.getenv('CHROME_PLUGIN_TYPE', None) |
| 56 if plugin == 'npapi': | 56 if plugin == 'npapi': |
| 57 extra = ['--internal-nacl', | 57 extra = ['--internal-nacl', |
| 58 '--internal-pepper', | 58 '--internal-pepper', |
| 59 '--enable-gpu-plugin'] | 59 '--enable-gpu-plugin'] |
| 60 elif plugin == 'internal': | 60 elif plugin == 'internal': |
| 61 # not yet supported | 61 # not yet supported |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 if UNAME[0] == 'Linux': | 93 if UNAME[0] == 'Linux': |
| 94 StartChromeLinux(argv) | 94 StartChromeLinux(argv) |
| 95 # TODO(robertm): mac needs more work | 95 # TODO(robertm): mac needs more work |
| 96 # elif UNAME[0] == 'Darwin': | 96 # elif UNAME[0] == 'Darwin': |
| 97 # StartChromeMac(argv) | 97 # StartChromeMac(argv) |
| 98 else: | 98 else: |
| 99 logging.fatal('unsupport platform') | 99 logging.fatal('unsupport platform') |
| 100 | 100 |
| 101 if __name__ == '__main__': | 101 if __name__ == '__main__': |
| 102 sys.exit(main(sys.argv)) | 102 sys.exit(main(sys.argv)) |
| OLD | NEW |