Upstream version 10.38.220.0
[platform/framework/web/crosswalk.git] / src / tools / chrome_proxy / integration_tests / chrome_proxy_measurements.py
index fd92a4d..e04e3fb 100644 (file)
@@ -214,6 +214,26 @@ class ChromeProxyHTTPFallbackViaHeader(ChromeProxyValidation):
     self._metrics.AddResultsForHTTPFallback(tab, results, proxies, bad_proxies)
 
 
+class ChromeProxyClientVersion(ChromeProxyValidation):
+  """Correctness measurement for version directives in Chrome-Proxy header.
+
+  The test verifies that the version information provided in the Chrome-Proxy
+  request header overrides any version, if specified, that is provided in the
+  user agent string.
+  """
+
+  def __init__(self):
+    super(ChromeProxyClientVersion, self).__init__()
+
+  def CustomizeBrowserOptions(self, options):
+    super(ChromeProxyClientVersion,
+          self).CustomizeBrowserOptions(options)
+    options.AppendExtraBrowserArgs('--user-agent="Chrome/32.0.1700.99"')
+
+  def AddResults(self, tab, results):
+    self._metrics.AddResultsForClientVersion(tab, results)
+
+
 class ChromeProxySmoke(ChromeProxyValidation):
   """Smoke measurement for basic chrome proxy correctness."""