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

Side by Side Diff: tools/chrome_proxy/webdriver/simple_smoke.py

Issue 2554383002: Add timeouts to LoadPage and ExecJavascipt. (Closed)
Patch Set: Fix nit. Created 4 years 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 | « tools/chrome_proxy/webdriver/common.py ('k') | 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 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import time 5 import time
6 6
7 from common import IntegrationTest 7 from common import IntegrationTest
8 from common import TestDriver 8 from common import TestDriver
9 9
10 10
11 class SimpleSmoke(IntegrationTest): 11 class SimpleSmoke(IntegrationTest):
12 12
13 # Simple example integration test. 13 # Simple example integration test.
14 def TestCheckPageWithProxy(self): 14 def TestCheckPageWithProxy(self):
15 with TestDriver() as t: 15 with TestDriver() as t:
16 t.AddChromeArgs(['--enable-spdy-proxy-auth']) 16 t.AddChromeArgs(['--enable-spdy-proxy-auth'])
17 t.SetURL('http://check.googlezip.net/test.html') 17 t.SetURL('http://check.googlezip.net/test.html')
18 t.LoadPage() 18 t.LoadPage()
19 print 'Document Title: ', t.ExecuteJavascript('document.title') 19 print 'Document Title: ', t.ExecuteJavascriptStatement('document.title',
20 timeout=1)
20 time.sleep(5) 21 time.sleep(5)
21 responses = t.GetHTTPResponses() 22 responses = t.GetHTTPResponses()
22 for response in responses: 23 for response in responses:
23 print "URL: %s, ViaHeader: %s, XHR: %s" % (response.url, 24 print "URL: %s, ViaHeader: %s, XHR: %s" % (response.url,
24 response.ResponseHasViaHeader(), response.WasXHR()) 25 response.ResponseHasViaHeader(), response.WasXHR())
25 26
26 if __name__ == '__main__': 27 if __name__ == '__main__':
27 test = SimpleSmoke() 28 test = SimpleSmoke()
28 test.RunAllTests() 29 test.RunAllTests()
OLDNEW
« no previous file with comments | « tools/chrome_proxy/webdriver/common.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698