Chromium Code Reviews| Index: tools/perf/core/about_tracing_integration_test.py |
| diff --git a/tools/perf/core/about_tracing_integration_test.py b/tools/perf/core/about_tracing_integration_test.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d41e4e2d4904cfea88b4317cfd285cd2af9fa43c |
| --- /dev/null |
| +++ b/tools/perf/core/about_tracing_integration_test.py |
| @@ -0,0 +1,40 @@ |
| +# Copyright 2016 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| +from telemetry import decorators |
| +from telemetry.testing import tab_test_case |
| + |
| + |
| +_RECORD_BUTTON_SELECTOR_FUNC = ''' |
| +}''' |
|
sullivan
2016/07/27 12:40:39
What's this for?
nednguyen
2016/07/27 12:56:52
Removed.
|
| + |
| + |
| +class AboutTracingIntegrationTest(tab_test_case.TabTestCase): |
| + |
| + @decorators.Disabled('android') |
| + def testBasicTraceRecording(self): |
| + action_runner = self._tab.action_runner |
| + action_runner.Navigate('chrome://tracing') |
| + |
| + # Click 'record' to trigger record selection diaglog. |
| + action_runner.WaitForElement(element_function='''function() { |
| + return document.querySelector('tr-ui-timeline-view').shadowRoot. |
|
sullivan
2016/07/27 12:40:39
I wanted to check that you tested this at ToT? The
nednguyen
2016/07/27 12:56:52
Done.
|
| + getElementById('record-button');}''') |
| + action_runner.ExecuteJavaScript(''' |
| + document.querySelector('tr-ui-timeline-view').shadowRoot. |
| + getElementById('record-button').click();''') |
|
sullivan
2016/07/27 12:40:39
Why not use the ClickElement method in action_runn
nednguyen
2016/07/27 12:56:52
Done.
|
| + |
| + # Wait for record selection diaglog to pop up, then click record. |
| + action_runner.WaitForElement(selector='.overlay') |
| + action_runner.ExecuteJavaScript(''' |
| + document.querySelector('.overlay').shadowRoot. |
| + querySelectorAll('button')[0].click()''') |
| + |
| + # Stop recording after 1 seconds. |
| + action_runner.Wait(1) |
| + action_runner.ExecuteJavaScript(''' |
| + document.querySelector('.overlay'). |
| + querySelectorAll('button')[0].click()''') |
| + |
| + # Make sure that we can see the browser track. |
| + action_runner.WaitForElement(selector='div[title~="Browser"]') |