OLD | NEW |
---|---|
(Empty) | |
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 | |
3 # found in the LICENSE file. | |
4 from telemetry import story | |
5 from telemetry.page import page as page_module | |
6 | |
7 WIDTH = 1280 | |
8 HEIGHT = 720 | |
9 | |
10 class WebrtcRenderingMeasurementPage(page_module.Page): | |
nednguyen
2015/09/02 16:26:46
s/WebrtcRenderingMeasurement/WebrtcRendering
cpaulin (no longer in chrome)
2015/09/16 22:57:05
Done.
| |
11 | |
12 def __init__(self, url, page_set): | |
13 super(WebrtcRenderingMeasurementPage, self).__init__(url=url, | |
14 page_set=page_set) | |
15 self.webrtc_rendering_measurement = True | |
16 | |
17 def RunNavigateSteps(self, action_runner): | |
18 super(WebrtcRenderingMeasurementPage, self).RunNavigateSteps(action_runner) | |
19 print "#### DEBUG: Starting testCamera script ####" | |
20 action_runner.ExecuteJavaScript('testCamera([%s, %s]);' % (WIDTH, HEIGHT)) | |
21 action_runner.WaitForJavaScriptCondition('testProgress') | |
22 | |
23 | |
24 class WebrtcRenderingMeasurementPageSet(story.StorySet): | |
25 | |
26 """ A benchmark of webrtc rendering performance.""" | |
27 | |
28 def __init__(self): | |
29 super(WebrtcRenderingMeasurementPageSet, self).__init__() | |
30 self.webrtc_rendering_measurement = True | |
31 | |
32 url = ('file://../../../chrome/test/data/webrtc_rendering/' | |
33 'loopback_peerconnection.html') | |
phoglund_chromium
2015/09/02 11:27:45
You're not supposed to build page sets like this,
nednguyen
2015/09/02 16:26:46
Telemetry page can have file url (and I indeed pre
| |
34 self.AddStory(WebrtcRenderingMeasurementPage(url, self)) | |
OLD | NEW |