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

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

Issue 2624233002: Rename incognito and simple_smoke to be better named and organized. (Closed)
Patch Set: Created 3 years, 11 months 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/incognito.py ('k') | tools/chrome_proxy/webdriver/smoke.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 import sys
6 import time
7
8 import common
9 from common import TestDriver
10 from common import IntegrationTest
11
12
13 class SimpleSmoke(IntegrationTest):
14
15 # Simple example integration test.
16 def testCheckPageWithProxy(self):
17 with TestDriver() as t:
18 t.AddChromeArg('--enable-spdy-proxy-auth')
19 t.LoadURL('http://check.googlezip.net/test.html')
20 print 'Document Title: ', t.ExecuteJavascriptStatement('document.title',
21 timeout=1)
22 responses = t.GetHTTPResponses()
23 for response in responses:
24 print "URL: %s, ViaHeader: %s, XHR: %s" % (response.url,
25 response.ResponseHasViaHeader(), response.WasXHR())
26 self.assertHasChromeProxyViaHeader(response)
27
28 # Simple example integration test.
29 def testCheckPageWithoutProxy(self):
30 with TestDriver() as t:
31 t.AddChromeArg('--enable-spdy-proxy-auth')
32 t.LoadURL('https://check.googlezip.net/test.html')
33 print 'Document Title: ', t.ExecuteJavascriptStatement('document.title',
34 timeout=1)
35 responses = t.GetHTTPResponses()
36 for response in responses:
37 print "URL: %s, ViaHeader: %s, XHR: %s" % (response.url,
38 response.ResponseHasViaHeader(), response.WasXHR())
39 self.assertNotHasChromeProxyViaHeader(response)
40
41 # Show how to get a histogram.
42 def testPingbackHistogram(self):
43 with TestDriver() as t:
44 t.AddChromeArg('--enable-spdy-proxy-auth')
45 t.LoadURL('http://check.googlezip.net/test.html')
46 t.LoadURL('http://check.googlezip.net/test.html')
47 print t.GetHistogram('DataReductionProxy.Pingback.Attempted')
48
49 # Show how to use WaitForJavascriptExpression
50 def testHTML5(self):
51 with TestDriver() as t:
52 t.AddChromeArg('--enable-spdy-proxy-auth')
53 t.LoadURL('http://html5test.com/')
54 t.WaitForJavascriptExpression(
55 'document.getElementsByClassName("pointsPanel")', 15)
56
57 if __name__ == '__main__':
58 IntegrationTest.RunAllTests()
OLDNEW
« no previous file with comments | « tools/chrome_proxy/webdriver/incognito.py ('k') | tools/chrome_proxy/webdriver/smoke.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698