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 | |
5 from telemetry.page import page as page_module | |
6 from telemetry.page import page_test as page_test | |
7 from telemetry import story | |
8 | |
9 WIDTH = 1280 | |
phoglund_chromium
2015/09/17 11:23:58
Since you're just using these constants once I thi
cpaulin (no longer in chrome)
2015/09/17 23:58:54
Done.
| |
10 HEIGHT = 720 | |
11 | |
12 class WebrtcRenderingPage(page_module.Page): | |
13 | |
14 def __init__(self, url, page_set): | |
15 super(WebrtcRenderingPage, self).__init__( | |
16 url=url, | |
17 page_set=page_set, | |
18 name='webrtc_rendering_page') | |
19 self.webrtc_rendering = True | |
phoglund_chromium
2015/09/17 11:23:58
What is this used for?
cpaulin (no longer in chrome)
2015/09/17 23:58:55
Old artifact from when I did not know what I was d
| |
20 | |
21 def RunPageInteractions(self, action_runner): | |
22 with action_runner.CreateInteraction('Action_Create_PeerConnection', | |
23 repeatable=False): | |
24 command = 'testCamera([%s, %s]);' % (WIDTH, HEIGHT) | |
25 action_runner.ExecuteJavaScript(command) | |
26 action_runner.WaitForJavaScriptCondition('testDone') | |
27 errors = action_runner.EvaluateJavaScript('errors') | |
28 if errors: | |
29 raise page_test.Failure('Errors on page: ' + ', '.join(errors)) | |
30 | |
31 class WebrtcRenderingPageSet(story.StorySet): | |
32 | |
33 """ A benchmark of webrtc rendering performance.""" | |
34 | |
35 def __init__(self): | |
36 super(WebrtcRenderingPageSet, self).__init__() | |
37 self.webrtc_rendering = True | |
phoglund_chromium
2015/09/17 11:23:58
And this?
cpaulin (no longer in chrome)
2015/09/17 23:58:54
Done.
| |
38 | |
39 url = ('file://../../../chrome/test/data/webrtc_rendering/' | |
40 'loopback_peerconnection.html') | |
41 self.AddStory(WebrtcRenderingPage(url, self)) | |
OLD | NEW |