OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 from telemetry import decorators | 4 from telemetry import decorators |
5 from telemetry.testing import tab_test_case | 5 from telemetry.testing import tab_test_case |
6 | 6 |
7 | 7 |
8 class AboutTracingIntegrationTest(tab_test_case.TabTestCase): | 8 class AboutTracingIntegrationTest(tab_test_case.TabTestCase): |
9 | 9 |
10 @decorators.Disabled('android', | 10 @decorators.Disabled('android', |
11 'win') # https://crbug.com/632871 | 11 'win', # https://crbug.com/632871 |
| 12 'chromeos') # https://crbug.com/654044 |
12 def testBasicTraceRecording(self): | 13 def testBasicTraceRecording(self): |
13 action_runner = self._tab.action_runner | 14 action_runner = self._tab.action_runner |
14 action_runner.Navigate('chrome://tracing') | 15 action_runner.Navigate('chrome://tracing') |
15 record_button_js = ( | 16 record_button_js = ( |
16 "document.querySelector('tr-ui-timeline-view').shadowRoot." | 17 "document.querySelector('tr-ui-timeline-view').shadowRoot." |
17 "querySelector('#record-button')") | 18 "querySelector('#record-button')") |
18 | 19 |
19 # Click 'record' to trigger record selection diaglog. | 20 # Click 'record' to trigger record selection diaglog. |
20 action_runner.WaitForElement(element_function=record_button_js) | 21 action_runner.WaitForElement(element_function=record_button_js) |
21 action_runner.ClickElement(element_function=record_button_js) | 22 action_runner.ClickElement(element_function=record_button_js) |
22 | 23 |
23 # Wait for record selection diaglog to pop up, then click record. | 24 # Wait for record selection diaglog to pop up, then click record. |
24 action_runner.WaitForElement(selector='.overlay') | 25 action_runner.WaitForElement(selector='.overlay') |
25 action_runner.ClickElement( | 26 action_runner.ClickElement( |
26 element_function=("document.querySelector('.overlay').shadowRoot." | 27 element_function=("document.querySelector('.overlay').shadowRoot." |
27 "querySelectorAll('button')[0]")) | 28 "querySelectorAll('button')[0]")) |
28 | 29 |
29 # Stop recording after 1 seconds. | 30 # Stop recording after 1 seconds. |
30 action_runner.Wait(1) | 31 action_runner.Wait(1) |
31 action_runner.ClickElement( | 32 action_runner.ClickElement( |
32 element_function= | 33 element_function= |
33 "document.querySelector('.overlay').querySelector('button')") | 34 "document.querySelector('.overlay').querySelector('button')") |
34 | 35 |
35 # Make sure that we can see the browser track. | 36 # Make sure that we can see the browser track. |
36 action_runner.WaitForElement(selector='div[title~="Browser"]') | 37 action_runner.WaitForElement(selector='div[title~="Browser"]') |
OLD | NEW |