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

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

Issue 2759273002: Adding two smoke tests for DataSaver: (Closed)
Patch Set: 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
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
107 def testCheckImageCssJavascriptIsCompressed(self):
108 with TestDriver() as t:
109 t.AddChromeArg('--enable-spdy-proxy-auth')
110 t.LoadURL('http://check.googlezip.net/static')
bustamante 2017/03/20 21:32:28 Add a comment here that http://check.googlezip.net
111 responses = t.GetHTTPResponses()
112 self.assertNotEqual(0, len(responses))
113 for response in responses:
114 self.assertHasChromeProxyViaHeader(response)
115
96 if __name__ == '__main__': 116 if __name__ == '__main__':
97 IntegrationTest.RunAllTests() 117 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