Add ICU message format support
[chromium-blink-merge.git] / tools / site_compare / scrapers / chrome / chrome011010.py
blob6f0dfb4bf7c0e7f3349eb766d7da9c0026bb996f
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 """Does scraping for versions of Chrome from 0.1.101.0 up."""
7 from drivers import windowing
9 import chromebase
11 # Default version
12 version = "0.1.101.0"
15 def GetChromeRenderPane(wnd):
16 return windowing.FindChildWindow(wnd, "Chrome_TabContents")
19 def Scrape(urls, outdir, size, pos, timeout=20, **kwargs):
20 """Invoke a browser, send it to a series of URLs, and save its output.
22 Args:
23 urls: list of URLs to scrape
24 outdir: directory to place output
25 size: size of browser window to use
26 pos: position of browser window
27 timeout: amount of time to wait for page to load
28 kwargs: miscellaneous keyword args
30 Returns:
31 None if succeeded, else an error code
32 """
33 chromebase.GetChromeRenderPane = GetChromeRenderPane
35 return chromebase.Scrape(urls, outdir, size, pos, timeout, kwargs)
38 def Time(urls, size, timeout, **kwargs):
39 """Forwards the Time command to chromebase."""
40 chromebase.GetChromeRenderPane = GetChromeRenderPane
42 return chromebase.Time(urls, size, timeout, kwargs)