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

Side by Side Diff: tools/testing/frogpad/frogpad.py

Issue 9663025: add xvfb (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 7
8 """ 8 """
9 Frogpad is used to compile .dart files to javascript. 9 Frogpad is used to compile .dart files to javascript.
10 10
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 def generate_js(self): 229 def generate_js(self):
230 drt = os.path.join(self.dart_dir, "client/tests/drt/DumpRenderTree") 230 drt = os.path.join(self.dart_dir, "client/tests/drt/DumpRenderTree")
231 if platform.system() == 'Darwin': 231 if platform.system() == 'Darwin':
232 drt += ".app" 232 drt += ".app"
233 elif platform.system() == 'Windows': 233 elif platform.system() == 'Windows':
234 raise Exception("frogpad does not run on Windows") 234 raise Exception("frogpad does not run on Windows")
235 235
236 check_exists(drt) 236 check_exists(drt)
237 args = [] 237 args = []
238 args.append("xvfb-run")
239 args.append("-a")
238 args.append(drt) 240 args.append(drt)
239 args.append(self.html_file) 241 args.append(self.html_file)
240 242
241 stdout = run_command(args) 243 stdout = run_command(args)
242 match = OUTPUT_JAVASCRIPT_REGEX.match(stdout) 244 match = OUTPUT_JAVASCRIPT_REGEX.match(stdout)
243 if not match: 245 if not match:
244 raise Exception("can't find regex in DumpRenderTree output") 246 raise Exception("can't find regex in DumpRenderTree output")
245 return match.group(1) 247 return match.group(1)
246 248
247 @staticmethod 249 @staticmethod
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 raise CommandFailedException(msg) 361 raise CommandFailedException(msg)
360 logging.debug("SUCCEEDED (%d bytes)" % len(stdout)) 362 logging.debug("SUCCEEDED (%d bytes)" % len(stdout))
361 return stdout 363 return stdout
362 364
363 365
364 def main(argv): 366 def main(argv):
365 Pad(argv) 367 Pad(argv)
366 368
367 if __name__ == "__main__": 369 if __name__ == "__main__":
368 sys.exit(main(sys.argv)) 370 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698