Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: ppapi/native_client/tools/browser_tester/browser_tester.py

Issue 880053003: Remove obsolete sandbox disabling logic from testing/test_env.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nacl callsite Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | testing/test_env.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/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 import glob 6 import glob
7 import optparse 7 import optparse
8 import os.path 8 import os.path
9 import socket 9 import socket
10 import sys 10 import sys
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 # Tests, such as run_inbrowser_trusted_crash_in_startup_test, may not use the 200 # Tests, such as run_inbrowser_trusted_crash_in_startup_test, may not use the
201 # RunFromCommand line entry point - and otherwise get stuck in an infinite 201 # RunFromCommand line entry point - and otherwise get stuck in an infinite
202 # loop when something goes wrong and the hard timeout is not set. 202 # loop when something goes wrong and the hard timeout is not set.
203 # http://code.google.com/p/chromium/issues/detail?id=105406 203 # http://code.google.com/p/chromium/issues/detail?id=105406
204 if options.hard_timeout is None: 204 if options.hard_timeout is None:
205 options.hard_timeout = options.timeout * 4 205 options.hard_timeout = options.timeout * 4
206 206
207 options.files.append(os.path.join(script_dir, 'browserdata', 'nacltest.js')) 207 options.files.append(os.path.join(script_dir, 'browserdata', 'nacltest.js'))
208 208
209 # Setup the environment with the setuid sandbox path. 209 # Setup the environment with the setuid sandbox path.
210 os.environ.update(test_env.get_sandbox_env(sys.argv, os.environ)) 210 os.environ.update(test_env.get_sandbox_env(os.environ))
211 211
212 # Create server 212 # Create server
213 host = GetHostName() 213 host = GetHostName()
214 try: 214 try:
215 server = browsertester.server.Create(host, options.port) 215 server = browsertester.server.Create(host, options.port)
216 except Exception: 216 except Exception:
217 sys.stdout.write('Could not bind %r, falling back to localhost.\n' % host) 217 sys.stdout.write('Could not bind %r, falling back to localhost.\n' % host)
218 server = browsertester.server.Create('localhost', options.port) 218 server = browsertester.server.Create('localhost', options.port)
219 219
220 # If port 0 has been requested, an arbitrary port will be bound so we need to 220 # If port 0 has been requested, an arbitrary port will be bound so we need to
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 # Validate the URL 391 # Validate the URL
392 url = options.url 392 url = options.url
393 if url is None: 393 if url is None:
394 parser.error('Must specify a URL') 394 parser.error('Must specify a URL')
395 395
396 return Run(url, options) 396 return Run(url, options)
397 397
398 398
399 if __name__ == '__main__': 399 if __name__ == '__main__':
400 sys.exit(RunFromCommandLine()) 400 sys.exit(RunFromCommandLine())
OLDNEW
« no previous file with comments | « no previous file | testing/test_env.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698