| Index: tools/site_compare/scrapers/chrome/chromebase.py
|
| diff --git a/tools/site_compare/scrapers/chrome/chromebase.py b/tools/site_compare/scrapers/chrome/chromebase.py
|
| old mode 100644
|
| new mode 100755
|
| index aba17c11decaba68468d036ffe653fe09f01cb15..2b8f1774cc44b424186672c25f6407dd88969256
|
| --- a/tools/site_compare/scrapers/chrome/chromebase.py
|
| +++ b/tools/site_compare/scrapers/chrome/chromebase.py
|
| @@ -1,5 +1,5 @@
|
| -#!/usr/bin/python2.4
|
| -# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
| +#!/usr/bin/env python
|
| +# Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| @@ -12,10 +12,12 @@ from drivers import keyboard
|
| from drivers import mouse
|
| from drivers import windowing
|
|
|
| +
|
| # TODO: this has moved, use some logic to find it. For now,
|
| # expects a subst k:.
|
| DEFAULT_PATH = r"k:\chrome.exe"
|
|
|
| +
|
| def InvokeBrowser(path):
|
| """Invoke the Chrome browser.
|
|
|
| @@ -179,7 +181,7 @@ def Time(urls, size, timeout, kwargs):
|
| return ret
|
|
|
|
|
| -if __name__ == "__main__":
|
| +def main():
|
| # We're being invoked rather than imported, so run some tests
|
| path = r"c:\sitecompare\scrapes\chrome\0.1.97.0"
|
| windowing.PreparePath(path)
|
| @@ -190,4 +192,8 @@ if __name__ == "__main__":
|
| "http://www.google.com",
|
| "http://www.sun.com"],
|
| path, (1024, 768), (0, 0))
|
| + return 0
|
|
|
| +
|
| +if __name__ == "__main__":
|
| + sys.exit(main())
|
|
|