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

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

Issue 2693873004: Integration test of Data Saver block-once directive (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/chrome_proxy/webdriver/bypass.py
diff --git a/tools/chrome_proxy/webdriver/bypass.py b/tools/chrome_proxy/webdriver/bypass.py
index 3d5f3989d2a1c7061cd19f035555cd432862192d..1f00147880af14b623d9824c7adc763c484823ec 100644
--- a/tools/chrome_proxy/webdriver/bypass.py
+++ b/tools/chrome_proxy/webdriver/bypass.py
@@ -9,6 +9,20 @@ from common import IntegrationTest
class Bypass(IntegrationTest):
+ # Ensure Chrome does not use Data Saver for block-once, but does use Data
+ # Saver for a subsequent request.
+ def testBlockOnce(self):
+ with TestDriver() as t:
+ t.AddChromeArg('--enable-spdy-proxy-auth')
+ t.LoadURL('http://check.googlezip.net/blocksingle/')
+ responses = t.GetHTTPResponses()
+ self.assertEqual(2, len(responses))
+ for response in responses:
+ if response.url == "http://check.googlezip.net/image.png":
+ self.assertHasChromeProxyViaHeader(response)
+ else:
+ self.assertNotHasChromeProxyViaHeader(response)
+
# Ensure Chrome does not use Data Saver for block=0, which uses the default
# proxy retry delay.
def testBypass(self):
« 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