Chromium Code Reviews| Index: tools/chrome_proxy/webdriver/common.py |
| diff --git a/tools/chrome_proxy/webdriver/common.py b/tools/chrome_proxy/webdriver/common.py |
| index f17ab3b2a60bb7d0c0b6174bc40e645b0f04fc72..5e8a8ba532f20a8fca33edd9085b4a2219f1265c 100644 |
| --- a/tools/chrome_proxy/webdriver/common.py |
| +++ b/tools/chrome_proxy/webdriver/common.py |
| @@ -586,10 +586,11 @@ class IntegrationTest(unittest.TestCase): |
| def checkLoFiResponse(self, http_response, expected_lo_fi): |
| """Asserts that if expected the response headers contain the Lo-Fi directive |
| - then the request headers do too. Also checks that the content size is less |
| - than 100 if |expected_lo_fi|. Otherwise, checks that the response and |
| - request headers don't contain the Lo-Fi directive and the content size is |
| - greater than 100. |
| + then the request headers do too. If the CPAT header contains if-heavy, the |
|
bengr
2017/04/27 18:45:49
Note somewhere that 'if-heavy' is being deprecated
RyanSturm
2017/04/27 18:50:32
Done.
|
| + request should not be LoFi. Also checks that the content size is less than |
| + 100 if |expected_lo_fi|. Otherwise, checks that the response and request |
| + headers don't contain the Lo-Fi directive and the content size is greater |
| + than 100. |
| Args: |
| http_response: The HTTPResponse object to check. |
| @@ -612,8 +613,11 @@ class IntegrationTest(unittest.TestCase): |
| return True; |
| return False; |
| else: |
| - self.assertNotIn('chrome-proxy-accept-transform', |
| - http_response.request_headers) |
| + if ('chrome-proxy-accept-transform' in http_response.request_headers): |
| + cpat_request = http_response.request_headers[ |
| + 'chrome-proxy-accept-transform'] |
| + if ('empty-image' in cpat_request): |
| + self.assertIn('if-heavy', cpat_request) |
| self.assertNotIn('chrome-proxy-content-transform', |
| http_response.response_headers) |
| content_length = http_response.response_headers['content-length'] |