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

Side by Side Diff: tools/perf/page_sets/webrtc_rendering_measurement.py

Issue 1254023003: Telemetry Test for WebRTC Rendering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: modified as per review comments Created 5 years, 3 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
(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))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698