| OLD | NEW |
| 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 time | 5 import time |
| 6 | 6 |
| 7 import common | 7 import common |
| 8 from common import TestDriver | 8 from common import TestDriver |
| 9 from common import IntegrationTest | 9 from common import IntegrationTest |
| 10 from common import NotAndroid | 10 from decorators import NotAndroid |
| 11 | 11 |
| 12 | 12 |
| 13 class Video(IntegrationTest): | 13 class Video(IntegrationTest): |
| 14 | 14 |
| 15 # Check videos are proxied. | 15 # Check videos are proxied. |
| 16 def testCheckVideoHasViaHeader(self): | 16 def testCheckVideoHasViaHeader(self): |
| 17 with TestDriver() as t: | 17 with TestDriver() as t: |
| 18 t.AddChromeArg('--enable-spdy-proxy-auth') | 18 t.AddChromeArg('--enable-spdy-proxy-auth') |
| 19 t.LoadURL( | 19 t.LoadURL( |
| 20 'http://check.googlezip.net/cacheable/video/buck_bunny_tiny.html') | 20 'http://check.googlezip.net/cacheable/video/buck_bunny_tiny.html') |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 t.AddChromeArg('--enable-spdy-proxy-auth') | 130 t.AddChromeArg('--enable-spdy-proxy-auth') |
| 131 t.LoadURL('http://data-saver-test.appspot.com/youtube') | 131 t.LoadURL('http://data-saver-test.appspot.com/youtube') |
| 132 t.WaitForJavascriptExpression( | 132 t.WaitForJavascriptExpression( |
| 133 'window.playerState == YT.PlayerState.PLAYING', 30) | 133 'window.playerState == YT.PlayerState.PLAYING', 30) |
| 134 for response in t.GetHTTPResponses(): | 134 for response in t.GetHTTPResponses(): |
| 135 if not response.url.startswith('https'): | 135 if not response.url.startswith('https'): |
| 136 self.assertHasChromeProxyViaHeader(response) | 136 self.assertHasChromeProxyViaHeader(response) |
| 137 | 137 |
| 138 if __name__ == '__main__': | 138 if __name__ == '__main__': |
| 139 IntegrationTest.RunAllTests() | 139 IntegrationTest.RunAllTests() |
| OLD | NEW |