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

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

Issue 2903453003: DataReductionProxy proto change to use exp=force_lite_page directive (Closed)
Patch Set: Created 3 years, 7 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
Index: tools/chrome_proxy/webdriver/lite_page.py
diff --git a/tools/chrome_proxy/webdriver/lite_page.py b/tools/chrome_proxy/webdriver/lite_page.py
index 101d563f8ec334c1f2adae9ea5b3cfc246fdc452..b20004df76ffa45d12ffad0fe775c46acb156b21 100644
--- a/tools/chrome_proxy/webdriver/lite_page.py
+++ b/tools/chrome_proxy/webdriver/lite_page.py
@@ -10,9 +10,9 @@ import time
class LitePage(IntegrationTest):
- # Checks that a Lite Page is served and that the ignore_preview_blacklist
- # experiment is being used.
- def testLitePage(self):
+ # Checks that a Lite Page is served and the force_lite_page experiment
+ # directive is provided when always-on.
+ def testLitePageForcedExperiment(self):
# If it was attempted to run with another experiment, skip this test.
if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment'
in common.ParseFlags().browser_args):
@@ -32,8 +32,10 @@ class LitePage(IntegrationTest):
continue
if response.url.startswith('data:'):
continue
- self.assertIn('exp=ignore_preview_blacklist',
- response.request_headers['chrome-proxy'])
+ # Main resource should force lite page.
+ if response.url.endswith('html'):
+ self.assertIn('exp=force_lite_page',
+ response.request_headers['chrome-proxy'])
if (self.checkLitePageResponse(response)):
lite_page_responses = lite_page_responses + 1
@@ -64,8 +66,6 @@ class LitePage(IntegrationTest):
continue
if response.url.startswith('data:'):
continue
- self.assertIn('exp=ignore_preview_blacklist',
- response.request_headers['chrome-proxy'])
if (self.checkLitePageResponse(response)):
lite_page_responses = lite_page_responses + 1
self.assertEqual(1, lite_page_responses)

Powered by Google App Engine
This is Rietveld 408576698