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

Unified Diff: tools/chrome_proxy/webdriver/simple_smoke.py

Issue 2560243002: Add GetURL() and WaitForJSExpression() functions (Closed)
Patch Set: Style nits. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/chrome_proxy/webdriver/common.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/chrome_proxy/webdriver/simple_smoke.py
diff --git a/tools/chrome_proxy/webdriver/simple_smoke.py b/tools/chrome_proxy/webdriver/simple_smoke.py
index eacb8e5abd8743db9e0626551f0a775648b67ef2..27766c4b73948856442fb1b27095dfa13fa6864c 100644
--- a/tools/chrome_proxy/webdriver/simple_smoke.py
+++ b/tools/chrome_proxy/webdriver/simple_smoke.py
@@ -16,11 +16,9 @@ class SimpleSmoke(unittest.TestCase):
def testCheckPageWithProxy(self):
with TestDriver() as t:
t.AddChromeArg('--enable-spdy-proxy-auth')
- t.SetURL('http://check.googlezip.net/test.html')
- t.LoadPage()
+ t.LoadURL('http://check.googlezip.net/test.html')
print 'Document Title: ', t.ExecuteJavascriptStatement('document.title',
timeout=1)
- time.sleep(5)
responses = t.GetHTTPResponses()
for response in responses:
print "URL: %s, ViaHeader: %s, XHR: %s" % (response.url,
@@ -30,11 +28,18 @@ class SimpleSmoke(unittest.TestCase):
def testPingbackHistogram(self):
with TestDriver() as t:
t.AddChromeArg('--enable-spdy-proxy-auth')
- t.SetURL('http://check.googlezip.net/test.html')
- t.LoadPage()
- t.LoadPage()
+ t.LoadURL('http://check.googlezip.net/test.html')
+ t.LoadURL('http://check.googlezip.net/test.html')
print t.GetHistogram('DataReductionProxy.Pingback.Attempted')
+ # Show how to use WaitForJavascriptExpression
+ def testHTML5(self):
+ with TestDriver() as t:
+ t.AddChromeArg('--enable-spdy-proxy-auth')
+ t.LoadURL('http://html5test.com/')
+ t.WaitForJavascriptExpression(
+ 'document.getElementsByClassName("pointsPanel")', 15)
+
if __name__ == '__main__':
# The unittest library uses sys.argv itself and is easily confused by our
# command line options. Pass it a simpler argv instead.
« 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