Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/python2.4 | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2008 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 """Does scraping for all known versions of IE.""" | 6 """Does scraping for all known versions of IE.""" |
| 7 | 7 |
| 8 import pywintypes | 8 import pywintypes |
| 9 import time | 9 import time |
| 10 import types | 10 import types |
| 11 | 11 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 186 # we've probably got a crash | 186 # we've probably got a crash |
| 187 if proc: | 187 if proc: |
| 188 keyboard.TypeString(r"{\4}", use_modifiers=True) | 188 keyboard.TypeString(r"{\4}", use_modifiers=True) |
| 189 if not windowing.WaitForProcessExit(proc, timeout): | 189 if not windowing.WaitForProcessExit(proc, timeout): |
| 190 windowing.EndProcess(proc) | 190 windowing.EndProcess(proc) |
| 191 | 191 |
| 192 return ret | 192 return ret |
| 193 | 193 |
| 194 | 194 |
| 195 if __name__ == "__main__": | 195 if __name__ == "__main__": |
| 196 # We're being invoked rather than imported, so run some tests | 196 # We're being invoked rather than imported, so run some tests |
|
Alexander Potapenko
2011/11/24 07:53:02
missing main()
| |
| 197 path = r"c:\sitecompare\scrapes\ie7\7.0.5380.11" | 197 path = r"c:\sitecompare\scrapes\ie7\7.0.5380.11" |
| 198 windowing.PreparePath(path) | 198 windowing.PreparePath(path) |
| 199 | 199 |
| 200 # Scrape three sites and save the results | 200 # Scrape three sites and save the results |
| 201 Scrape( | 201 Scrape( |
| 202 ["http://www.microsoft.com", | 202 ["http://www.microsoft.com", |
| 203 "http://www.google.com", | 203 "http://www.google.com", |
| 204 "http://www.sun.com"], | 204 "http://www.sun.com"], |
| 205 path, (1024, 768), (0, 0)) | 205 path, (1024, 768), (0, 0)) |
| 206 | |
| OLD | NEW |