Revert 222150 "Telemetry: smoothness measurement throws MissingT..."

Breaks testGotQueryParams on Mac 10.6 and 10.7.

> Telemetry: smoothness measurement throws MissingTimelineMarker.
> 
> Rather than throwing a generic LookupError exception when the timeline marker
> cannot be found in the trace, throw a MissingTimelineMarker which is a subclass
> of page_measurement.MeasurementFailure. These exceptios get caught by the page
> runner.
> 
> Stop catching LookupError exeptions in _RunPage.
> 
> BUG=238864
> 
> Review URL: https://chromiumcodereview.appspot.com/23766009

TBR=dominikg@chromium.org

Review URL: https://codereview.chromium.org/23693005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222204 0039d316-1c4b-4281-b951-d872f2087c98
parent ec320635
......@@ -6,23 +6,15 @@ from metrics import smoothness
from metrics.gpu_rendering_stats import GpuRenderingStats
from telemetry.page import page_measurement
class DidNotScrollException(page_measurement.MeasurementFailure):
def __init__(self):
super(DidNotScrollException, self).__init__('Page did not scroll')
class MissingDisplayFrameRate(page_measurement.MeasurementFailure):
def __init__(self, name):
super(MissingDisplayFrameRate, self).__init__(
'Missing display frame rate metrics: ' + name)
class MissingTimelineMarker(page_measurement.MeasurementFailure):
def __init__(self):
super(MissingTimelineMarker, self).__init__('Timeline marker not found')
class Smoothness(page_measurement.PageMeasurement):
def __init__(self):
super(Smoothness, self).__init__('smoothness')
......@@ -67,7 +59,7 @@ class Smoothness(page_measurement.PageMeasurement):
smoothness.TIMELINE_MARKER)
if s.parent_slice == None]
if len(events) != 1:
raise MissingTimelineMarker()
raise LookupError, 'timeline marker not found'
return events[0]
def MeasurePage(self, page, tab, results):
......
......@@ -394,7 +394,7 @@ def _RunPage(test, page, state, expectation, results, finder_options):
page_state.ImplicitPageNavigation(page, tab, test)
test.Run(finder_options, page, tab, results)
util.CloseConnections(tab)
except page_test.Failure:
except (page_test.Failure, LookupError):
logging.warning('%s:\n%s', page.url, traceback.format_exc())
if expectation == 'fail':
logging.info('Failure was expected\n')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment