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 'mac', # Flaky, see crbug.com/632238. | 11 'win') # https://crbug.com/632871 |
12 'win') # crbug.com/630030 | |
13 def testBasicTraceRecording(self): | 12 def testBasicTraceRecording(self): |
14 action_runner = self._tab.action_runner | 13 action_runner = self._tab.action_runner |
15 action_runner.Navigate('chrome://tracing') | 14 action_runner.Navigate('chrome://tracing') |
16 | 15 |
17 # Click 'record' to trigger record selection diaglog. | 16 # Click 'record' to trigger record selection diaglog. |
18 action_runner.WaitForElement(selector='#record-button') | 17 action_runner.WaitForElement(selector='#record-button') |
19 action_runner.ClickElement(selector='#record-button') | 18 action_runner.ClickElement(selector='#record-button') |
20 | 19 |
21 # Wait for record selection diaglog to pop up, then click record. | 20 # Wait for record selection diaglog to pop up, then click record. |
22 action_runner.WaitForElement(selector='.overlay') | 21 action_runner.WaitForElement(selector='.overlay') |
23 action_runner.ClickElement( | 22 action_runner.ClickElement( |
24 element_function=("document.querySelector('.overlay').shadowRoot." | 23 element_function=("document.querySelector('.overlay').shadowRoot." |
25 "querySelectorAll('button')[0]")) | 24 "querySelectorAll('button')[0]")) |
26 | 25 |
27 # Stop recording after 1 seconds. | 26 # Stop recording after 1 seconds. |
28 action_runner.Wait(1) | 27 action_runner.Wait(1) |
29 action_runner.ClickElement( | 28 action_runner.ClickElement( |
30 element_function= | 29 element_function= |
31 "document.querySelector('.overlay').querySelector('button')") | 30 "document.querySelector('.overlay').querySelector('button')") |
32 | 31 |
33 # Make sure that we can see the browser track. | 32 # Make sure that we can see the browser track. |
34 action_runner.WaitForElement(selector='div[title~="Browser"]') | 33 action_runner.WaitForElement(selector='div[title~="Browser"]') |
OLD | NEW |