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

Side by Side Diff: tools/chrome_proxy/integration_tests/chrome_proxy_metrics_unittest.py

Issue 1098253004: Move top_20 tests to a separate suite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert to old naming scheme for live/integration tests Created 5 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 base64 5 import base64
6 import unittest 6 import unittest
7 7
8 from integration_tests import chrome_proxy_metrics as metrics 8 from common import chrome_proxy_metrics as metrics
9 from integration_tests import network_metrics_unittest as network_unittest 9 from common import network_metrics_unittest as network_unittest
10 from telemetry.unittest_util import test_page_test_results 10 from telemetry.unittest_util import test_page_test_results
11 11
12 TEST_EXTRA_VIA_HEADER = '1.1 EXTRA_VIA_HEADER' 12 TEST_EXTRA_VIA_HEADER = '1.1 EXTRA_VIA_HEADER'
13 13
14 # Timeline events used in tests. 14 # Timeline events used in tests.
15 # An HTML not via proxy. 15 # An HTML not via proxy.
16 EVENT_HTML_DIRECT = network_unittest.NetworkMetricTest.MakeNetworkTimelineEvent( 16 EVENT_HTML_DIRECT = network_unittest.NetworkMetricTest.MakeNetworkTimelineEvent(
17 url='http://test.html1', 17 url='http://test.html1',
18 response_headers={ 18 response_headers={
19 'Content-Type': 'text/html', 19 'Content-Type': 'text/html',
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 self.assertTrue(exception_occurred) 433 self.assertTrue(exception_occurred)
434 434
435 # Passing in zero responses should cause a failure. 435 # Passing in zero responses should cause a failure.
436 metric.SetEvents([]) 436 metric.SetEvents([])
437 no_responses_exception = False 437 no_responses_exception = False
438 try: 438 try:
439 metric.AddResultsForHTTPToDirectFallback(None, results, 'test.html2') 439 metric.AddResultsForHTTPToDirectFallback(None, results, 'test.html2')
440 except metrics.ChromeProxyMetricException: 440 except metrics.ChromeProxyMetricException:
441 no_responses_exception = True 441 no_responses_exception = True
442 self.assertTrue(no_responses_exception) 442 self.assertTrue(no_responses_exception)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698