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

Side by Side Diff: chrome/test/media_router/telemetry/benchmarks/pagesets/media_router_pages.py

Issue 1843063004: Add new Telemetry tests to get CPU and memory usage for idle and flinging two test scenarios. Mirro… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Jennifer's comments Created 4 years, 8 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 2016 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 import page
6 from telemetry import story
7 from telemetry.page import shared_page_state
8 from telemetry.core import exceptions
9
10
11 class CastPage(page.Page):
12
13 def __init__(self, page_set):
14 super(CastPage, self).__init__(
15 url='file://basic_test.html',
16 page_set=page_set)
17
18 def RunPageInteractions(self, action_runner):
19 with action_runner.CreateInteraction('LaunchDialog'):
20 # Wait for 5s after Chrome is opened in order to get consistent results.
21 action_runner.Wait(5)
22 action_runner.TapElement(selector='#start_session_button')
23 action_runner.Wait(5)
24 for tab in action_runner.tab.browser.tabs:
25 # Close media router dialog
26 if tab.url == 'chrome://media-router/':
27 try:
28 tab.ExecuteJavaScript(
29 'window.document.getElementById("media-router-container").' +
30 'shadowRoot.getElementById("container-header").shadowRoot.' +
31 'getElementById("close-button").click();')
32 except exceptions.DevtoolsTargetCrashException:
33 # Ignore the crash exception, this exception is caused by the js
34 # code which closes the dialog, it is expected.
35 pass
36
37
38 class MediaRouterPageSet(story.StorySet):
39
40 def __init__(self):
41 super(MediaRouterPageSet, self).__init__(
42 cloud_storage_bucket=story.PARTNER_BUCKET)
43 self.AddStory(CastPage(self))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698