| OLD | NEW | 
|   1 # Copyright 2015 The Chromium Authors. All rights reserved. |   1 # Copyright 2015 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 from telemetry.internal.results import page_test_results |   5 from telemetry.internal.results import page_test_results | 
|   6 from telemetry.page import page as page_module |   6 from telemetry.page import page as page_module | 
|   7 from telemetry.testing import options_for_unittests |   7 from telemetry.testing import options_for_unittests | 
|   8 from telemetry.testing import page_test_test_case |   8 from telemetry.testing import page_test_test_case | 
|   9 from telemetry.util import wpr_modes |   9 from telemetry.util import wpr_modes | 
|  10  |  10  | 
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  84     actual = _ActualValues(results)['V8_DetachedContextAgeInGC'] |  84     actual = _ActualValues(results)['V8_DetachedContextAgeInGC'] | 
|  85     self.assertEqual(2, actual.value) |  85     self.assertEqual(2, actual.value) | 
|  86     self.assertEqual('garbage_collections', actual.units) |  86     self.assertEqual('garbage_collections', actual.units) | 
|  87  |  87  | 
|  88   def testWithSimplePage(self): |  88   def testWithSimplePage(self): | 
|  89     page_set = self.CreateEmptyPageSet() |  89     page_set = self.CreateEmptyPageSet() | 
|  90     page = SimplePage(page_set) |  90     page = SimplePage(page_set) | 
|  91     page_set.AddStory(page) |  91     page_set.AddStory(page) | 
|  92     metric = v8_detached_context_age_in_gc.V8DetachedContextAgeInGC() |  92     metric = v8_detached_context_age_in_gc.V8DetachedContextAgeInGC() | 
|  93     results = self.RunMeasurement(metric, page_set, options=self._options) |  93     results = self.RunMeasurement(metric, page_set, options=self._options) | 
|  94     self.assertEquals(0, len(results.failures)) |  94     self.assertEquals(0, len(results.failures), msg=str(results.failures)) | 
|  95     actual = _ActualValues(results)['V8_DetachedContextAgeInGC'] |  95     actual = _ActualValues(results)['V8_DetachedContextAgeInGC'] | 
|  96     self.assertLessEqual(0, actual.value) |  96     self.assertLessEqual(0, actual.value) | 
|  97     self.assertEqual('garbage_collections', actual.units) |  97     self.assertEqual('garbage_collections', actual.units) | 
| OLD | NEW |