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

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

Issue 2759273002: Adding two smoke tests for DataSaver: (Closed)
Patch Set: Address code review comment Created 3 years, 9 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 | « no previous file | 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 2017 The Chromium Authors. All rights reserved. 1 # Copyright 2017 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 common 5 import common
6 import time 6 import time
7 from common import TestDriver 7 from common import TestDriver
8 from common import IntegrationTest 8 from common import IntegrationTest
9 from common import NotAndroid 9 from common import NotAndroid
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 self.assertEqual(2, len(responses)) 86 self.assertEqual(2, len(responses))
87 for response in responses: 87 for response in responses:
88 chrome_proxy_header = response.request_headers['chrome-proxy'] 88 chrome_proxy_header = response.request_headers['chrome-proxy']
89 self.assertIn('s=', chrome_proxy_header) 89 self.assertIn('s=', chrome_proxy_header)
90 self.assertNotIn('ps=', chrome_proxy_header) 90 self.assertNotIn('ps=', chrome_proxy_header)
91 self.assertNotIn('sid=', chrome_proxy_header) 91 self.assertNotIn('sid=', chrome_proxy_header)
92 # Verify that the proxy server honored the session ID. 92 # Verify that the proxy server honored the session ID.
93 self.assertHasChromeProxyViaHeader(response) 93 self.assertHasChromeProxyViaHeader(response)
94 self.assertEqual(200, response.status) 94 self.assertEqual(200, response.status)
95 95
96 # Ensure the block is working
RyanSturm 2017/03/21 17:41:53 nit: change the comment to "Ensure that block caus
97 def testCheckBlockIsWorking(self):
98 with TestDriver() as t:
99 t.AddChromeArg('--enable-spdy-proxy-auth')
100 t.LoadURL('http://check.googlezip.net/block')
101 responses = t.GetHTTPResponses()
102 self.assertNotEqual(0, len(responses))
103 for response in responses:
104 self.assertNotHasChromeProxyViaHeader(response)
105
106 # Ensure image/css/javascript is compressed
RyanSturm 2017/03/21 17:41:53 nit: Change the comment to "Ensure image, css, and
107 def testCheckImageCssJavascriptIsCompressed(self):
108 with TestDriver() as t:
109 t.AddChromeArg('--enable-spdy-proxy-auth')
110 t.LoadURL('http://check.googlezip.net/static')
111 # http://check.googlezip.net/static is a test page that has
112 # image/css/javascript resources.
113 responses = t.GetHTTPResponses()
114 self.assertNotEqual(0, len(responses))
115 for response in responses:
116 self.assertHasChromeProxyViaHeader(response)
117
96 if __name__ == '__main__': 118 if __name__ == '__main__':
97 IntegrationTest.RunAllTests() 119 IntegrationTest.RunAllTests()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698